Restaurant Platform

Role: Solo developer. I designed and built both apps, the database schema, the tests, and the CI for both repos.

Code: restaurant-pos (Spring Boot POS and kitchen display) and waitlisted (Next.js guest kiosk and staff dashboard).

Design docs: kitchen latency measurement, payment plan (original draft; cash since built), kiosk implementation plan.

A POS and a guest kiosk sharing one database. Guests pre-order while they wait. When staff fire the order, it reaches the kitchen screen through a transactional outbox, Kafka, and a WebSocket push.

← All work

Problem

This started as a question. I work at a restaurant that runs Clover, and I wanted to know how hard it would be to build a replacement. restaurant-pos is the answer so far: orders, tables, PIN login, a kitchen display, and cash payments.

The second app came later. For a web development course (CPRG 306D), I built waitlisted, a host-stand kiosk where guests join the waitlist and build a pre-order from their phone while they wait. I wanted to try the pre-order idea, and the POS already had the menu, tables, and staff, so the kiosk is built on the POS database instead of its own.

That left the real design problem: two separate apps share one database, but only one of them should be allowed to change an order or a table.

Role

I built all of it alone, with no teammates. AI coding agents (Claude) wrote much of the code under my direction. I made the design decisions and decided what to build and what to merge. How that worked is below.

How I worked with AI

AI makes plausible code and plausible docs cheap. So the part I own is the direction and the checks.

Architecture

Guests and staff use waitlisted. waitlisted reads PostgreSQL through Prisma and keeps its own waitlist and pre-order rows there; for seating, table status, and orders it calls restaurant-pos. Inside restaurant-pos, the orders API writes the order change and an outbox row in one transaction and a relay publishes the row to Kafka. The KDS bridge, a Kafka consumer in the same Spring Boot app, consumes the event and pushes the order to the kitchen display over STOMP. Guest kiosk and phone Staff dashboard waitlistedNext.js PostgreSQLincl. outbox_events restaurant-pos · one Spring Boot app Orders API+ outbox relay KDS bridgeKafka consumer + STOMP Kafka Kitchen displayReact reads via Prisma writes: seat, table status, create, fire order + outbox row one transaction relay publishes consumes STOMP /topic/orders

Two apps share one PostgreSQL database. The Spring Boot POS owns the schema (Flyway) and the order state machine. The Next.js app reads the shared tables through Prisma and owns three tables of its own: waitlist_entries, pre_orders, and pre_order_items.

When staff fire a pre-order, the Next.js route asks the POS to create the order and then fire it. In the same database transaction as the fire, the POS writes an OrderFired row to its outbox. A relay publishes the row to Kafka. The KDS bridge, a Kafka consumer in the same Spring Boot app, reloads the order and pushes it over a STOMP topic on a WebSocket to the kitchen display. A browser cannot speak the Kafka protocol directly, so something server-side has to bridge the two.

Key Decisions

1. One database, one writer

2. A transactional outbox and Kafka in front of the kitchen display

3. WebSocket push to an authenticated kitchen screen

4. Seating and firing are separate, and firing needs the user’s PIN again

Results

The full path on my local Docker stack, on a fresh database (59 s, no sound). A guest joins the waitlist and pre-orders, staff seat the guest and fire with their PIN, the ticket appears on the kitchen display, and the cook marks an item preparing.

What is not done