Every now and then I need to quickly copy and paste something from one device to another. There are billions of options out there for this already, but it felt like a nice mini-project to build a basic app and feed my neglected Raspberry Pi.
how it's made
I started by asking AI where to begin as I wasn't familiar with any of the technologies involved. It suggested I use Express.js to run the web app and Socket.IO for real-time data transfer between the client and the server. It even went as far as providing the code for a basic implementation, which I ended up using.
Honestly, that was about it. All I had left to do was put my fingerprint on it. I made some changes to the styles and named it clippy wippy, with it being a kind of clipboard, and because funny.
After trying it out, I realised it was missing file upload functionality. This was added using Multer, which is file upload middleware for Express.js. The obvious name for this feature was filey wiley.

I'm running the app on a Raspberry Pi. I cloned the repo into the /srv directory and installed PM2 (process manager) to run it as a service. If anyone wants to try this out:
# 1. install PM2 - requires Node.js
sudo npm install pm2 -g
# 2. clone repo somewhere - I used /srv
sudo git clone https://github.com/adFoamy/clippy-wippy.git
# 3. navigate to repo
cd /srv/clippy-wippy
# 3.1. change ownership of the repo so the app can store files if you run PM2 with your own user (not sudo)
sudo chown -R $USER:$USER .
# 4. run PM2 - give the app a name
pm2 start index.js --name "clippy-wippy"
# 5. from `/srv/clippy-wippy` - pull latest changes from repo and restart app (if I ever update it)
# git pull
# pm2 restart clippy-wippylessons learned
AI ruined the fun with this one, or maybe my prompt was just too good. I wanted guidance on which technologies were available as a starting point, which it provided, but it also provided a full working prototype with it being such a basic app.
After reading through and understanding the suggested code, I thought "I might as well use it, otherwise I'll just end up coming back to it to copy and paste stuff".
I don't commit any AI-generated code unless I fully understand what it does first, so it wasn't completely pointless from a learning perspective. I’ve used the app loads of times since I set it up on the Raspberry Pi.
next steps
Maybe some minor functional improvements would be nice, like the ability to drag and drop files. Nothing comes to mind other than that. It does what it's supposed to do pretty well. If you give it a try and have any suggestions, let me know.