How chaseum/gymni-codered works
Gym&I is an iPhone-first fitness coach: the Pi captures video and produces movement observations, while the iPhone owns rep counting, workout state, and local history. The phone also requests cached spoken cues from a hosted ElevenLabs gateway; conversational coaching and user-confirmed memory are separate backend capabilities. The repository additionally contains a legacy laptop session server and an ML training workflow. Most links below reflect README ownership and workflow statements; implementation details for unsampled subsystems are not inferred.
Main entry points: WorkoutSession.swift Workout state · AppRootView.swift Workout app · cloud_app.py Hosted API · gemini.py Gemini coach
Components 20
iPhone experience
- Workout app
ios/GymAndAI/AppRootView.swift - Onboarding
ios/GymAndAI/Onboarding/OnboardingFlowView.swift - Workout state
ios/GymAndAIKit/Sources/GymAndAIKit/WorkoutSession.swift - Rep counting
ios/GymAndAIKit/Sources/GymAndAIKit/HubSession.swift - Local history
ios/GymAndAIKit/Sources/GymAndAIKit/WorkoutJournalWriter.swift - Voice client
ios/GymAndAIKit/Sources/GymAndAIKit/HostedCoachClient.swift - Rest coaching
ios/GymAndAI/Workout/RestView.swift - Watch workout
ios/GymAndAIWatch/WatchWorkoutManager.swift
Camera and movement
- Pi camera
ml/src/fitness_ml/sources.py - Camera preview
ml/src/fitness_ml/preview.py - Movement analysis
ml/src/fitness_ml/pipeline.py - Observation protocol
contracts/protocol.md
Hosted coaching
- Hosted API
backend/gymai_backend/cloud_app.py - Dynamic cues
backend/audio/dynamic_cue.py - Gemini coach
backend/gymai_backend/gemini.py - Profile memory
backend/gymai_backend/backboard_memory.py - Legacy session API
backend/gymai_backend/app.py
ML training
- Training workflow
ml/src/fitness_ml/training - Model artifacts
ml/src/fitness_ml/artifacts.py
Other components
- Athlete
Connections 19
- Athlete → Workout app: uses
README.md - Athlete → Onboarding: sets profile
- Workout app → Workout state: owns workout
README.md - Pi camera → Movement analysis: analyzes frames
ml/src/fitness_ml/pipeline.py - Movement analysis → Observation protocol: emits observations
README.md - Pi camera → Camera preview: publishes frames
- Observation protocol → Rep counting: ingests observations
README.md - Workout state → Rep counting: commits reps
ios/GymAndAIKit/Sources/GymAndAIKit/WorkoutSession.swift - Workout state → Local history: saves history
README.md - Workout state → Voice client: requests audio
ios/GymAndAIKit/Sources/GymAndAIKit/WorkoutSession.swift - Voice client → Hosted API: fetches cues
README.md - Hosted API → Dynamic cues: generates audio
backend/gymai_backend/cloud_app.py - Rest coaching → Workout state: controls rest
ios/GymAndAI/Workout/RestView.swift - Rest coaching → Gemini coach: requests note
ios/GymAndAI/Workout/RestView.swift - Hosted API → Gemini coach: routes messages
backend/gymai_backend/cloud_app.py - Gemini coach → Profile memory: searches memories
README.md - Workout app → Watch workout: syncs workout
- Training workflow → Model artifacts: exports models
ml/src/fitness_ml/training/cli.py - Athlete → Legacy session API: uses legacy tools
README.md