mantimon-tcg/backend/app/db/models
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
..
__init__.py Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
campaign.py Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
collection.py Add FastAPI lifespan hooks and fix Phase 1 gaps 2026-01-27 15:37:19 -06:00
deck.py Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00
game.py Add FastAPI lifespan hooks and fix Phase 1 gaps 2026-01-27 15:37:19 -06:00
user.py Add database infrastructure with SQLAlchemy models and test suite 2026-01-27 10:17:30 -06:00