Back to projects

Case Study

DineOS

A restaurant operating system: QR ordering, a live kitchen display and Stripe payments

Personal project, built alone: product concept, architecture, backend, frontend, infrastructure, deployment and documentation.

Role
Solo developer
Timeframe
June to November 2026. Version 1.0 released on October 19, 2026, version 1.0.1 on November 9, 2026
Live demo
dineos-frontend-staging-aghirculesei.onrender.comguest view of a demo table, no sign-up needed. The free server can take up to two minutes to wake up.

Context / problem

In many restaurants an order still travels on paper: the waiter writes it down, carries it to the kitchen, and the guest waits for the bill. Every step depends on someone being free, and the kitchen only learns about an order when the slip arrives.

DineOS moves that flow onto the guest's own phone. A QR code on the table opens the menu without an account or an app; the order reaches the kitchen display the moment it is placed, the guest watches it move from received to ready, and pays at the table. One deployment serves many restaurants, and each one sees only its own data.

What it does

  1. The guest scans the table's QR code and gets an anonymous session for that table: no account, no app to install. The menu comes in Italian, English or German, with allergen filters.
  2. An order reaches the kitchen in real time. The kitchen display is a board with four columns (new, confirmed, preparing, ready) fed over WebSocket, and every status change appears on the guest's phone straight away.
  3. Guests can call a waiter and ask for the bill from their phone. The bill can be paid by card through Stripe or split between several people.
  4. Managers see every table at a glance (free or occupied, open orders, running total), print QR codes, manage staff with four roles (kitchen, waiter, manager, admin) and follow revenue, top dishes and peak hours.
  5. Admins maintain the menu with translations per language and allergen tags. Changes reach guests through a cache that is invalidated per restaurant.

In numbers

  • 750+automated tests in CIpytest against real PostgreSQL and Redis, Vitest, Playwright end to end
  • 93 %backend test coverageCI fails the build below 90 %
  • 6–83 msmedian menu response under load50 concurrent users at 0.1 CPU, down from 0.7–1.4 s
  • 0 %failed menu requests under the same loaddown from about 3 %
  • 65+merged pull requests, each checked by CI
  • 7Architecture Decision Records
  • 30Gherkin scenarios describing how the product behaves
  • 3menu languages: Italian, English, German

Technical highlights

  1. Tenant isolation, learned the hard way.

    Multi-tenancy came after the core features were built, and a security review I ran found the gap this left: two billing endpoints did not check the restaurant, so a manager who knew another restaurant's session ID could read or create its bills. Every repository query is now scoped to the restaurant, and cross-tenant tests check that another restaurant's data answers with 404.

  2. Real time across several workers.

    WebSocket messages go through Redis Pub/Sub, so a guest connected to one worker still hears about an order handled by another. Every channel checks its token: the table channel accepts only the token of its own session, the kitchen channel only active staff. Connections are capped per IP and globally, and a heartbeat closes dead sockets.

  3. Payments that do not get lost.

    Stripe PaymentIntents with idempotency keys, so a retried request never charges twice. When processing a webhook fails, the event goes to a dead-letter queue in Redis and a scheduled worker retries it with exponential back-off; an admin API shows what is left and retries or discards it. Every billing action is written to an audit log.

  4. Load tests that changed the code.

    A k6 script runs the real guest flow with 50 concurrent users. It showed that the cached menu was still turned into objects, validated and serialized again on every request. Serving the cached bytes as they are, and letting requests wait for a free Redis connection instead of failing, brought the median from 0.7–1.4 s down to 6–83 ms at 0.1 CPU, with no failed requests.

  5. Bugs that only show up in a real setup.

    The daily report was emailed twice, because each of the two uvicorn workers started its own scheduler; a claim in Redis with SET NX now lets exactly one of them send it. The kitchen sometimes missed new orders, because the event was published before the order was committed; the commit now comes first, and a test checks the order of the two.

  6. Built to be operated.

    OpenTelemetry traces, Prometheus metrics with Grafana dashboards, structured logs and Sentry, from local development to staging. Every merge to main deploys to staging and runs a smoke test, and a deploy hook that answers without a real deploy ID now fails the pipeline. Production is a manual promotion of a tested staging build: prepared, and deliberately kept for the first paying restaurant.

Tech stack

  • Python 3.11
  • FastAPI
  • SQLAlchemy (async)
  • PostgreSQL
  • Alembic
  • Redis (Pub/Sub)
  • WebSocket
  • Angular 21
  • NgRx
  • TypeScript
  • Stripe
  • Docker
  • Pytest
  • Vitest
  • Playwright
  • OpenTelemetry
  • Prometheus
  • Grafana
  • Sentry
  • GitHub Actions
  • Render
  • Neon

The most useful lesson

A green test suite and a green pipeline did not mean the system worked. The most serious bugs only appeared on a real server: a Stripe webhook that answered 200 but never committed its write, two refresh tokens issued in the same second that came out identical, and a deploy hook that answered "Accepted" for three months while the staging site kept serving a build from July. Since then I check every change on staging by running the real flow, not only by reading CI.

What I learned

  • The tenant boundary belongs in the first migration. Adding it later meant touching almost every repository, and that is how the gap slipped in.
  • Measure first, then set targets. The first targets for coverage and image size came from a plan written before any code existed; the ones that held came from measurements.
  • Every free-tier limit is a date in the calendar. Render's free database expired after 30 days and took staging down; staging now runs on Neon, with a weekly keep-alive check.
  • Write decisions down while they are fresh. Seven ADRs explain why WebSocket instead of polling, why anonymous table sessions instead of guest accounts and why one Angular app for every role.

Screenshots

  • The guest's phone: the live status of two orders, one ready and one in preparation, and the menu switched to English with allergen tags
  • The kitchen display: orders from five tables across the four columns, with a note for the kitchen on two dishes
  • The manager's table overview: occupied and free tables, open orders and the running total per table
  • The admin menu editor: dishes with price, preparation time, allergens, availability and translations