Skip to content

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

LayerWhat
HTTP APIECS Fargate + ALB (us-east-1)
AsyncLambda triggered by SQS (+ DLQ each)
StoragePrivate S3 bucket, presigned uploads
SecretsSST sst.Secret per stage (dev / production)
WebCloudflare Workers + static assets
DataMongoDB Atlas (external)

Stages

StageAPI host (typical)Web origin (typical)
devdevelop-api.sophia.cleverhire.aidevelop.sophia.cleverhire.ai
productionapi.sophia.cleverhire.aisophia.cleverhire.ai

Production stack uses retain + protect; non-prod resources can be removed with the stage.

Scripts

  • pnpm deploy:dev / deploy:prod — SST deploy
  • pnpm diff:dev / diff:prod — preview changes
  • pnpm secret:load:dev / secret:load:prod — load secrets from .env.dev / .env.prod
  • pnpm smoke — post-deploy API checks

Further reading: infrastructure.md · deployment.md

Sophia AI Interview Platform — Internal Documentation