How santonear/fitness works
Fitness is a mobile-first, bilingual local workout planner and tracker. A user navigates the SPA to create plans or start a temporary/planned workout, records sets, reviews actual values before completion, then consults read-only history and trends. Settings cover optional profile preferences, body weight, training memo, and JSON backup/restore; catalog and timer support exercise selection and timed training. IndexedDB is the local source of truth. The graph follows documented capabilities and shown references; unsampled modules are included where the tree and README establish them, but their internal call paths are not inferred.
Main entry points: repository.ts Repository transactions · App.tsx SPA navigation · WorkoutPage.tsx Workout flow · exercises.ts Exercise catalog
Components 28
App experience
- SPA navigation
src/ui/App.tsx - Today dashboard
src/ui/pages/TodayPage.tsx - Workout flow
src/ui/pages/WorkoutPage.tsx - Completion review
src/ui/components/CompletionReview.tsx - Exercise catalog UI
src/ui/pages/CatalogPage.tsx - Timer controls
src/ui/components/WorkoutTimer.tsx
Planning and training
- Exercise catalog
src/catalog/exercises.ts - Plan management
src/ui/pages/PlansPage.tsx - Plan editor
src/ui/components/PlanEditor.tsx - Day plan editor
src/ui/components/DayPlansPanel.tsx - Plan services
src/application/plans.ts - Day scheduling
src/application/day-plans.ts - Workout services
src/application/workouts.ts - Workout timers
src/application/timers.ts
History and settings
- Progress page
src/ui/pages/ProgressPage.tsx - History and trends
src/application/progress.ts - History detail
src/ui/components/HistoryDetail.tsx - Settings page
src/ui/pages/SettingsPage.tsx - Profile preferences
src/application/profile.ts - Body-weight tracking
src/application/body-weight.ts - Training memo
src/application/training-memory.ts - Backup panel
src/ui/components/BackupPanel.tsx - JSON backup and restore
src/application/backup.ts
Local data foundation
- IndexedDB
src/persistence/db.ts - Repository transactions
src/persistence/repository.ts - Domain contracts
src/domain/schemas.ts - Calendar projection
src/domain/day-date-projection.ts
Other components
- User
Connections 47
- User → SPA navigation: uses
src/ui/App.tsx - SPA navigation → Today dashboard: routes to
src/ui/App.tsx - SPA navigation → Workout flow: routes to
src/ui/App.tsx - SPA navigation → Exercise catalog UI: routes to
src/ui/App.tsx - SPA navigation → Plan management: routes to
src/ui/App.tsx - SPA navigation → Progress page: routes to
src/ui/App.tsx - SPA navigation → Settings page: routes to
src/ui/App.tsx - Today dashboard → Workout flow: opens
src/ui/pages/TodayPage.tsx - Today dashboard → Workout services: queries
src/ui/pages/TodayPage.tsx - Today dashboard → History and trends: queries
src/ui/pages/TodayPage.tsx - Workout flow → Workout services: records
src/ui/pages/WorkoutPage.tsx - Workout flow → Completion review: renders
src/ui/pages/WorkoutPage.tsx - Workout flow → Exercise catalog: selects exercises
src/ui/pages/WorkoutPage.tsx - Workout flow → Profile preferences: reads preferences
src/ui/pages/WorkoutPage.tsx - Workout flow → Workout timers: uses
- Timer controls → Workout timers: controls
- Exercise catalog UI → Exercise catalog: displays
src/ui/pages/CatalogPage.tsx - Plan management → Plan services: manages
src/ui/pages/PlansPage.tsx - Plan management → Day plan editor: renders
src/ui/pages/PlansPage.tsx - Plan management → Plan editor: renders
src/ui/pages/PlansPage.tsx - Plan management → Profile preferences: reads
src/ui/pages/PlansPage.tsx - Plan editor → Exercise catalog: selects exercises
src/ui/components/PlanEditor.tsx - Plan services → Exercise catalog: validates against
src/application/plans.ts - Plan services → Calendar projection: uses projection
src/application/plans.ts - Day scheduling → Calendar projection: projects dates
src/application/day-plans.ts - Workout services → Training memo: synchronizes
src/application/workouts.ts - Workout services → Exercise catalog: snapshots exercises
src/application/workouts.ts - Progress page → History and trends: loads reports
src/ui/pages/ProgressPage.tsx - Progress page → History detail: renders
src/ui/pages/ProgressPage.tsx - History and trends → Exercise catalog: resolves exercise data
- Settings page → Profile preferences: updates
src/ui/pages/SettingsPage.tsx - Settings page → Body-weight tracking: records
src/ui/pages/SettingsPage.tsx - Settings page → Training memo: reads
src/ui/pages/SettingsPage.tsx - Settings page → Backup panel: renders
src/ui/pages/SettingsPage.tsx - Backup panel → JSON backup and restore: imports and exports
- JSON backup and restore → Training memo: rebuilds memo
src/application/backup.ts - JSON backup and restore → Exercise catalog: validates catalog
src/application/backup.ts - Repository transactions → IndexedDB: transacts
src/persistence/repository.ts - Repository transactions → Domain contracts: uses metadata types
src/persistence/repository.ts - IndexedDB → Domain contracts: validates stored data
src/persistence/db.ts - Profile preferences → Repository transactions: reads and writes
src/application/profile.ts - Plan services → Repository transactions: reads and writes
src/application/plans.ts - Day scheduling → Repository transactions: reads and writes
src/application/day-plans.ts - Workout services → Repository transactions: reads and writes
src/application/workouts.ts - History and trends → Repository transactions: reads
src/application/progress.ts - JSON backup and restore → Repository transactions: replaces data
src/application/backup.ts - JSON backup and restore → Calendar projection: projects dates
src/application/backup.ts