API Deployment
The API is packaged as a Docker image and designed to run on AWS ECS Fargate, though any container runtime works.Building the Image
Running Locally
Pushing to ECR
ECS Fargate
The repository’s CI/CD pipeline (.github/workflows/) handles ECS deployment automatically on merge to main. For manual deployments:
- Push the image to ECR (above).
- Update the ECS service to use the new image revision:
Required IAM Permissions
The ECS task role needs:ses:SendEmail— for transactional emailecr:GetAuthorizationToken,ecr:BatchGetImage— to pull the image
Dashboard Deployment
The dashboard is a Vite-built SPA that can be hosted on any static file host.Building
apps/web/dist/.
S3 + CloudFront
index.html to support React Router client-side routing.
Vercel / Netlify
Both platforms support Vite out of the box:- Set the build command to
npm run build. - Set the publish directory to
dist. - Add your
VITE_*environment variables in the platform’s settings UI. - Configure rewrites so all paths resolve to
index.html(for React Router).
CI/CD Pipeline
The repository uses GitHub Actions. The pipeline:- Static checks — TypeScript compilation, ESLint
- Unit tests — Vitest
- API trace tests — Tusk Drift replay
- Deploy — Docker build → ECR push → ECS update (API) + S3 sync + CloudFront invalidation (dashboard)
develop. Production deployments require a PR from develop to main.
Required GitHub Secrets
| Secret | Description |
|---|---|
AWS_ACCOUNT_ID | AWS account ID |
AWS_ROLE_ARN | IAM role for OIDC federation |
ECR_REPOSITORY | ECR repository name |
ECS_CLUSTER | ECS cluster name |
ECS_SERVICE | ECS service name |
S3_BUCKET | Frontend S3 bucket name |
CLOUDFRONT_DISTRIBUTION_ID | CloudFront distribution ID |
AUTH0_DOMAIN | Auth0 tenant domain |
DATABASE_RO_URL | Read-only database URL |
DATABASE_RW_URL | Read-write database URL |
STRIPE_SECRET_KEY | Stripe secret key |
STRIPE_WEBHOOK_SECRET | Stripe webhook secret |
TUSK_API_KEY | Tusk Drift API key (for trace tests) |