Here is the code for My Tiny Café. It's a big pile of shitty and messy code. I started the project during my parental leave in March just before the birth of my son. Most of the code was written while sleep deprived, some was vibe-coded. Because it was originaly only for my family and close firends, it's ridden with security holes.
A Nuxt app deployed using NuxtHub.
Make sure to install the dependencies with pnpm:
pnpm installStart the development server on http://localhost:3000:
pnpm devBuild the application for production:
pnpm buildDeploy the application on the Edge with NuxtHub on your Cloudflare account:
npx nuxthub deployNote
NuxtHub is soon sunsetting, it's on my todo to switch completely on Cloudflare. The app in itself has very little reliance on Cloudflare specificaly, it could be interesting to propose alternative deployment environments.
Okay things get a bit more complicated here if you want to replicate My Tiny Café. The backend is hosted on Appwrite which is a very nice and complete PaaS, either on their cloud solution or as a self-hosted app (very easy to install and configure, unlike Supabase).
The steps should be somewhere like :
- Create an Appwrite account or self-host your instance
- Install the Appwrite CLI
- Initialize a new project
- Import the database schema described in the file
appwrite.config.json(refer to the CLI doc) probably using theappwrite push tablescommand
That should be most of it (in theory). I haven't had to test it myself, I hope you'll be successful.
Because I don't know better, I relied on Firebase to implement Push Notifications. To be more precise, I rely on the Appwrite integration with Firebase through their Messaging Product. Let's be honest, it was a pain and I don't remember how I achieved it, but you should do it too, push notifications is very important for the UX of this project.
Once your Firebase keys are setup, you can create a function in the Appwrite console that will send push notifications for every command. It's the push-function.js file at the root of the repo.