Skip to main content

Tech Stack

Authoritative as of late April 2026. This page supersedes Deepak's 12-card POC tech stack from the launch briefing. The synthesis is Victor's — "we already have most of this working in the Starlight repo, the popular boring stacks are interchangeable, the main thing is going with battle-tested solutions." Nao's alternative recommendations are kept as an appendix.

The stack

What's already in the Starlight repo (keep)

LayerChoiceNotes
DatabasePostgres + Drizzle ORM14 numbered SQL migrations, multi-tenancy via practice_id, RLS enforced via dedicated app_user role, soft-delete, pricing tiers
InfraAWS via SSTAcross dev / staging / prod. Single infra tree, no second provider
Frontend frameworkNext 16 + React 19App Router, server components, OpenNext
UIMUI + Tailwind + Apexcharts + TanStack TableMaterio template baseline; not strictly opinionated against shadcn/etc — just what's already wired
Backend runtimeAWS Lambda (clean architecture)Domain → application → infrastructure → entrypoints. Behind API Gateway v2
AuthCognito + Google + B4M OAuthUserPool with hosted UI, JWT authorizer on the API Gateway

What we'll add as we need it

WhenChoiceReason
Membership billingStripeStandard pick. Setup Intent flow already in Deepak's onboarding mock
SMS / phoneTwilioStandard pick
AI scribe + parent summariesClaude + WhisperRuns on Lambda, no extra infra. Anthropic SDK + OpenAI Whisper for transcription
MobileExpoSolid reputation, popular, fits parent app. Victor hasn't shipped on Expo personally (last mobile was Capacitor for B4M) but no objections
eRxDoseSpotDefault for small practices
Telehealth videoLiveKitWhen we get there. No objections
Lab/imaging integrationsHealth GorillaWhen we get there
Compliance automationVantaWhen we hit HIPAA pilot

Where this differs from Deepak's POC stack

Deepak's original 12-card stack listed: Postgres+Drizzle · Next 15 · Clerk · Expo · DoseSpot · Stripe · Twilio · LiveKit · Claude+Whisper · Health Gorilla · Vanta · AWS+Vercel.

Two material differences:

1. Auth: Cognito (with Google + B4M OAuth) instead of Clerk

CognitoClerk
Already wired✓ (current Starlight UserPool, IdP federations, hosted UI)(would need to replace)
Pricing modelPay per MAU above free tier (50k free)Pay per MAU
HIPAA-eligibilityAWS BAA covers itClerk's HIPAA add-on is enterprise-tier
ControlFull control over flows + claims (used for the starlight-admin group gate)Managed

We're keeping Cognito.

2. Hosting: AWS-only via SST instead of AWS + Vercel

For a HIPAA-eligible workload, AWS-only feels more production-ready: HIPAA-eligible services across the board, fine-grained IAM, RDS, VPC isolation, single bill, single audit surface. SST gives us the DX we'd otherwise want from Vercel without splitting the infra tree across two providers. We're keeping AWS-only.

Where this differs from Nao's alternative

Nao recommended a different shape: Tanstack Start (frontend) · Hono + tRPC (backend) · SST · Postgres + Drizzle · Expo · pnpm + Turborepo.

Three deltas vs. what we're shipping:

LayerNaoOursWhy ours
Frontend frameworkTanstack StartNext 16Already wired, App Router/RSC working, OpenNext deploy is solid
Backend RPC layerHono + tRPCLambda handlers behind API Gateway JWTClean architecture already in place, no need for an extra abstraction
Monorepopnpm + Turborepopnpm workspaces (no Turbo)Pipeline is simple enough; we can add Turborepo when build orchestration becomes a real cost

The principle Victor and Nao both endorsed: popular boring stacks are interchangeable at this level — Next vs Tanstack Start, Cognito vs Clerk, Hono vs Lambda, MUI vs shadcn. None of these is the thing that'll make or break the product, especially with AI making code generation as fast and cheap as it is now. The main thing is battle-tested. Everything we're using qualifies.

Decision

Tech stack as per Nao, Victor, Ken — Erik, decision #3.

Tracking back to first principles: keep what's working, add Stripe + Twilio + Claude/Whisper + Expo first, layer in DoseSpot · LiveKit · Health Gorilla · Vanta as the roadmap demands, don't replatform.

Appendix A — Deepak's original POC stack (superseded)

12-card opinionated stack from the launch briefing:

Postgres + Drizzle · Next 15 · Clerk · Expo · DoseSpot · Stripe · Twilio · LiveKit · Claude + Whisper · Health Gorilla · Vanta · AWS + Vercel

Areas of agreement: Postgres + Drizzle, Expo, DoseSpot, Stripe, Twilio, LiveKit, Claude + Whisper, Health Gorilla, Vanta, AWS.

Resolved differently above: Clerk → Cognito; AWS + Vercel → AWS-only via SST; Next 15 → Next 16 (which is what's already in our repo).

Appendix B — Nao's alternative stack (not adopted)

Frontend — Tanstack Start Backend — Hono + tRPC Infra — SST DB — Postgres + Drizzle Mobile — Expo Monorepo — pnpm + Turborepo

Adopted: SST, Postgres + Drizzle, Expo, pnpm. Not adopted: Tanstack Start, Hono + tRPC, Turborepo — all good choices but switching cost not justified by the upside given we already have working equivalents.