How jay-withers/gym-log works
gym-log is a server-rendered training log for two weekly full-body workouts. A user enters through the passcode-protected web app, records sessions in an append-only history, and receives next-load suggestions from the progression rule; the same log supports block rotation, achievements, goals, conditions, and insights. Separate paths import spreadsheet blocks and sync Garmin activity and recovery data. The app stores its shared log in one JSON blob in Azure, with a local-file fallback. The README documents scheduled insight and Garmin jobs; some route, store, and Terraform wiring was not sampled, so uncertain calls are omitted.
Main entry points: cli.py CLI commands · store.py Log storage · routes.py Page routes · main.py FastAPI app
Components 18
Web application
- FastAPI app
src/gymlog/api/main.py - Page routes
src/gymlog/api/routes.py - Passcode gate
src/gymlog/api/deps.py - HTML templates
src/gymlog/templates - CLI commands
src/gymlog/cli.py
Training domain
- Log model
src/gymlog/model.py - Load progression
src/gymlog/progression.py - Log storage
src/gymlog/store.py - Local JSON file
- Azure blob
- Workbook importer
src/gymlog/importer.py
External data
- AI insights
src/gymlog/insights.py - Garmin sync
src/gymlog/garmin.py - Garmin Connect
- DeepSeek API
Scheduled operations
- Insight schedule
terraform/main.container-apps-job.tf - Garmin schedule
terraform/main.container-apps-job.garmin.tf
Other components
- Athlete
Connections 18
- Athlete → FastAPI app: opens app
- FastAPI app → Page routes: serves pages
- FastAPI app → Passcode gate: gates routes
- Page routes → HTML templates: renders HTML
- Page routes → Log storage: reads and writes
- Page routes → Load progression: gets suggestions
- Load progression → Log model: evaluates history
- Log storage → Log model: serializes log
- Log storage → Azure blob: reads and writes
- Log storage → Local JSON file: falls back to
- CLI commands → Workbook importer: imports workbook
- CLI commands → Log storage: loads and saves
- CLI commands → AI insights: generates insight
- CLI commands → Garmin sync: syncs data
- AI insights → DeepSeek API: requests summary
- Garmin sync → Garmin Connect: fetches activity
- Insight schedule → CLI commands: runs insight
- Garmin schedule → CLI commands: runs sync