Monorepo for Immich Cloudflare Workers (backend-only/API services).
apps/
├── hello/ # Hello world example worker
├── datasets/ # Datasets API worker
└── .../ # Other worker applications
deployment/
├── modules/ # Terraform modules
└── terragrunt/ # Terragrunt configurations
src/
└── lib/ # Shared libraries and utilities
npm installcd apps/<worker-name>
npm install
npm run dev # Start development server
npm run test # Run tests
npm run build # Build for production
npm run deploy # Deploy to Cloudflarenpm run lint # Lint all workers
npm run format # Check formatting
npm run test # Run all tests
npm run typecheck # Type-check all workerscd apps/<worker-name>
npm run deploycd deployment/terragrunt/<environment>/<worker-name>
terragrunt plan
terragrunt apply- Create directory:
apps/<worker-name>/ - Add
package.json,wrangler.toml,tsconfig.json - Create source in
src/index.ts - Add terraform module in
deployment/modules/cloudflare/workers/<worker-name>/ - Add terragrunt config in
deployment/terragrunt/
Workers use .dev.vars for local development and Cloudflare secrets for production.
Example .dev.vars:
MY_SECRET=secret_value
API_KEY=test_key