Implements a dedicated /stats page showing cross-run aggregate statistics: run overview with win rate, runs by game bar chart, encounter breakdowns, top caught/encountered pokemon rankings, mortality analysis with death causes, and type distribution. Backend endpoint uses aggregate SQL queries to avoid N+1 fetching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
586 B
Python
13 lines
586 B
Python
from fastapi import APIRouter
|
|
|
|
from app.api import encounters, evolutions, games, health, pokemon, runs, stats
|
|
|
|
api_router = APIRouter()
|
|
api_router.include_router(health.router)
|
|
api_router.include_router(games.router, prefix="/games", tags=["games"])
|
|
api_router.include_router(pokemon.router, tags=["pokemon"])
|
|
api_router.include_router(evolutions.router, tags=["evolutions"])
|
|
api_router.include_router(runs.router, prefix="/runs", tags=["runs"])
|
|
api_router.include_router(encounters.router, tags=["encounters"])
|
|
api_router.include_router(stats.router, prefix="/stats", tags=["stats"])
|