How vincent-agi/opengym works
openGym is a self-hosted workout planner and tracker, with a standalone browser demo and native Android option. The main workflow is profile sign-in, plan selection, guided workout logging, then reviewing history and progress; profile state syncs through the API in a self-hosted instance. The graph also preserves the documented library, import/export, sharing, notifications, and admin capabilities. The README establishes several product relationships; source excerpts clarify app routing, state persistence, and workout entry. Unsampled server and view implementations limit finer-grained call links.
Main entry points: App.jsx App shell · Workout.jsx Guided workout · Settings.jsx Settings and backup · useStore.js Profile state
Components 25
App experience
- App shell
frontend/src/App.jsx - Passkey login
frontend/src/views/Login.jsx - Home dashboard
frontend/src/views/Home.jsx - Localization
frontend/src/lib/i18n.js
Training workflow
- Weekly plan
frontend/src/views/Plan.jsx - Routine editor
frontend/src/views/RoutineEdit.jsx - Guided workout
frontend/src/views/Workout.jsx - Workout flow sheets
frontend/src/sheets.jsx - Exercise library
frontend/src/views/Library.jsx - Exercise catalogue
frontend/src/lib/exercises-data.js
Progress and data
- Stats and charts
frontend/src/views/Stats.jsx - Workout history
frontend/src/views/History.jsx - History analytics
frontend/src/lib/history.js - Settings and backup
frontend/src/views/Settings.jsx - Plan sharing
frontend/src/lib/plan-share.js - History import
frontend/src/lib/import-csv.js
Self-hosted platform
- Profile state
frontend/src/store/useStore.js - UI and timers
frontend/src/store/useUI.js - API client
frontend/src/lib/api.js - Application API
api/server.js - Self-hosted data
- Admin dashboard
frontend/src/views/Admin.jsx - Push notifications
frontend/src/lib/push.js - Native mobile bridge
frontend/src/lib/mobile.js
Other components
- Gym user
Connections 34
- Gym user → App shell: opens
- App shell → Passkey login: routes
frontend/src/App.jsx - App shell → Home dashboard: routes
frontend/src/App.jsx - App shell → Weekly plan: routes
frontend/src/App.jsx - App shell → Routine editor: routes
frontend/src/App.jsx - App shell → Guided workout: routes
frontend/src/App.jsx - App shell → Stats and charts: routes
frontend/src/App.jsx - App shell → Workout history: routes
frontend/src/App.jsx - App shell → Exercise library: routes
frontend/src/App.jsx - App shell → Settings and backup: routes
frontend/src/App.jsx - App shell → Admin dashboard: routes
frontend/src/App.jsx - Gym user → Weekly plan: builds routines
- Weekly plan → Routine editor: edits routines
- Gym user → Guided workout: starts session
- Guided workout → Workout flow sheets: starts flow
frontend/src/views/Workout.jsx - Exercise library → Exercise catalogue: searches
- Routine editor → Exercise catalogue: selects exercises
- Guided workout → Profile state: logs sets
frontend/src/views/Workout.jsx - Guided workout → History analytics: uses set history
frontend/src/views/Workout.jsx - Gym user → Stats and charts: reviews progress
- Stats and charts → History analytics: summarizes
frontend/src/views/Stats.jsx - Workout history → History analytics: presents history
- Settings and backup → History import: imports workouts
- Settings and backup → Plan sharing: shares plans
- Gym user → Settings and backup: manages data
- Passkey login → API client: authenticates
- Profile state → API client: syncs state
frontend/src/store/useStore.js - API client → Application API: requests data
- Application API → Self-hosted data: persists profiles
- Profile state → Native mobile bridge: mirrors state
frontend/src/store/useStore.js - Settings and backup → Push notifications: configures reminders
frontend/src/views/Settings.jsx - Admin dashboard → Application API: administers instance
- App shell → Localization: sets language
frontend/src/App.jsx - Guided workout → UI and timers: uses workout timers
frontend/src/views/Workout.jsx