# pvnkmr205/project--fit-ai architecture

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

- Interactive diagram: https://gitdiagram.com/pvnkmr205/project--fit-ai
- Repository: https://github.com/pvnkmr205/project--fit-ai

## Overview

Fit AI is a Flask-based webcam workout tracker. A user starts an exercise session; the app streams camera frames through pose estimation and exercise-specific form/repetition analysis, then serves annotated video and session statistics. The app also exposes workout history and goal-setting endpoints. The README documents squat, push-up, and curl tracking; the sampled tracker excerpt shows their analysis, while the web UI files are absent from the tree. The sample script is a separate desktop demo, not part of the Flask workflow.

Main entry points: [`app.py`](https://github.com/pvnkmr205/project--fit-ai/blob/main/app.py) (Flask routes and streaming), [`pose_tracker.py`](https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py) (Pose estimation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web app"]
  node_flask["Flask routes and streaming<br/>[app.py]"]
end

subgraph group_tracking["Workout tracking"]
  node_pose["Pose estimation<br/>[pose_tracker.py]"]
  node_exercise["Exercise analysis<br/>[pose_tracker.py]"]
  node_feedback["Form feedback and overlay<br/>[pose_tracker.py]"]
  node_sample["Standalone pose demo"]
end

subgraph group_records["Workout records"]
  node_session["Session statistics<br/>[pose_tracker.py]"]
  node_history["History and goals<br/>[app.py]"]
end

node_user(("User"))
node_camera["Webcam"]

node_user -->|"starts or queries"| node_flask
node_camera -->|"provides frames"| node_flask
node_flask -->|"processes frames"| node_pose
node_pose -->|"supplies landmarks"| node_exercise
node_exercise -->|"updates feedback"| node_feedback
node_feedback -->|"returns annotated frames"| node_flask
node_flask -->|"requests statistics"| node_session
node_flask -->|"records session"| node_history

click node_flask "https://github.com/pvnkmr205/project--fit-ai/blob/main/app.py"
click node_pose "https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py"
click node_exercise "https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py"
click node_feedback "https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py"
click node_session "https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py"
click node_history "https://github.com/pvnkmr205/project--fit-ai/blob/main/app.py"
click node_sample "https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker_sample.py"

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_flask,node_user toneBlue
class node_pose,node_exercise,node_feedback,node_sample toneAmber
class node_session,node_history toneMint
class node_camera toneIndigo
```

## Components

### Web app

- [Flask routes and streaming](https://github.com/pvnkmr205/project--fit-ai/blob/main/app.py): `app.py`

### Workout tracking

- [Pose estimation](https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py): `pose_tracker.py`
- [Exercise analysis](https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py): `pose_tracker.py`
- [Form feedback and overlay](https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py): `pose_tracker.py`
- [Standalone pose demo](https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker_sample.py): `pose_tracker_sample.py`

### Workout records

- [Session statistics](https://github.com/pvnkmr205/project--fit-ai/blob/main/pose_tracker.py): `pose_tracker.py`
- [History and goals](https://github.com/pvnkmr205/project--fit-ai/blob/main/app.py): `app.py`

### Other components

- **User**
- **Webcam**

## Connections

- User → Flask routes and streaming: starts or queries (evidence: `README.md`)
- Webcam → Flask routes and streaming: provides frames (evidence: `app.py`)
- Flask routes and streaming → Pose estimation: processes frames (evidence: `app.py`)
- Pose estimation → Exercise analysis: supplies landmarks (evidence: `pose_tracker.py`)
- Exercise analysis → Form feedback and overlay: updates feedback (evidence: `pose_tracker.py`)
- Form feedback and overlay → Flask routes and streaming: returns annotated frames (evidence: `app.py`)
- Flask routes and streaming → Session statistics: requests statistics (evidence: `app.py`)
- Flask routes and streaming → History and goals: records session (evidence: `app.py`)
