paper-dynasty-gameplay-webapp/app/routers/api.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

25 lines
749 B
Python

"""
JSON API routes for HTMX endpoints.
Uses various services following Model/Service Architecture.
"""
import logging
from fastapi import APIRouter, HTTPException
logger = logging.getLogger(f'{__name__}.api_router')
router = APIRouter()
@router.get("/scoreboard/{game_id}")
async def get_scoreboard(game_id: int):
"""Get live scoreboard data for HTMX updates."""
# TODO: Implement scoreboard API using GameplayService
raise HTTPException(status_code=501, detail="Scoreboard API not yet implemented")
@router.post("/play")
async def execute_play():
"""Execute a gameplay action."""
# TODO: Implement play execution using GameplayService
raise HTTPException(status_code=501, detail="Play execution not yet implemented")