# abdelrahmanelsafty75/fitflow architecture

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

- Interactive diagram: https://gitdiagram.com/abdelrahmanelsafty75/fitflow
- Repository: https://github.com/abdelrahmanelsafty75/fitflow

## Overview

FitFlow is a browser-based workout tracker. Users navigate its routed pages to record workouts, review or delete history, and see volume and consistency summaries; the exercise library separately fetches searchable exercise data from WGER. Workout records persist in browser localStorage through Zustand. The graph reflects documented routing and sampled calls; README-described responsive UI is presentation rather than a separate runtime subsystem, and unsampled source behavior is not inferred.

Main entry points: [`src/App.jsx`](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/App.jsx) (Routed application), [`src/store/useWorkoutStore.js`](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/store/useWorkoutStore.js) (Workout state), [`src/pages/Exercises.jsx`](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/Exercises.jsx) (Exercise library), [`src/pages/LogWorkout.jsx`](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/LogWorkout.jsx) (Workout logger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_app["Routed application<br/>[App.jsx]"]
  node_navbar["Navigation bar<br/>[Navbar.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
end

subgraph group_workouts["Workout tracking"]
  node_logger["Workout logger<br/>[LogWorkout.jsx]"]
  node_history["Workout history<br/>[WorkoutHistory.jsx]"]
  node_dashboard["Progress dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_library["Exercise library"]
  node_librarypage["Exercise library<br/>[Exercises.jsx]"]
  node_api["WGER API client<br/>[api.js]"]
  node_card["Exercise card<br/>[ExerciseCard.jsx]"]
end

subgraph group_persistence["Client persistence"]
  node_store["Workout state<br/>[useWorkoutStore.js]"]
  node_storage[("Browser localStorage")]
end

node_user(("Fitness user"))
node_wger["WGER service"]

node_user -.->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_logger
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_librarypage
node_logger -->|"adds log"| node_store
node_history -->|"reads and deletes"| node_store
node_dashboard -->|"reads logs"| node_store
node_store -->|"persists state"| node_storage
node_librarypage -->|"requests exercises"| node_api
node_api -->|"fetches exercise data"| node_wger
node_librarypage -->|"renders results"| node_card

click node_app "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/App.jsx"
click node_navbar "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/components/Navbar.jsx"
click node_home "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/Home.jsx"
click node_logger "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/LogWorkout.jsx"
click node_history "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/WorkoutHistory.jsx"
click node_dashboard "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/Dashboard.jsx"
click node_store "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/store/useWorkoutStore.js"
click node_librarypage "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/Exercises.jsx"
click node_api "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/services/api.js"
click node_card "https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/components/ExerciseCard.jsx"

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_app,node_navbar,node_home,node_user toneBlue
class node_logger,node_history,node_dashboard toneAmber
class node_librarypage,node_api,node_card toneMint
class node_store,node_storage toneRose
class node_wger toneIndigo
```

## Components

### App navigation

- [Routed application](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation bar](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Home page](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`

### Workout tracking

- [Workout logger](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/LogWorkout.jsx): `src/pages/LogWorkout.jsx`
- [Workout history](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/WorkoutHistory.jsx): `src/pages/WorkoutHistory.jsx`
- [Progress dashboard](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`

### Exercise library

- [Exercise library](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/pages/Exercises.jsx): `src/pages/Exercises.jsx`
- [WGER API client](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/services/api.js): `src/services/api.js`
- [Exercise card](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/components/ExerciseCard.jsx): `src/components/ExerciseCard.jsx`

### Client persistence

- [Workout state](https://github.com/abdelrahmanelsafty75/fitflow/blob/main/src/store/useWorkoutStore.js): `src/store/useWorkoutStore.js`
- **Browser localStorage**

### Other components

- **Fitness user**
- **WGER service**

## Connections

- Fitness user → Routed application: uses (evidence: `README.md`)
- Routed application → Navigation bar: renders (evidence: `src/App.jsx`)
- Routed application → Home page: routes to (evidence: `src/App.jsx`)
- Routed application → Workout logger: routes to (evidence: `src/App.jsx`)
- Routed application → Workout history: routes to (evidence: `src/App.jsx`)
- Routed application → Progress dashboard: routes to (evidence: `src/App.jsx`)
- Routed application → Exercise library: routes to (evidence: `src/App.jsx`)
- Workout logger → Workout state: adds log (evidence: `src/pages/LogWorkout.jsx`)
- Workout history → Workout state: reads and deletes (evidence: `src/pages/WorkoutHistory.jsx`)
- Progress dashboard → Workout state: reads logs (evidence: `src/pages/Dashboard.jsx`)
- Workout state → Browser localStorage: persists state (evidence: `src/store/useWorkoutStore.js`)
- Exercise library → WGER API client: requests exercises (evidence: `src/pages/Exercises.jsx`)
- WGER API client → WGER service: fetches exercise data (evidence: `src/services/api.js`)
- Exercise library → Exercise card: renders results (evidence: `src/pages/Exercises.jsx`)
