MedQueue: WebSocket-Powered Patient Flow System
Built a 0-latency, synchronized queue system that keeps receptionists and waiting rooms perfectly in sync without page reloads
SA SAM FRANCISOverview
Clinic waiting rooms are often chaotic, relying on easily lost paper tokens and verbal announcements. This creates patient anxiety regarding wait times and a stressful environment for receptionists handling walk-ins and emergencies. MedQueue was built to digitize this flow, eliminating manual tracking and providing a synchronized, real-time connection between clinic staff, waiting room displays, and patient mobile devices to streamline operations and improve the healthcare experience. I started by mapping the state changes required for a patient's queue lifecycle (Waiting → Called → With Doctor → Completed). To guarantee seamless synchronization between the receptionist dashboard and the TV display, I chose Socket.IO for real-time WebSockets over traditional HTTP polling. For the frontend, React 19 and TailwindCSS allowed for rapid, responsive UI development. To prioritize architectural flow and real-time syncing during the hackathon time constraints, I implemented a custom file-based JSON storage system for the Node.js backend. Initially, handling duplicate patient entries was challenging with flat files, so I engineered a specific detection module in Express to flag active daily tokens before committing writes to the JSON history. Successfully delivered a fully functional, zero-latency queue management system. The application achieves instant state synchronization across the receptionist dashboard, a waiting room TV display, and mobile tracking portals without requiring any page reloads. The integrated analytics dashboard successfully visualizes average wait times and consultation metrics via Recharts, providing clinic staff with actionable end-of-day performance summaries and completely replacing manual paper systems While the file-based JSON storage was highly effective for a rapid hackathon build, it is not scalable for a high-traffic clinic environment. As I continue to develop my backend programming skills, I would replace the JSON storage with a robust database like PostgreSQL or MongoDB to handle concurrent writes and ensure long-term data integrity. Additionally, I would implement automated testing for the WebSocket events to ensure the real-time engine recovers gracefully from network drops