# Tasks: add-project-health-dashboard ## Phase 1: Backend - Database & Model - [x] 1.1 Create ProjectHealth model (`backend/app/models/project_health.py`) - [x] 1.2 Create Alembic migration for `pjctrl_project_health` table - [x] 1.3 Create ProjectHealth schemas (`backend/app/schemas/project_health.py`) ## Phase 2: Backend - Service & API - [x] 2.1 Create HealthService class (`backend/app/services/health_service.py`) - Calculate risk score based on overdue/blocked tasks - Aggregate project statistics - [x] 2.2 Create health router (`backend/app/api/health/router.py`) - [x] 2.3 Implement `GET /api/projects/health` - List all projects health - [x] 2.4 Implement `GET /api/projects/{id}/health` - Single project health - [x] 2.5 Register health router in main.py ## Phase 3: Backend - Testing - [x] 3.1 Unit tests for HealthService - [x] 3.2 API endpoint tests ## Phase 4: Frontend - UI Components - [x] 4.1 Create ProjectHealthPage.tsx - [x] 4.2 Create ProjectHealthCard component - [x] 4.3 Add route to App.tsx - [x] 4.4 Add navigation link in Layout ## Validation Criteria - Risk score correctly reflects overdue and blocked tasks - Dashboard shows all accessible projects - Color-coded status indicators (green/yellow/red)