A soft, shared coffee ritual for two devices at home. https://cafe.caleb-brown.dev
Find a file
Caleb Brown 73fde83a76
All checks were successful
CI / Validate (push) Successful in 57s
Publish Edge Image / Publish edge image (push) Successful in 3m17s
Merge pull request 'dev' (#11) from dev into main
Reviewed-on: #11
2026-03-30 17:20:15 -04:00
.forgejo/workflows Add Forgejo workflows 2026-03-28 20:52:05 -04:00
server Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00
shared Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00
src Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00
.dockerignore Move workflows to .github directory 2026-03-28 19:38:47 -04:00
.editorconfig Initial commit 2026-03-28 18:59:55 -04:00
.gitignore Initial commit 2026-03-28 18:59:55 -04:00
db.ts Simplify hot and iced recipe variants 2026-03-30 13:35:20 -04:00
docker-compose.yml Add Docker deployment support 2026-03-28 19:19:45 -04:00
Dockerfile Add Docker deployment support 2026-03-28 19:19:45 -04:00
eslint.config.js Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00
index.html Remove Gemini and AI Studio prototype references 2026-03-30 09:25:17 -04:00
metadata.json Initial commit 2026-03-28 18:59:55 -04:00
package-lock.json Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00
package.json Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00
README.md Simplify hot and iced recipe variants 2026-03-30 13:35:20 -04:00
server.ts Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00
tsconfig.json Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00
vite.config.ts Remove Gemini and AI Studio prototype references 2026-03-30 09:25:17 -04:00
vitest.config.ts Refactor app architecture and improve cafe UX 2026-03-30 17:06:42 -04:00

Our Cafe

our-cafe is a small real-time cafe operations app built with React, Vite, Express, Socket.IO, and DuckDB.

It lets a team:

  • set a local nickname for the current device
  • browse the drink menu and place orders
  • watch the live queue update in real time
  • claim and advance orders through the prep flow
  • adjust ingredient inventory and basic cafe settings

How It Works

The project runs a single Node server in development:

  • server.ts starts Express, mounts the JSON API, serves the Vite app, and broadcasts live updates over Socket.IO
  • db.ts creates and seeds a local cafe.duckdb database on first run
  • src/ contains the mobile-first React client

Order and inventory changes are pushed to all connected clients, so multiple devices can act like a shared cafe counter.

Main Screens

  • Today: dashboard with active orders and quick actions
  • Menu: drink list, modifiers, notes, and order placement
  • Orders: live queue with claim / brew / ready / complete transitions
  • Manage: inventory adjustment, cafe name, and local nickname settings

Local Development

Prerequisites:

  • Node.js 20+ recommended
  • npm

Install dependencies:

npm install

Start the app:

npm run dev

The server listens on http://localhost:3000.

Run with Docker Compose:

docker compose up --build

This also serves the app on http://localhost:3000.

On first launch, the app creates a local DuckDB file in the project root and seeds default data for:

  • cafe settings
  • ingredients
  • recipes
  • recipe ingredients
  • recipe modifiers
  • orders

Scripts

npm run dev     # start the Express + Vite development server
npm run build   # build the frontend for production
npm run start   # run the server entrypoint
npm run lint    # TypeScript type-check

Docker Notes

  • docker-compose.yml builds a single production container for the Express server and Vite client
  • DuckDB data is persisted in the named Docker volume cafe_data
  • The container stores the database at /app/data/cafe.duckdb

CI/CD

Workflow files live in .github/workflows, which Gitea Actions can consume, and cover validation plus container publishing.

  • ci.yml runs on pushes to main and pull requests
  • publish-edge.yml runs on pushes to main and publishes rolling images
  • release.yml runs on tags matching v* and publishes versioned release images

Required repository secrets:

  • REGISTRY_URL: registry host, for example projects.caleb-brown.dev
  • REGISTRY_USERNAME: registry account with package write access
  • REGISTRY_PASSWORD: token or password for that account

Published image name:

<REGISTRY_URL>/caleb-brown/our-cafe

Published tags:

  • pushes to main: edge, main, and sha-<shortsha>
  • stable release tag v1.2.3: v1.2.3, 1.2.3, 1.2, 1, and latest
  • prerelease tag v1.2.3-rc.1: v1.2.3-rc.1 and 1.2.3-rc.1

Create a release by pushing a git tag such as:

git tag v0.1.0
git push origin v0.1.0

Data Notes

  • The runtime database is stored locally as cafe.duckdb
  • DuckDB artifacts are ignored in git
  • The seeded menu currently includes unified drinks like latte and vanilla latte with optional temperature selection, plus cappuccino, honey cinnamon, and mocha

Current Stack

  • React 19
  • Vite
  • Express
  • Socket.IO
  • DuckDB
  • TypeScript
  • Tailwind CSS
  • Framer Motion