Slice Distributor is an operations tool for a fast-paced pizza pop-up. The current MVP connects a cashier-facing order queue to a reheat-station workflow, groups orders into oven batches, and keeps both views synchronized through Supabase Realtime.
Project status: scope-locked MVP focused on authenticated slice-order entry and reheat batching. Inventory, bake planning, product availability, full-pie orders, and operational analytics appear in an earlier product exploration, but are explicitly out of scope and are not planned features of this repository.
During service, staff need to turn a stream of slice orders into simple, capacity-aware oven instructions without losing order sequence. This project explores that workflow with a tablet-friendly interface and shared live state.
- Email/password authentication with Supabase
- Create, edit, filter, and delete slice orders
- Live order updates through Supabase Realtime
- Capacity-aware batching across two ovens
- Forward/backward reheat batch navigation
- Responsive UI with dark mode
- Multi-stage hardened container build using a non-root distroless runtime
- Frontend: Next.js 15 App Router, React 19, TypeScript, Tailwind CSS, shadcn/ui, React Hook Form, and Zod
- Backend: Supabase Auth, Postgres, Row Level Security, and Realtime
- Deployment: Next.js standalone output with Docker/Compose
The browser talks directly to Supabase using the public client key. Database Row Level Security restricts order access to authenticated users; the Next.js middleware also protects all operational pages.
flowchart LR
Cashier[Cashier / POS] -->|Creates slice orders| DB[(Supabase Postgres)]
DB -->|Realtime changes| POS[Live order backlog]
DB -->|Realtime changes| Reheat[Reheat station]
Reheat -->|Builds FIFO batches| Ovens[Two 8-slice ovens]
Reheat -->|Marks batch processed| DB
- Translating a time-sensitive operational workflow into a focused interface
- Separating deterministic domain logic from React and database concerns
- Handling concurrent order-number allocation transactionally in Postgres
- Synchronizing multiple operator screens with Realtime events
- Applying authentication, Row Level Security, validation, tests, CI, and hardened containers
The MVP uses a deliberately shared operator role: every authenticated event staff member can create, update, process, and delete orders. Destructive bulk deletion requires confirmation. Fine-grained cashier and reheat-station roles are outside this repository's scope and should be added before adapting the project to an untrusted multi-tenant environment.
Prerequisites: Node.js 22, npm, and a Supabase project.
-
Clone the repository and enter the application directory:
git clone https://github.com/Voidcake/slice-distributor.git cd slice-distributor -
Install dependencies with
npm ci. -
Copy
.env.exampleto.env.localand add your Supabase project values. -
Apply the SQL files in
supabase/migrationsin filename order. Enable Realtime forpublic.ordersif needed. -
Run
npm run devand open http://localhost:3000.
- Sign in and open the POS station.
- Create several orders with up to 16 total slices each.
- Open the Reheat Station in a second browser window.
- Start from the first order number and inspect the generated two-oven layout.
- Complete a batch and watch both stations update in real time.
- Use Previous or Reset Reheat Station to demonstrate recovery controls.
With Node.js 22:
npm test
npm run typecheck
npm run buildOr run the same clean pipeline without installing Node.js on the host:
docker compose -f compose.validate.yml run --rm validateThe validation service mounts the repository read-only, installs dependencies into a temporary in-container filesystem, disables telemetry, and removes the container when finished. Docker's downloaded base image and build cache remain managed by Docker Desktop.
The hardened deployment choices are documented in doc/container-hardening.md.
docker compose -f compose.hardened.yml up --buildThis repository intentionally demonstrates one focused workflow: accepting slice orders and distributing them into reheat batches. doc/requirements.md is retained as historical product exploration. Its broader features are neither implemented nor on this project's roadmap.
Remaining work is limited to reliability, tests, maintainability, accessibility, and presentation quality. See the engineering audit.
Built by Voidcake.


