How sudhanvarajesh/fitt-a-real-time-virtual-gym-trainer-and-posture-corrector works
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: App.js Application shell · PoseModule.py Pose module · nav.js Navigation · index.js React bootstrap
Components 17
React Frontend
Browser single-page application.
- HTML shell
public/index.html - React bootstrap
src/index.js - Application shell
src/App.js - Home view
src/home/main.js - Navigation
src/home/nav.js - Login UI · No owned identity integration is present.
src/auth/login.js - Registration UI · No owned identity integration is present.
src/auth/register.js - Frontend tooling · Defines frontend dependencies and scripts.
package.json
Workout Domain
Exercise and progress-oriented UI flows.
- Exercise experience
src/exercise/exercise.js - Workout view
src/exercise/workout.js - Workout creation
src/exercise/createWorkout.js - Progress dashboard · Durable progress storage is not established.
src/exercise/dashboard.js
Pose Analysis
Standalone local computer-vision capability.
- Sample video · Possible demo or analysis input; usage is unconfirmed.
src/utils/test.mp4 - Pose module · Owned bridge for landmark detection and form analysis.
PoseModule.py - Pose landmark model
env/lib/python3.7/site-packages/mediapipe/modules/pose_landmark/pose_landmark_full.tflite - Python runtime · Includes Flask, MediaPipe, OpenCV, and numerical/image libraries.
env/bin/python
Other components
- Unresolved backend · README describes Flask, but no owned routes, API contract, or persistence layer exists.
Connections 18
- 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