# sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector architecture

> Architecture diagram of the GitHub repository sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector
- Repository: https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector

## Overview

#### Purpose and Repository Shape
Fitt is a virtual gym trainer intended to provide real-time posture correction from webcam/video pose landmarks, plus workout and progress-oriented UI flows. The repository contains a React single-page frontend and a standalone Python pose module; the README describes a Flask backend, but no application server file or backend directory is present.

Key paths: `src/index.js`, `src/App.js`, `PoseModule.py`, `README.md`

#### Entry Points and Runtime
The browser application enters through the React bootstrap in `src/index.js`, which mounts the application rooted at `src/App.js`. Static browser assets are under `public/`, including the HTML shell at `public/index.html`.

Python is provisioned as a checked-in Python 3.7 virtual environment (`env/bin/python`), with Flask, MediaPipe, OpenCV, NumPy, Pillow, and Matplotlib installed. `PoseModule.py` is the only repository-owned Python source and is the likely computer-vision integration entry point. No deployed Flask route layer is available in the tree.

Key paths: `src/index.js`, `src/App.js`, `PoseModule.py`

#### Frontend Application Shell and Navigation
`App.js` is the top-level composition boundary. Home-oriented presentation and navigation are separated into the `src/home/` area, suggesting a landing/dashboard shell that routes or exposes the exercise and authentication experiences.

Key paths: `src/App.js`, `src/home/main.js`, `src/home/nav.js`

#### Authentication Boundary
Authentication screens are isolated from workout features in `src/auth/`. The repository shows login and registration UI modules, but no owned API client, persistence layer, identity provider integration, or backend endpoint definitions. Authentication therefore appears frontend-only or dependent on an untracked service.

Key paths: `src/auth/login.js`, `src/auth/register.js`

#### Exercise and Workout Domain
Exercise functionality is concentrated in `src/exercise/`: exercise presentation, workout viewing, workout creation, and a dashboard. This is the primary product-domain boundary for selecting exercises, configuring sessions, and showing performance/progress. The tree does not establish a database or durable tracking implementation.

Key paths: `src/exercise/exercise.js`, `src/exercise/workout.js`, `src/exercise/createWorkout.js`, `src/exercise/dashboard.js`

#### Pose-Analysis Pipeline
The intended control flow is webcam or sample video input → pose landmark detection → form analysis/feedback → frontend exercise experience. `PoseModule.py` is the owned bridge to computer-vision capabilities, while installed MediaPipe pose assets and OpenCV indicate local, model-backed landmark processing. A sample MP4 in the frontend source may support video-based demos or analysis, but its exact use is not established.

Key paths: `PoseModule.py`, `src/utils/test.mp4`, `env/lib/python3.7/site-packages/mediapipe/modules/pose_landmark/pose_landmark_full.tflite`

#### Infrastructure and External Dependencies
Frontend dependencies and scripts are defined by `package.json` and locked in `package-lock.json`; Tailwind configuration exists at `tailwind.config.js`. The README names Vercel for frontend deployment and a Flask server for backend deployment, but deployment manifests, Docker assets, requirements files, Flask app code, API contracts, and server configuration are absent. Treat frontend-to-backend transport and persistence as unresolved integration boundaries.

Key paths: `package.json`, `tailwind.config.js`, `env/lib/python3.7/site-packages/Flask-2.0.2.dist-info`

