Smart Clinic
Overview
76% of India's clinics still run on paper token slips and shouting to call patients. There's no shared source of truth: the receptionist can't tell if the doctor is ready, the doctor has no patient context before they walk in, and waiting patients have no idea how long until their turn. That causes crowding, repeated "am I next?" questions, and stressed front desks. SmartClinic replaces all of this with three screens — receptionist, doctor, patient display — kept in perfect sync over WebSockets, so everyone sees the same live queue state with zero refreshing and zero shouting. Process The brief asked for a two-screen queue. I split it into three: receptionist (fast intake), doctor (one action + patient context), patient display (reassurance + privacy, no names shown). The doctor owns advancing the queue, not the receptionist, since the doctor always knows when they're ready. For sync, the server broadcasts full state on every change instead of diffs — harder to desync, since every screen renders an actual snapshot rather than merging deltas itself. I tried auto-promoting the next patient on "Finish," but rejected it: doctors need a buffer between patients, so "Finish" now requires an explicit "Call Next" click. I added busy-state guards client-side and re-validated everything server-side after testing two tabs firing the same action at once. Results No formal usability scores — this was solo-built and tested manually, not lab-tested. What I verified instead: ran all three screens open simultaneously (multiple tabs and devices) and confirmed zero desync. Specifically tested and fixed: the chime falsely firing on first page load, telling apart "nothing happened yet" vs "everyone's been seen" (both look like "no one being served"), double-clicks firing an action twice, and state surviving a server restart mid-queue. Result: a real, CORS-locked production deployment with working real-time sync, not just a local demo. Reflection Token numbers never reset or reuse gaps after a cancellation — fine for one day, but I'd need a cleaner reset strategy for continuous multi-day use. There's also no rate limit on how fast patients can be added, which would matter under real public traffic rather than a single front desk. With more time I'd add: multiple doctors/counters each with their own queue, a daily report (patients seen, fees collected, actual wait times), receptionist login/auth, SMS/WhatsApp alerts when a token is close, and a real database instead of a single JSON file once persistence needs grow.