diff --git a/backend/project_plans/PHASE_1_DATABASE.json b/backend/project_plans/PHASE_1_DATABASE.json index eb66a73..59db857 100644 --- a/backend/project_plans/PHASE_1_DATABASE.json +++ b/backend/project_plans/PHASE_1_DATABASE.json @@ -484,13 +484,42 @@ "GameStateManager with Redis cache + Postgres persistence", "CardService loading 382 card definitions", "Complete card data pipeline (scraper + converter)", - "Comprehensive test suite with real database testing" + "Comprehensive test suite with real database testing", + "FastAPI app with lifespan hooks for startup/shutdown" ], "notableImplementationDetails": [ "Uses ports 5433/6380 to avoid conflicts with existing services", "Scraper properly extracts energy types from HTML spans", "pytest-asyncio fixtures use sync psycopg2 for reliable cleanup", - "fakeredis used for Redis mocking in service tests" + "fakeredis used for Redis mocking in service tests", + "FastAPI lifespan wires init_db, init_redis, CardService.load_all", + "get_session_dependency exported for FastAPI dependency injection", + "game_cache_ttl_seconds configurable via Settings", + "datetime.utcnow() replaced with datetime.now(UTC)" + ], + "gapsFixedPostReview": [ + "Added FastAPI lifespan hooks (startup/shutdown)", + "Exported get_session_dependency from app/db/__init__.py", + "Made game cache TTL configurable via Settings", + "Fixed datetime.utcnow() deprecation (4 occurrences)", + "Added /health/ready endpoint for readiness checks", + "Added CORS middleware" + ] + }, + + "phase2Prerequisites": { + "description": "Items identified during Phase 1 review that should be addressed in Phase 2", + "items": [ + { + "name": "Auth infrastructure (JWT)", + "description": "Add JWT encode/decode utilities using secret_key from Settings", + "priority": "high" + }, + { + "name": "python-socketio integration", + "description": "Install python-socketio and create WebSocket handlers for real-time gameplay", + "priority": "high" + } ] } }