Technology Stack
The stack, infrastructure, DevOps, performance, availability and security commitments the SynQ platform runs on. Every external integration sits behind an interface — no application file imports a vendor SDK directly.
Next.js (PWA-first) · TypeScript · Tailwind CSS · optimistic UI
One installable PWA covers web and Android from a single codebase — no parallel native track for the MVP. Tailwind keeps payloads small and mobile-first, TypeScript shares types with the API across the monorepo, and optimistic UI keeps the 30-second flow feeling instant on patchy 4G and mid-range Android devices. A native shell is only considered if push delivery of booking confirmations proves unreliable as a PWA.
Node.js (Fastify) or Python (FastAPI) on Cloud Run · adapter packages · Cloud Tasks
A stateless API on Cloud Run scales to zero, which keeps MVP burn near nothing between clinic hours. Language is the developer's call — whichever ships faster — because every external rail (ABDM, WhatsApp, Transport, Explanation, CareRouter) sits behind an adapter package, so the framework choice never leaks into business logic. Cloud Tasks carries the async ingestion queue for the parsing engine.
Cloud SQL (PostgreSQL 15+) · Prisma / SQLAlchemy migrations · Memorystore (Redis)
Relational from day one because the moat is the data model, not the screens: Org + Branch multi-tenancy, a stateful patient timeline, row-level security and append-only audit logging all need Postgres semantics. Schema-as-code migrations keep environments reproducible; Redis holds clinic queue counts and hot reads.
WhatsApp deeplink (wa.me) · Ola / Rapido deep links · ABDM via Eka.care (stubbed) · Claude API (Phase 2)
The MVP ships with zero vendor contracts: booking rides on a wa.me deeplink, transport on partner deep links with the address pre-filled. ABDM and the explanation layer exist as interfaces with StubAdapters, so switching to Eka.care or turning on Claude is a single-file change rather than a re-architecture.
Google Cloud Platform — asia-south1 (Mumbai), provisioned with Terraform
Data residency is not negotiable: DPDPA and ABDM require Indian-region storage, so every service, bucket and database lives in asia-south1. Terraform under /infra makes the whole project reproducible, and Secret Manager keeps credentials out of environment files.
Firebase Auth (Phone OTP) · Postgres row-level security · role-scoped APIs
Phone OTP is the lowest-friction identity for Indian patients and needs no password recovery flow. Authorisation is enforced in the database with row-level security rather than in application code, so a missed check in a handler cannot leak another clinic's rows.
Event capture tables · patient timeline model · FHIR R4 mapping · derived analytics views
Every analytical column exists from day one, even if nullable, because the compounding asset is real inquiry, pricing and outcome data. FHIR R4 mapping is applied at the verification gate before storage, and derived views power price intelligence, demand heatmaps and clinic performance without a separate warehouse in the MVP.
The adapter rule
Application code imports the service, never the implementation. Switching the ABDM provider, the WhatsApp rail, the transport partner or the explanation engine is a single-file change, because each one is a package that exports only its interface and a default-wired instance.