Skip to content

Extract dashboard API routes from app.py #44

Description

@raychrisgdp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions