Summary
A queue management app that organizes queues by period. Each period holds its own queue, and staff update it from a single screen. The code is not linked from this page, so this covers the product and the system design.
Context and constraints
Queues run per period, such as per day or per service session. Each period needs its own list, and the status of each number changes throughout the day. For a small internal tool like this, the backend requirement is thin: read, write, and stay current in real time.
Architecture
Two lightweight React frontends (staff console and public display) talk directly to Supabase. The database holds periods, queues, numbers, and status. Realtime subscriptions push every change to all open clients instantly. Auth and Row Level Security enforce who can write versus who can only view.
Features
Period-based queues. Create and open a period (day, shift, session). Each period owns an independent queue with its own numbering.
Number management. Add, remove, and reorder numbers within the active period. Bulk actions for common operations.
Status lifecycle. Each number moves through a clear status flow: waiting -> called -> serving -> completed (or skipped / no-show).
Staff console. One screen to call the next number, skip, complete, reorder, and manage the queue in real time.
Public display. A read-only screen that auto-refreshes via realtime, showing the current number, recent calls, and estimated wait time.
Realtime sync. Every change (call, skip, complete, reorder, new number) broadcasts to all connected clients in sub-second latency.
Access control. Staff authenticate and get full read-write on their periods. Public displays use a read-only role enforced by Row Level Security.
Static deploy. The app builds to static assets served from Vercel. No application server to maintain.
Data flow
Staff open the active period in the console. Adding or updating a number writes to Postgres; the realtime channel pushes the change to the console and all public displays instantly. The display never polls; it subscribes.
Design decisions
Supabase instead of a custom server. For a small internal tool, a separate backend adds operational weight without benefit. Supabase removes that need and keeps the deploy simple.
Frontend holds the whole app. With a managed data layer and realtime, the app is just a static build.
Realtime over polling. Sub-second updates matter on a queue display; Supabase realtime delivers that without custom WebSocket infrastructure.
Status
Live and used to manage queues per period.