mantimon-tcg/backend
Cal Corum 2a95316f04 Add FastAPI lifespan hooks and fix Phase 1 gaps
- Add lifespan context manager to app/main.py with startup/shutdown hooks
- Wire startup: init_db(), init_redis(), CardService.load_all()
- Wire shutdown: close_db(), close_redis()
- Add /health/ready endpoint for readiness checks
- Add CORS middleware with configurable origins
- Disable docs in production (only available in dev)

- Export get_session_dependency from app/db/__init__.py for FastAPI DI
- Add game_cache_ttl_seconds to Settings (configurable, was hardcoded)
- Fix datetime.utcnow() deprecation (4 occurrences) -> datetime.now(UTC)
- Update test to match S3 image URL (was placeholder CDN)

All 974 tests passing.
2026-01-27 15:37:19 -06:00
..
app Add FastAPI lifespan hooks and fix Phase 1 gaps 2026-01-27 15:37:19 -06:00
data Fix scraper to preserve energy types in effect text 2026-01-27 15:10:02 -06:00
project_plans Mark Phase 1 Database complete - all 18 tasks done 2026-01-27 15:22:43 -06:00
references Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
scripts Add FastAPI lifespan hooks and fix Phase 1 gaps 2026-01-27 15:37:19 -06:00
tests Add FastAPI lifespan hooks and fix Phase 1 gaps 2026-01-27 15:37:19 -06:00
.env.example Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
.gitignore Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
.python-version Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
alembic.ini Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
docker-compose.yml Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
PROJECT_PLAN_MASTER.json Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
PROJECT_PLAN.json Complete LOW-001: Verify comprehensive docstring coverage 2026-01-26 14:55:03 -06:00
pyproject.toml Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
uv.lock Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00