QueueFlow
Replaced paper tokens and shouting with a live queue that updates on every patient's phone in <1 second — receptionist adds a patient in 8 seconds flat.
Overview
76% of India's 1.5 million neighbourhood clinics still run on paper token slips and shouting. Patients sit for 2–3 hours with zero visibility into when they'll be seen. Doctors have no dashboard. Receptionists hold the entire queue in their head — one distraction and the wrong token gets called. The pain is shared by three audiences (receptionist, patient, doctor) but no existing tool serves all three from one source of truth. I wanted to fix that with software a clinic could run on a laptop and a wall TV — no app install, no training. Process I started by mapping the three audiences and what each one fails at when the queue lives on paper: receptionists mis-call tokens, patients can't leave the room to grab chai, doctors sit idle between patients. That gave me three screens with one shared state — the core architectural constraint. I prototyped the receptionist flow first because it's the bottleneck: if registering a patient takes longer than 10 seconds, the whole system fails on a busy Monday. I stripped the form to name + age + complaint + one priority chip, made Enter submit it, and let the server auto-issue tokens as <doctor-prefix>-NN so the same number never collides across rooms. For live sync I chose Postgres + Supabase Realtime over raw WebSockets — the database becomes the source of truth, every screen subscribes to Results Registration time: ~45s on paper → 8s on QueueFlow (name + age + complaint + Enter). Patient-side latency: "Call Next" click → TV banner flip in <1 second, zero refresh. Wait estimate: hardcoded "10 min" → rolling avg of real consultations, per doctor. Concurrency: two receptionists, one token — FOR UPDATE SKIP LOCKED makes double-call mathematically impossible. Recovery: a TV unplugged mid-day catches up in one round trip via initial SELECT + Realtime replay. Four synchronised screens (receptionist, doctor, TV, patient phone) on one Postgres source of truth — no app install, runs on any clini Reflection I'd ship offline-first next. Right now a 10-second network blip on the receptionist's laptop drops the writes she made during that window — last-writer-wins is documented, not silent, but it's still a sharp edge in a clinic with patchy wifi. I'd queue mutations client-side with stable IDs and reconcile on reconnect. I'd also move from "broadcast full snapshots" to append-only events with a since rev catch-up API — cheaper bandwidth at scale, and it sets up multi-clinic / HA without rewriting the event shape. Finally, I'd add an SMS fallback for the patient view: not every patient in a tier-3