Main entry points: [`src/App.js`](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/App.js) (Application shell), [`PoseModule.py`](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/PoseModule.py) (Pose module), [`src/home/nav.js`](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/home/nav.js) (Navigation), [`src/index.js`](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/index.js) (React bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React Frontend"]
  node_html["HTML shell<br/>static asset<br/>[index.html]"]
  node_bootstrap["React bootstrap<br/>browser entry<br/>[index.js]"]
  node_app["Application shell<br/>React composition<br/>[App.js]"]
  node_home["Home view<br/>React view<br/>[main.js]"]
  node_navigation["Navigation<br/>React component<br/>[nav.js]"]
  node_login["Login UI<br/>auth screen<br/>[login.js]"]
  node_register["Registration UI<br/>auth screen<br/>[register.js]"]
  node_frontend_tooling["Frontend tooling<br/>npm package manifest<br/>[package.json]"]
end

subgraph group_workout["Workout Domain"]
  node_exercise["Exercise experience<br/>React view<br/>[exercise.js]"]
  node_workout_view["Workout view<br/>React view<br/>[workout.js]"]
  node_workout_creation["Workout creation<br/>React view<br/>[createWorkout.js]"]
  node_dashboard["Progress dashboard<br/>React view<br/>[dashboard.js]"]
end

subgraph group_pose["Pose Analysis"]
  node_sample_video["Sample video<br/>MP4 asset<br/>[test.mp4]"]
  node_pose_module["Pose module<br/>Python CV entry<br/>[PoseModule.py]"]
  node_pose_model{{"Pose landmark model<br/>MediaPipe model"}}
  node_python_env["Python runtime<br/>Python 3.7 environment"]
end

node_untracked_backend{{"Unresolved backend<br/>external boundary"}}

node_html -->|"loads"| node_bootstrap
node_bootstrap -->|"mounts"| node_app
node_app -->|"composes"| node_home
node_home -->|"uses"| node_navigation
node_navigation -->|"exposes"| node_login
node_navigation -->|"exposes"| node_register
node_navigation -->|"navigates to"| node_exercise
node_app -->|"hosts"| node_workout_view
node_app -->|"hosts"| node_workout_creation
node_app -->|"hosts"| node_dashboard
node_workout_creation -->|"configures"| node_workout_view
node_exercise -.->|"intended pose feedback"| node_pose_module
node_sample_video -.->|"possible input"| node_pose_module
node_pose_module -->|"runs landmark detection"| node_pose_model
node_python_env -->|"executes"| node_pose_module
node_pose_module -.->|"form feedback"| node_exercise
node_app -.->|"integration unresolved"| node_untracked_backend
node_frontend_tooling -->|"builds"| node_bootstrap

click node_html "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/public/index.html"
click node_bootstrap "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/index.js"
click node_app "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/App.js"
click node_home "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/home/main.js"
click node_navigation "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/home/nav.js"
click node_login "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/auth/login.js"
click node_register "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/auth/register.js"
click node_exercise "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/exercise/exercise.js"
click node_workout_view "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/exercise/workout.js"
click node_workout_creation "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/exercise/createWorkout.js"
click node_dashboard "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/exercise/dashboard.js"
click node_sample_video "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/utils/test.mp4"
click node_pose_module "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/PoseModule.py"
click node_pose_model "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/env/lib/python3.7/site-packages/mediapipe/modules/pose_landmark/pose_landmark_full.tflite"
click node_python_env "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/env/bin/python"
click node_frontend_tooling "https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/package.json"

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_html,node_bootstrap,node_app,node_home,node_navigation,node_login,node_register,node_frontend_tooling toneBlue
class node_exercise,node_workout_view,node_workout_creation,node_dashboard toneAmber
class node_sample_video,node_pose_module,node_pose_model,node_python_env toneMint
class node_untracked_backend toneNeutral
```

## Components

### React Frontend

Browser single-page application.

- [HTML shell](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/public/index.html): static asset · `public/index.html`
- [React bootstrap](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/index.js): browser entry · `src/index.js`
- [Application shell](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/App.js): React composition · `src/App.js`
- [Home view](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/home/main.js): React view · `src/home/main.js`
- [Navigation](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/home/nav.js): React component · `src/home/nav.js`
- [Login UI](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/auth/login.js): auth screen · No owned identity integration is present. · `src/auth/login.js`
- [Registration UI](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/auth/register.js): auth screen · No owned identity integration is present. · `src/auth/register.js`
- [Frontend tooling](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/package.json): npm package manifest · Defines frontend dependencies and scripts. · `package.json`

### Workout Domain

Exercise and progress-oriented UI flows.

- [Exercise experience](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/exercise/exercise.js): React view · `src/exercise/exercise.js`
- [Workout view](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/exercise/workout.js): React view · `src/exercise/workout.js`
- [Workout creation](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/exercise/createWorkout.js): React view · `src/exercise/createWorkout.js`
- [Progress dashboard](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/exercise/dashboard.js): React view · Durable progress storage is not established. · `src/exercise/dashboard.js`

### Pose Analysis

Standalone local computer-vision capability.

- [Sample video](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/src/utils/test.mp4): MP4 asset · Possible demo or analysis input; usage is unconfirmed. · `src/utils/test.mp4`
- [Pose module](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/PoseModule.py): Python CV entry · Owned bridge for landmark detection and form analysis. · `PoseModule.py`
- [Pose landmark model](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/env/lib/python3.7/site-packages/mediapipe/modules/pose_landmark/pose_landmark_full.tflite): MediaPipe model · `env/lib/python3.7/site-packages/mediapipe/modules/pose_landmark/pose_landmark_full.tflite`
- [Python runtime](https://github.com/sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector/blob/main/env/bin/python): Python 3.7 environment · Includes Flask, MediaPipe, OpenCV, and numerical/image libraries. · `env/bin/python`

### Other components

- **Unresolved backend**: external boundary · README describes Flask, but no owned routes, API contract, or persistence layer exists.

## Connections

- HTML shell → React bootstrap: loads
- React bootstrap → Application shell: mounts
- Application shell → Home view: composes
- Home view → Navigation: uses
- Navigation → Login UI: exposes
- Navigation → Registration UI: exposes
- Navigation → Exercise experience: navigates to
- Application shell → Workout view: hosts
- Application shell → Workout creation: hosts
- Application shell → Progress dashboard: hosts
- Workout creation → Workout view: configures
- Exercise experience → Pose module: intended pose feedback
- Sample video → Pose module: possible input
- Pose module → Pose landmark model: runs landmark detection
- Python runtime → Pose module: executes
- Pose module → Exercise experience: form feedback
- Application shell → Unresolved backend: integration unresolved
- Frontend tooling → React bootstrap: builds
