How urattems/training-app works
Training App is a local-first workout log: an athlete imports a coach-supplied program, records completed sessions, then exports results for the coach to prepare the next program. Separate capabilities cover history, progress, body measurements, full backup/restore, and optional Google Drive archiving. The graph combines documented user journeys with relationships visible in the sampled source and SOURCE INDEX; unsampled feature internals and some connections are therefore omitted.
Main entry points: App.tsx App routes · workout Workout logging · settings Settings · services Data services
Components 24
App and navigation
- App routes
src/app/App.tsx - Home
src/features/home - Start guide
src/features/start - Settings
src/features/settings
Programs and training
- Program import
src/features/import/ImportProgramFlow.tsx - Program view
src/features/program - Workout logging
src/features/workout - Exercise logging
src/features/exercise - Workout rules
src/domain/workout.ts
Progress and tracking
- Workout history
src/features/history - Progress charts
src/features/progress - Weight tracking
src/features/weight
Data and exchange
- Reactive data
src/hooks/useData.ts - Data services
src/services - Domain calculations
src/domain - Local database
src/db/database.ts - Backup and restore
src/services/exportService.ts - Coach export
src/services/coachExportService.ts
Optional Drive archive
- Drive settings
src/features/settings/DrivePage.tsx - Drive sync
src/app/DriveSyncAgent.tsx - Drive services
src/services/driveClient.ts
Other components
- Athlete
- External AI coach
- User Drive script
Connections 28
- Athlete → Start guide: opens guide
README.md - Start guide → External AI coach: copies prompt
README.md - Athlete → Program import: pastes program
README.md - App routes → Home: routes to
src/app/App.tsx - App routes → Program import: hosts flow
src/app/App.tsx - App routes → Program view: routes to
src/app/App.tsx - App routes → Workout logging: routes to
src/app/App.tsx - App routes → Workout history: routes to
src/app/App.tsx - App routes → Settings: routes to
src/app/App.tsx - Program import → Program view: activates program
README.md - Program view → Workout logging: starts session
src/features/program/ProgramSessionPage.tsx - Workout logging → Exercise logging: opens exercise
src/app/App.tsx - Workout logging → Workout rules: applies rules
- Workout logging → Workout history: records results
README.md - Home → Workout logging: offers next session
README.md - Workout history → Progress charts: reviews trends
README.md - Athlete → Weight tracking: records measurements
README.md - Reactive data → Data services: reads through
src/hooks/useData.ts - Data services → Local database: reads and writes
src/services/workoutService.ts - Data services → Domain calculations: uses calculations
src/services/workoutService.ts - Settings → Backup and restore: exports or restores
README.md - Backup and restore → Local database: reads data
src/services/exportService.ts - Settings → Coach export: prepares export
src/features/settings/CoachExportPage.tsx - Coach export → External AI coach: delivers results
README.md - External AI coach → Athlete: returns program
README.md - Drive settings → Drive sync: configures archive
- Drive sync → Drive services: uses client
- Drive services → User Drive script: sends archive
README.md