[01] Case study · CRM · Clinic management

Special Hospital: a hospital management system

Appointments, staff and patient records for an Ayurvedic clinic group, with a booking engine that cannot double-book.

Role
Software developer at Tests & Funnels. I built the data model, the booking engine, the API and the dashboards.
Industry
Healthcare
Stack
React 19, TypeScript, Node.js, Express 5, MongoDB, JWT
Live
Open the live demo (new tab)
Special Hospital admin dashboard listing clinics in Nashik, Pune and Mumbai with booking slots, built by Shiv Sagar Kumar Sinha, full stack MERN developer
Special Hospital admin dashboard listing clinics in Nashik, Pune and Mumbai with booking slots

01The problem

An Ayurvedic clinic group needed appointments, staff and patient records in one place, without two patients ever landing in the same slot.

02What it had to do

  • One system for appointments, staff and patient records across clinics.
  • A slot can never be booked twice, even when two requests arrive at the same moment.
  • Every role sees only its own dashboard and data.
  • Clinic owners see live operational metrics.

03What I built

Booking, patient records and five role-specific dashboards with real-time metrics for clinic owners.

04Architecture

  1. FrontendReact 19 + TypeScriptRole-aware routing with route guards per dashboard.
  2. APINode.js + Express 5REST API with JWT authentication and authorisation middleware.
  3. DataMongoDBBooking documents with TTL holds; 8+ aggregation pipelines for metrics.

05Engineering decisions

  1. 01Double-booking engine

    Challenge
    Two people can ask for the same slot at the same instant. A "check, then save" flow lets both through.
    Decision
    Booking runs as an atomic three-phase optimistic-locking flow in MongoDB, with TTL holds on slots.
    Why
    Correct under concurrency without a global lock, and a hold that is abandoned expires on its own.
  2. 02Five isolated dashboards

    Challenge
    Different staff roles must never see each other’s data or actions.
    Decision
    Five role dashboards secured with JWT sessions, server middleware and client route guards.
    Why
    Access is enforced on the server for every request; hiding a button is never the security.
  3. 03Metrics in the database

    Challenge
    Owners need live numbers without exporting spreadsheets.
    Decision
    Designed 8+ MongoDB aggregation pipelines that compute the metrics where the data lives.
    Why
    One query per metric instead of shipping raw records to the browser.

06Security

  • JWT sessions
  • Authorisation middleware on every API route
  • Route guards per role in the UI

07Outcome

  • Five isolated role dashboards
  • 8+ aggregation pipelines for real-time metrics
  • Double booking prevented at the database level
  • Live demo on Vercel

Want this kind of engineering on your team?