MediCare Sync is a clinic management platform built around a single hard problem: appointment slots must never collide, even when several patients hit the booking endpoint at the same instant.

The system exposes 63 REST endpoints across 15 Prisma models and serves four distinct roles - patient, doctor, staff and admin - each with its own dashboard and permission surface. Authentication runs on JWT, layered with RBAC middleware, email verification and per-resource ownership checks so a patient can never read another patient's record.

The scheduling core is a dynamic slot-generation engine: instead of storing a fixed table of slots, it derives bookable times from each doctor's weekly availability, declared leave dates and configured slot duration, then applies server-side conflict detection at write time to prevent double-booking under concurrency.

On top of scheduling sit the clinical and commercial modules: an EMR with PDF prescription generation and authorised document uploads, automated invoice generation, Recharts revenue dashboards for admins, and node-cron jobs that fire appointment reminders.