sst.config.ts is the provider/app entrypoint. It dynamically imports the stack/deployStack()
facade because SST initializes providers before it evaluates the resource graph.
The intended declaration order is stable:
- foundation: VPC, database, Redis, storage, cluster, and shared IAM setup
- observability: OpenTelemetry into ClickHouse
- mail: the verified SES sender the API's invitations go out through
- API: the control-plane API and its artifact selection
- edge: Proxy, CDN, DNS, and routing
- runners: protected EC2 Runner instances, registration, and in-place binary updates
Operational code is grouped separately:
deployment/: guarded SST execution, scope, config, and post-deploy verificationartifacts/: API and Runner artifact identity, publication, and preflightrunner/: inventory, state baselines, registration, and rolling updatesbootstrap/: AWS/GitHub/Auth0 provisioning and loginshared/: dependency-free utilities shared across domainspolicies/runner/: mandatory Pulumi Runner safety policy
Factories use ordinary functions and pass typed resource interfaces between layers. They do not
introduce Pulumi ComponentResource parents, so existing parent hierarchies and URNs remain stable.