Phase 1 of 7
Local Development Environment
Run a baseline multi-container TaskFlow stack locally with repeatable startup behavior and end-to-end task management working through the UI.
Overview
Stand up the full local development stack: API, frontend, Postgres, and Redis. The API should expose REST endpoints for tasks and health. The frontend should support creating, listing, and completing tasks. Both services must be containerised with multi-stage Dockerfiles and wired together in a Compose file. This is the foundation everything else builds on — no phase advances without a working, repeatable local environment.
What to build
Deliverables
Advance only when these outputs exist in your code or compose definitions.
- REST API with endpoints: GET /health, GET /api/tasks, POST /api/tasks, PATCH /api/tasks/:id, DELETE /api/tasks/:id
- Frontend with task list view, create task form, and mark-complete action
- Multi-stage Dockerfile for the API (build stage + slim runtime stage)
- Multi-stage Dockerfile for the frontend (build stage + nginx or node serve stage)
- docker-compose.dev.yml wiring api, frontend, db (postgres:16-alpine), and redis (redis:7-alpine)
- .env.example listing every required environment variable with placeholder values
- README section describing how to clone, configure, and start the stack
Done when
Success criteria
These are acceptance indicators, not a checklist to start from.
- docker compose -f docker-compose.dev.yml up -d starts all four services without errors
- All services show as healthy or running in docker compose ps within 30 seconds
- GET http://localhost:8000/health returns HTTP 200 with a JSON body
- POST /api/tasks creates a task; GET /api/tasks returns it; the frontend reflects the change
- Stopping and restarting the stack with docker compose down && docker compose up -d preserves all task data
- No plaintext secrets appear in docker-compose.dev.yml or any committed file
- Both API and frontend containers restart automatically if they crash
Verification
Testing and validation
Run these in order. Confirm each result before moving to the next step.
-
docker compose -f docker-compose.dev.yml up -d— all four containers should start
-
docker compose ps— confirm api, frontend, db, and redis are all Up or healthy
-
curl http://localhost:8000/health— expect HTTP 200 and a JSON response with status ok
-
curl http://localhost:8000/api/tasks— expect HTTP 200 and an empty array on a fresh start
-
curl -X POST http://localhost:8000/api/tasks -H 'Content-Type: application/json' -d '{"title":"Test task","description":"From capstone phase 1"}'— expect HTTP 201 and a task object with an id
-
Open http://localhost:3000 in a browser and confirm the task you just created appears in the list -
Mark the task as complete in the UI and confirm the UI updates without a page reload
-
docker compose down && docker compose up -d— confirm the task you created still exists after restart