Reverse-engineered from app/maintenance.py, app/models/database.py, and the templates. Intended as the spec for a SQLAlchemy-based reimplementation inside Geo Activity Playground, not a description of the current code's structure.
Data source dependency
- JTBD-0: Resolve "which bikes exist and their total distance" by joining
equipments/activitiesin the geo-activity-playground database (equipments.name,SUM(activities.distance_km)). This is the integration seam — in GAP it should become a direct SQLAlchemy relationship/query, not a second SQLite file being cross-joined by raw path.
Repairs & Upgrades ("maintenance" entries) — ad-hoc, one-off log
- JTBD-1: Log a one-off maintenance/repair/upgrade event for a bike: description, date, odometer km at time of event, cost, optional photo (+ auto-generated thumbnail).
- JTBD-2: Record an optional "next due" reminder on that same entry (
next_due_kmand/ornext_due_date) — a lightweight u