What It Is

Sai Shraddha HMS, also called SSH Clinic, is a hospital management system built by ATFRO for a clinic client. The goal is a production-grade system for clinics that need real-time queuing, native mobile interfaces for patients, and reactive web panels for the staff who run the day.

I am sharing the technical shape of the project here. Patient data, credentials and client records are private and are not part of this write-up.

The Problem a Clinic Queue Has

In a busy clinic the queue is the product. Patients want to know when they are next. Receptionists need to move people between doctors. Doctors need to see who is waiting without refreshing a page. A queue that updates a minute late creates crowding at the front desk, so the design starts with instant updates.

Four Modules, One Workspace

The repository is organised as a clean multi-module workspace so each part can change without touching the others:

  • api/ is a Fastify server in strict TypeScript. It holds the REST APIs and the queue engine.
  • web/ is a Next.js 14 portal with the App Router and React Server Components. Doctors and receptionists use its dashboards.
  • mobile/ is an Expo SDK 54 app for patients and staff, written for native execution with React Native.
  • supabase/ holds the migrations, SQL schemas and realtime triggers for the PostgreSQL database.
Architecture diagram of Sai Shraddha HMS showing the Fastify API, Next.js web portal, Expo mobile app and Supabase database
The four modules of Sai Shraddha HMS.

Real-Time Queue Updates

Queue status is pushed rather than polled. The database broadcasts changes through Supabase Postgres Changes, a change data capture channel, so a status update reaches every connected screen instantly. That keeps the patient app, the reception panel and the doctor view looking at the same queue.

The Mobile App

The patient and staff app uses Expo Router v3 for file-based navigation and NativeWind v4, which brings Tailwind-style styling to React Native. State lives in Zustand with persistent storage, so the app opens with its last known state while it reconnects. Animations use React Native Reanimated and SVG modules.

The Staff Web Portal

The web portal uses Next.js 14 with Tailwind CSS and a custom colour palette in slate and blue. Zustand handles client state and Axios calls the API. Doctors and receptionists get different dashboards from the same codebase.

Security and Access

Sign-in uses Supabase Auth with phone-based password login and identity linking. The API verifies Supabase JWTs before it allows database writes. In the mobile app, the patient, doctor and staff areas sit behind Expo Router's Stack.Protected guards, so a signed-out user cannot reach a protected screen. When the session ends, the app returns to the public landing screen.

What I Learned

Three points came out of this build. Keep the queue logic in one place on the server. Let the database broadcast changes instead of writing your own sync. And separate the roles in the navigation tree, not only in the API.