Goal
Move dashboard data API routes out of app.py into a focused route module or Flask blueprint.
Candidate Scope
/api/overview
/api/models
/api/daily
/api/usage-history
/api/refresh if it remains dashboard-data related
Constraints
- Preserve current response shapes and token/source wording.
- Keep simulated mode working.
- Keep route registration simple from
app.py.
- Avoid changing aggregation rules in the same PR.
Verification
uv run python -m unittest tests.test_app tests.test_readme -v
uv run python -m py_compile app.py scripts/snapshot_dashboard.py
scripts/review.sh
Goal
Move dashboard data API routes out of
app.pyinto a focused route module or Flask blueprint.Candidate Scope
/api/overview/api/models/api/daily/api/usage-history/api/refreshif it remains dashboard-data relatedConstraints
app.py.Verification
uv run python -m unittest tests.test_app tests.test_readme -vuv run python -m py_compile app.py scripts/snapshot_dashboard.pyscripts/review.sh