paper-dynasty-gameplay-webapp/app/routers/games.py
Cal Corum c09f9d1302 CLAUDE: Initialize Paper Dynasty web app with Model/Service Architecture
Establishes foundation for migrating baseball simulation from Discord bot to web application using service-oriented architecture pattern.

Key components:
- FastAPI application structure with dependency injection
- Service layer foundation with base classes and container
- Comprehensive directory documentation with README files
- PostgreSQL containerization with Docker Compose
- Testing structure for unit/integration/e2e tests
- Migration planning documentation
- Rotating log configuration per user requirements

Architecture follows Model/Service/Controller pattern to improve testability, maintainability, and scalability over original monolithic Discord app.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 21:44:12 -05:00

33 lines
1.1 KiB
Python

"""
Game-related routes using GameService.
Follows Model/Service Architecture with thin controllers.
"""
import logging
from fastapi import APIRouter, HTTPException, Depends
from app.services.service_container import GameServiceDep
logger = logging.getLogger(f'{__name__}.games_router')
router = APIRouter()
@router.post("/start")
async def start_game(game_service: GameServiceDep):
"""Start a new game using GameService."""
# TODO: Implement game creation using GameService
raise HTTPException(status_code=501, detail="Game creation not yet implemented")
@router.get("/{game_id}")
async def get_game(game_id: int, game_service: GameServiceDep):
"""Get game details by ID."""
# TODO: Implement game retrieval using GameService
raise HTTPException(status_code=501, detail="Game retrieval not yet implemented")
@router.get("/")
async def list_games(game_service: GameServiceDep):
"""List active games."""
# TODO: Implement game listing using GameService
raise HTTPException(status_code=501, detail="Game listing not yet implemented")