Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Karalix/micro-cafe

Repository files navigation

My Tiny Café

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.

The Nuxt app

Make sure to install the dependencies with pnpm:

pnpm install

Start the development server on http://localhost:3000:

pnpm dev

Build the application for production:

pnpm build

Deploy the application on the Edge with NuxtHub on your Cloudflare account:

npx nuxthub deploy

Note

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.

The Appwrite backend

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 :

  1. Create an Appwrite account or self-host your instance
  2. Install the Appwrite CLI
  3. Initialize a new project
  4. Import the database schema described in the file appwrite.config.json (refer to the CLI doc) probably using the appwrite push tables command

That should be most of it (in theory). I haven't had to test it myself, I hope you'll be successful.

Push Notifications

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.

About

A tiny PWA to open your Coffee House at Home

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •