Two supported ways to run CarePlan: local Docker Compose, and a short-lived AWS practice stack via Terraform.
| Environment | Needs |
|---|---|
| Local / Docker | Docker Desktop (or Compose), optional Python 3.x for non-Docker runs |
| Next.js product UI | Node.js 22 and npm |
| LLM (Gemini / Vertex) | GCP project, ADC via gcloud auth application-default login, .env with GCP_PROJECT / GCP_LOCATION |
| AWS practice | AWS CLI credentials, Terraform ≥ 1.5, password for RDS |
From the repository root:
docker compose up --buildServices:
| Service | Role | Host ports |
|---|---|---|
web |
Django | 8000 |
worker |
Celery | — |
postgres |
Database | 5432 |
redis |
Celery broker | 6379 |
Open http://127.0.0.1:8000/.
The same Compose command also starts the frontend service. Open http://127.0.0.1:3000/ for the Next.js product interface. Inside Compose, DJANGO_API_BASE_URL is http://web:8000.
Start Django on port 8000, then run:
cd web
cp .env.example .env.local
npm ci
npm run devThe UI runs at http://127.0.0.1:3000/. Its server-only DJANGO_API_BASE_URL defaults to http://127.0.0.1:8000; it is not exposed to browser JavaScript.
Optional monitoring profile (Prometheus / Grafana) is documented in Compose; enable only when needed.
See the Local Run section in README.md: install requirements.txt, set POSTGRES_*, migrate, runserver, and start a Celery worker in a second terminal. PostgreSQL and Redis must already be available.
docker compose downAdd -v only if you intend to wipe local database volumes.
Infrastructure lives in infra/practice/ (API Gateway, three Lambdas, SQS + DLQ, RDS). This is a learning / validation stack, not a production account layout.
cd infra/practice
$env:TF_VAR_db_password = "YourStrongPassword1"
terraform init # first time only
terraform plan
terraform applyUseful outputs after apply:
api_gateway_endpoint/api_post_orders_urlqueue_url,rds_endpoint- Lambda function names
Example smoke calls (PowerShell: use curl.exe, not the curl alias):
curl.exe -X POST https://<api-id>.execute-api.us-east-1.amazonaws.com/orders
curl.exe https://<api-id>.execute-api.us-east-1.amazonaws.com/orders/123cd infra/practice
$env:TF_VAR_db_password = "YourStrongPassword1"
terraform destroyCloud resources are created only for testing and destroyed afterward to minimize AWS cost. Leaving RDS and related resources running will incur charges.
- Terraform state under
infra/practice/is local and gitignored; do not commit*.tfstate. - Lambda packages in this practice module currently use stub handlers under
runtimes/aws/stubs/; wiring (IAM, event source, routes, env vars) is what Terraform validates end to end. - RDS password is supplied only via
TF_VAR_db_password— never commit secrets.
Pull requests run tests via GitHub Actions (see .github/workflows/). CI does not apply Terraform or create AWS resources.