All work
Healthtech platform

CNC Trust Medical Institute

End-to-end patient lifecycle in a single Next.js app — registration → invoice → feedback.

~50
REST endpoints
All
Audit-tracked tables
8
Operational modules
Patient registrations — searchable records with investigations, referring doctor, and billing.
Patient registrations — searchable records with investigations, referring doctor, and billing.
The brief

CNC Trust Medical Institute is a diagnostics and radiology clinic in Chandigarh. Their operations — patient registration, investigation pricing, invoicing, receipts, financial reconciliation — were scattered across paper and spreadsheets. We built a complete clinic operations platform that handles the full patient lifecycle in one place, with audit trails and soft deletes that make their data trustworthy enough to base business decisions on.

What we built

Patient registration with mobile search, investigation catalog with dynamic pricing, invoice + receipt workflow with discounts and approvals, financial dashboards, expense and clinic-cash ledgers, vendor invoicing, inventory tracking, feedback collection with token-based forms, and dedicated print routes for slips, consent forms, and receipts.

Why it works

Clinics live or die on defensible records. When a patient disputes a bill, an insurer audits a claim, or a doctor asks "when did this change?" — the answer has to land in seconds, not days. Every edit, every deletion, every price change in the system writes itself to a single audit trail with who did it, when, and what the value was before. Nothing is ever truly lost — historical rows are preserved, just filtered from view. The result is a platform where operators stop second-guessing their own numbers, because the system itself can prove where each one came from.

Operations dashboard — daily throughput with a financial overview and expense breakdown.
Operations dashboard — daily throughput with a financial overview and expense breakdown.
Architecture

How it's built

  • 01Postgres trigger-based audit_logs table capturing changed_data, changed_by, and changed_at on every mutation across the system.
  • 02Soft-delete patterns on patients, expenses, and registrations (is_deleted/deleted_at) to preserve history while hiding inactive records.
  • 03Automated payment-sync triggers keep vendor invoice status in lockstep with expense payments — no manual reconciliation drift.
  • 04Server-side Supabase auth in middleware with role hydration before render — no flash of wrong-state content.
  • 05~50 RESTful API endpoints with consistent error shapes; Vercel-deployed with Speed Insights.
Stack
Next.js 15TypeScriptSupabasePostgres triggersTailwind v4RechartsVercel
Outcomes
01

Replaced spreadsheets and paper with a single source of truth for patient, financial, and inventory data.

02

Audit-grade data discipline (triggers + soft deletes) without burdening operators with extra steps.

03

End-to-end coverage: registration → investigation → invoice → receipt → feedback in one Next.js app.

Want something like this?

Let's talk for 25 minutes. No pitch.