So this is perhaps the cringiest project I have done in a while. One of my best friends has opened a restaurant and while helping him they had a spare receipt printer that they weren't going to use, so I asked him if I could have it, the answer was yes. My girlfriend is leaving for a backpacking trip to Asia in a week from now so I thought I would create a little geeky Sunday afternoon project. Where she is able to send me little messages through a UI, that get printed via the receipt printer that is standing on my desk. 😊
The project makes use of a simple Python script in the backend that is a Flask server, opening an endpoint listening for POST requests with messages and sends them to the printer to get printed. The front end is a single page made with Next.js (a bit overkill, I know, but I was lazy). The backend runs on my own server in a Docker container at home, and all the requests get tunneled via Cloudflare tunnels to my Docker container. The frontend is hosted on Vercel.
- Flask
- Flask-Cors
- escpos-python
The printer I used for this project is the Epson TM-m30II (But pretty sure any IP printer will work):
And this is what the frontend looks like (don't judge me):
This project is a heartfelt way to stay connected through technology and little printed messages. Perfect for sending love notes, reminders, or just to say "thinking of you" while being miles apart. 💑