Deployment
GitHub Actions secrets
Set these repository secrets before deploying to main:
ADMIN_USERNAMEADMIN_PASSWORDAUTH_JWT_SECRET(at least 32 random characters; keep stable across releases)GEMINI_API_KEYCLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION
The deployment workflow passes administrator and signing secrets to SAM as no-echo parameters. Never put them in NEXT_PUBLIC_* variables.
AWS/SES prerequisites
Install AWS CLI and SAM CLI for manual deployments. Configure a verified SES sender as SES_FROM_EMAIL. SES sandbox mode only permits verified recipient addresses; request production sending access for public signup and password-reset emails. The API Lambda role can send email. Keep AUTH_JWT_SECRET unchanged to preserve existing sessions.
Manual API deployment
cd apps/api
npm run build
sam build
sam deploy --guided
Supply GeminiApiKey, AdminUsername, AdminPassword, and AuthJwtSecret securely. Do not paste credentials into source files or command history.
The GitHub workflow deploys the API, then the user web app, admin app, and Docusaurus site to their configured Cloudflare Pages projects. Attach custom domains in Cloudflare Pages after successful project deployment.