Vinit Raj Singh
Featured project
Queue Cure: real-time clinic queue system
76% of India's 1.5 million clinics still run on paper tokens and shouting. Patients wait 2 to 3 hours with no idea when they will be called, doctors have no live view, and receptionists run it all from memory. I set out to fix the visibility gap: when the receptionist calls the next token, every screen updates instantly with zero refresh, and patients get a wait estimate they can trust. The hard part is keeping the receptionist screen, the waiting hall TV, and each patient's phone in sync under double clicks, dropped wifi, and restarts. Process I decided the rules before writing code, because sync bugs come from architecture, not styling. Two rules drove everything: every queue change ends by calling one broadcast function so all screens read one source of truth, and no operation reads then writes the queue, it uses a single atomic database update so two actions cannot collide. Wait time is never hardcoded. It comes from a moving average of real consultation durations, so it sharpens through the day with a confidence level. What broke first taught me most: my Call Next passed until a test fired two clicks at once and the queue advanced twice. I fixed it with an atomic, self expiring lock so a double click advances exactly once. Results The core goal works: click Call Next on the receptionist screen and the waiting hall TV plus every patient phone update in the same instant, no refresh, proven across separate tabs. I verified all 10 edge cases live, including a double click advancing exactly once, the queue surviving a hard server restart, and clients resyncing after a dropped connection. Backend covered by 11 unit and 15 integration tests, all passing. Wait estimates measurably sharpen as real consultation data builds up. Reflection Undo is single level and lives in server memory, so it does not survive a restart. I would move it to a short lived database record for durability. The wait model uses one clinic wide average; per doctor or per category averages would be more accurate. I would also add real auth instead of open access, and automated browser tests for the UI, since my testing focused on the socket and database layer. Finally, the free hosting tier sleeps when idle, which I would replace for a real deployment.