Skip to main content

System Overview

A high-level view of how Starlight Practice's services connect.

Request flow

Diagram shows the target state

The dashed Lambda@Edge step on the docs path is not currently deployed. The docs site at docs.dev.starlightpractice.com and docs.starlightpractice.com is open right now — the Cognito-cookie auth gate ships in a follow-up PR that rides on the cookie-storage work landing in the admin-platform PR. This page documents the architecture once that gate is in place.

Stages

StagePurposeFrontend domainAPI domainDocs domain
devLocal laptop (npx sst dev)localhost:3000API Gateway URLlocalhost:3001 (no auth)
stagingShared remote dev environmentdev.starlightpractice.comapi.dev.starlightpractice.comdocs.dev.starlightpractice.com
prodProductionstarlightpractice.comapi.starlightpractice.comdocs.starlightpractice.com

Data isolation

Every tenant-scoped table carries a practice_id. Lambda handlers connect as the dedicated app_user PostgreSQL role — which has no BYPASSRLS — so row-level security policies are enforced for every query. See Multi-Tenancy for the full design.