Infrastructure overview
Two pipelines: AWS (SST v4) for API, workers, queues, and storage; Cloudflare for the static web app (not in SST state).
flowchart TB Users["Browsers"] --> CF["Cloudflare Workers · SPA"] Users --> ALB["ALB · HTTPS"] ALB --> API["ECS Fargate · Hono"] API --> Mongo[(MongoDB Atlas)] API --> S3["S3 resumes"] API --> SQS["SQS queues"] SQS --> Lambda["Lambda subscribers"] Lambda --> Mongo Lambda --> S3 CF -->|"VITE_API_BASE_URL"| ALB
Components
| Layer | What |
|---|---|
| HTTP API | ECS Fargate + ALB (us-east-1) |
| Async | Lambda triggered by SQS (+ DLQ each) |
| Storage | Private S3 bucket, presigned uploads |
| Secrets | SST sst.Secret per stage (dev / production) |
| Web | Cloudflare Workers + static assets |
| Data | MongoDB Atlas (external) |
Stages
| Stage | API host (typical) | Web origin (typical) |
|---|---|---|
dev | develop-api.sophia.cleverhire.ai | develop.sophia.cleverhire.ai |
production | api.sophia.cleverhire.ai | sophia.cleverhire.ai |
Production stack uses retain + protect; non-prod resources can be removed with the stage.
Scripts
pnpm deploy:dev/deploy:prod— SST deploypnpm diff:dev/diff:prod— preview changespnpm secret:load:dev/secret:load:prod— load secrets from.env.dev/.env.prodpnpm smoke— post-deploy API checks
Further reading: infrastructure.md · deployment.md