Architecture
The authoritative architecture documentation lives in the repository next to the code:
- Architecture README and ADR index
- High-level design (HLD)
- Low-level designs — core platform, clinical operations, billing, platform admin, frontend
- Multi-tenant design — tenant isolation, request pipeline, data access
In one paragraph
A React/Vite PWA talks to one Express 5 API deployed as a Firebase Cloud Function (2nd gen) in asia-south1. All data
access goes through a tenant-scoped store (req.store) — Firestore rules deny all client access, so the backend is the
only data boundary. Shared clinical logic (template schema, validation, computed functions) lives in
backend/packages/clinical-core and is used by both frontend and backend. Workloads with a different resource profile
(PDF rendering) run on Cloud Run. Infrastructure is described in Terraform under infra/.
See ADRs for the reasoning behind each decision.