How karthick-216/forge---gpt works
Purpose and Entry Points
This is a Python fitness/progression application with a Kivy-style screen/UI structure, covering onboarding, dashboard tracking, and training. The application starts in main.py; primary UI routes are implemented in screens/splash.py, screens/onboarding.py, screens/dashboard.py, and screens/train.py, with declarative layouts under kv/.
UI and Navigation Layer
Screen modules own presentation and user interactions, while .kv files define the corresponding visual structure. Splash and onboarding likely establish initial user state before routing to the dashboard; training is a dedicated workflow.
• screens/splash.py
• screens/onboarding.py
• screens/dashboard.py
• screens/train.py
• kv/splash.kv
• kv/onboarding.kv
• kv/dashboard.kv
• kv/train.kv
Domain Models and Persistent State
The model layer is intentionally small: profile data is the central explicit domain model, backed by shared model foundations. Service modules use a storage/cache boundary rather than screens directly managing persisted data. Runtime-generated user data, logs, and progress are kept under data/.
• models/base.py
• models/profile.py
• logic/storage.py
• logic/cache.py
• data/progress
• data/logs
Fitness Planning and Training Execution
Workout and plan generation form the core training pipeline. The exercise library supplies candidate exercises; generators construct plans/workouts; the workout service coordinates active workout behavior. Validation is a boundary for checking generated or submitted fitness data.
• logic/exercise_library.py
• logic/plan_generator.py
• logic/workout_generator.py
• logic/workout_service.py
• logic/validator.py
Progression and Gamification
Progress is translated into user-facing advancement through XP, levels, streaks, quests, achievements, and game mechanics. These services should remain domain-level and be invoked from workflow/UI orchestration rather than coupled to Kivy widgets.
• logic/progress_service.py
• logic/xp_service.py
• logic/level_service.py
• logic/streak_service.py
• logic/quest_service.py
• logic/achievement_service.py
• logic/game_engine.py
Health Tracking and Analytics
Profile, weight, BMI, nutrition, sleep, and statistics services represent health inputs and derived metrics. Analytics aggregates this information for dashboard presentation and coaching; the AI coach is a separate recommendation boundary whose provider/runtime is not identifiable from the repository tree.
• logic/profile_service.py
• logic/weight_service.py
• logic/bmi_service.py
• logic/nutrition_service.py
• logic/sleep_service.py
• logic/stat_service.py
• logic/analytics_service.py
• logic/ai_coach.py
Cross-Cutting Runtime Services
An event bus and scheduler support decoupled coordination and timed work such as daily resets and notifications. Import/export, backup, and sync define data portability and remote-integration boundaries; no specific external API, database, or cloud provider is evidenced. Settings and themes provide application-wide user preferences.
• logic/event_bus.py
• logic/scheduler.py
• logic/daily_reset_service.py
• logic/notification_service.py
• logic/import_service.py
• logic/export_service.py
• logic/backup_service.py
• logic/sync_service.py
• logic/settings_service.py
• logic/theme_service.py
Main entry points: storage.py Storage & cache · workout_service.py Workout service · dashboard.py Dashboard screen · progress_service.py Progress service
Components 23
UI & Navigation
- Application entry
main.py - Splash screen
screens/splash.py - Onboarding screen
screens/onboarding.py - Dashboard screen
screens/dashboard.py - Training screen
screens/train.py
State & Persistence
- Profile model
models/profile.py - Model foundations
models/base.py - Storage & cache · Services persist shared application state through this boundary.
logic/storage.py - User data · Generated progress and logs are stored locally.
data/progress
Training Pipeline
- Exercise library
logic/exercise_library.py - Plan & workout generators · Builds plans and workouts from available exercises.
logic/plan_generator.py - Workout service · Coordinates the active training workflow.
logic/workout_service.py - Fitness validator
logic/validator.py
Progression
- Progress service
logic/progress_service.py - Game mechanics · XP, levels, streaks, quests, and achievements translate progress into advancement.
logic/game_engine.py
Health & Analytics
- Profile service
logic/profile_service.py - Health inputs & metrics · Weight, BMI, nutrition, sleep, and statistics services manage health signals.
logic/weight_service.py - Analytics service · Aggregates health and progress for dashboard insight.
logic/analytics_service.py - AI coach · Provider implementation is not identified.
logic/ai_coach.py
Runtime Services
- Event bus & scheduler · Decouples workflows and schedules timed work.
logic/event_bus.py - Daily operations · Daily resets and notifications run through runtime coordination.
logic/daily_reset_service.py - Portability & sync · Import, export, backup, and sync manage data movement.
logic/import_service.py - Settings & themes
logic/settings_service.py
Connections 28
- Application entry → Splash screen: starts
- Splash screen → Onboarding screen: new user flow
- Splash screen → Dashboard screen: returning user
- Onboarding screen → Profile service: creates profile
- Onboarding screen → Dashboard screen: completes
- Dashboard screen → Training screen: starts training
- Dashboard screen → Analytics service: shows insights
- Dashboard screen → Settings & themes: applies preferences
- Training screen → Workout service: drives workout
- Workout service → Plan & workout generators: requests workout
- Plan & workout generators → Exercise library: selects exercises
- Workout service → Fitness validator: validates activity
- Workout service → Progress service: records completion
- Progress service → Game mechanics: awards advancement
- Profile service → Profile model: manages
- Profile model → Model foundations: extends
- Profile service → Storage & cache: persists
- Health inputs & metrics → Storage & cache: persists inputs
- Progress service → Storage & cache: persists progress
- Storage & cache → User data: reads and writes
- Analytics service → Health inputs & metrics: aggregates
- Analytics service → Progress service: uses progress
- AI coach → Analytics service: uses insights
- Event bus & scheduler → Daily operations: schedules
- Daily operations → Progress service: runs resets
- Portability & sync → Storage & cache: moves data
- Settings & themes → Storage & cache: persists
- Workout service → Event bus & scheduler: publishes updates