Dental Platform · Internal Docs
Architecture

Architecture

How the platform is put together — services, data plane, trust boundaries, and the decisions behind them.

Owner: Platform EngineeringLast reviewed:

The platform is a set of BFF-style Next.js apps in front of a Go modular monolith (core-api) with focused satellite services, all running on a Canadian-hosted RKE2 cluster. Async work flows through NATS JetStream; AI calls leave the cluster only through the single ai-gateway.

Pages in this section

Ground rules worth memorizing

  • Only ai-gateway may call OpenAI (store: false, gated by AI_PHI_MODE) — never core-api, never a browser.
  • Tenant isolation is enforced in PostgreSQL with row-level security, not just application code.
  • Transcripts, notes, plans, templates, and documents are immutably versioned; approvals and audit events form a hash chain.
  • Browsers never hold tokens: the Next.js apps keep encrypted HttpOnly session cookies and attach access tokens server-side.

On this page