# karanagrawal955/fitxp architecture

> Architecture diagram of the GitHub repository karanagrawal955/fitxp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karanagrawal955/fitxp
- Repository: https://github.com/karanagrawal955/fitxp

## Overview

FitXP is a browser-based, single-HTML gamified fitness app. The main user journey is to track workouts and activity, build XP and levels, and use that progression alongside nutrition and body-progress tracking. The README documents capabilities and platform integrations, but source excerpts were unavailable, so the graph avoids claims about internal code-level dispatch beyond those documented relationships.

Main entry points: [`index.html`](https://github.com/karanagrawal955/fitxp/blob/master/index.html) (FitXP App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Training"]
  node_workouts["Workout Plans<br/>[index.html]"]
  node_exercise_library["Exercise Library<br/>[index.html]"]
  node_motion["Motion Tracking<br/>[index.html]"]
  node_gym_timer["Gym Timer<br/>[index.html]"]
  node_workout_log["Workout Tracking<br/>[index.html]"]
end

subgraph group_progression["Progression"]
  node_quests["Daily Quests<br/>[index.html]"]
  node_levels["Leveling System<br/>[index.html]"]
  node_rewards["Progress Rewards<br/>[index.html]"]
end

subgraph group_wellbeing["Health Tracking"]
  node_nutrition["Nutrition Tracking<br/>[index.html]"]
  node_food_analysis["Food Analysis<br/>[index.html]"]
  node_body_progress["Body Progress<br/>[index.html]"]
  node_physique_advice["Physique Advice<br/>[index.html]"]
end

subgraph group_identity["Access and Sync"]
end

node_user(("Fitness User"))
node_app["FitXP App<br/>[index.html]"]
node_storage[("Local Storage")]
node_device_motion["DeviceMotion API"]
node_camera["Camera API"]
node_google_oauth["Google OAuth"]

node_user -->|"uses"| node_app
node_app -->|"offers"| node_workouts
node_app -->|"offers"| node_exercise_library
node_app -->|"offers"| node_motion
node_app -->|"offers"| node_gym_timer
node_app -->|"offers"| node_workout_log
node_app -->|"offers"| node_quests
node_app -->|"offers"| node_levels
node_app -->|"offers"| node_rewards
node_app -->|"offers"| node_nutrition
node_app -->|"offers"| node_body_progress
node_workouts -->|"uses XP level"| node_levels
node_motion -->|"reads motion"| node_device_motion
node_motion -->|"counts steps"| node_workout_log
node_nutrition -->|"captures meals"| node_camera
node_nutrition -->|"analyzes meals"| node_food_analysis
node_body_progress -->|"captures photos"| node_camera
node_body_progress -->|"provides advice"| node_physique_advice
node_body_progress -->|"improvement bonuses"| node_rewards
node_quests -->|"streak challenges"| node_levels
node_app -->|"persists data"| node_storage
node_app -.->|"optional sign-in"| node_google_oauth

click node_app "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_workouts "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_exercise_library "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_motion "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_gym_timer "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_workout_log "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_quests "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_levels "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_rewards "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_nutrition "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_food_analysis "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_body_progress "https://github.com/karanagrawal955/fitxp/blob/master/index.html"
click node_physique_advice "https://github.com/karanagrawal955/fitxp/blob/master/index.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_workouts,node_exercise_library,node_motion,node_gym_timer,node_workout_log,node_user toneBlue
class node_quests,node_levels,node_rewards,node_storage toneAmber
class node_nutrition,node_food_analysis,node_body_progress,node_physique_advice,node_device_motion,node_camera toneMint
class node_app toneTeal
class node_google_oauth toneIndigo
```

## Components

### Training

- [Workout Plans](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Exercise Library](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Motion Tracking](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Gym Timer](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Workout Tracking](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`

### Progression

- [Daily Quests](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Leveling System](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Progress Rewards](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`

### Health Tracking

- [Nutrition Tracking](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Food Analysis](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Body Progress](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- [Physique Advice](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`

### Other components

- **Fitness User**
- [FitXP App](https://github.com/karanagrawal955/fitxp/blob/master/index.html): `index.html`
- **Local Storage**
- **DeviceMotion API**
- **Camera API**
- **Google OAuth**

## Connections

- Fitness User → FitXP App: uses
- FitXP App → Workout Plans: offers
- FitXP App → Exercise Library: offers
- FitXP App → Motion Tracking: offers
- FitXP App → Gym Timer: offers
- FitXP App → Workout Tracking: offers
- FitXP App → Daily Quests: offers
- FitXP App → Leveling System: offers
- FitXP App → Progress Rewards: offers
- FitXP App → Nutrition Tracking: offers
- FitXP App → Body Progress: offers
- Workout Plans → Leveling System: uses XP level
- Motion Tracking → DeviceMotion API: reads motion
- Motion Tracking → Workout Tracking: counts steps
- Nutrition Tracking → Camera API: captures meals
- Nutrition Tracking → Food Analysis: analyzes meals
- Body Progress → Camera API: captures photos
- Body Progress → Physique Advice: provides advice
- Body Progress → Progress Rewards: improvement bonuses
- Daily Quests → Leveling System: streak challenges
- FitXP App → Local Storage: persists data
- FitXP App → Google OAuth: optional sign-in
