IronMind is a full-stack AI-powered fitness platform designed to help users track their health, generate personalized workout and diet plans, analyze exercise form, and interact with an intelligent AI fitness coach.
The application combines modern web technologies, artificial intelligence, machine learning, computer vision, and real-time communication into a single fitness ecosystem.
- π JWT Authentication & Google Sign-In
- π BMI Calculator with History & Trend Charts
- π€ AI Fitness Coach using Retrieval-Augmented Generation (RAG)
- π₯ Personalized Diet & Workout Plan Generator
- β±οΈ Workout Timer with HIIT, Tabata & Custom Modes
- πΉ AI Exercise Form Checker using MediaPipe Pose
- π’ Real-Time Exercise Rep Counting
- π Joint Angle Detection & Form Analysis
- π Real-Time Notifications using Socket.IO
- π Daily Streaks & Achievement Badges
- π§ Daily Email Workout Reminders
- π Dark/Light Theme
- π¨ Modern Animated UI using Framer Motion
- π‘οΈ Rate Limiting & Secure Authentication
- π§ͺ Backend Unit Testing with Pytest
- π³ Docker & Docker Compose Support
- React
- Vite
- Tailwind CSS
- Framer Motion
- Axios
- Socket.IO Client
- FastAPI
- SQLAlchemy
- PostgreSQL
- JWT Authentication
- OAuth2
- Google OAuth
- Bcrypt Password Hashing
- SlowAPI Rate Limiting
- Retrieval-Augmented Generation (RAG)
- ChromaDB
- TF-IDF Retrieval
- Latent Semantic Analysis (LSA)
- Hugging Face Inference API
- Cosine Similarity Search
- MediaPipe Pose Estimation
- Webcam-Based Exercise Analysis
- Real-Time Rep Counting
- Joint Angle Detection
- Exercise Form Feedback
- On-Device Processing
- Docker
- Docker Compose
- GitHub Actions
- Pytest
- GitHub
- Render
- Vercel
- Supabase PostgreSQL
ββββββββββββββββββββββββ
β React + Vite β
β Frontend β
ββββββββββββ¬ββββββββββββ
β
β
β API Requests
βΌ
ββββββββββββββββββββββββ
β FastAPI β
β Backend β
ββββββββββββ¬ββββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββ
β β β
βΌ βΌ βΌ
PostgreSQL RAG MediaPipe
(Supabase) AI Coach Form Checker
β
βΌ
User Data
fitness-app/
β
βββ backend/
β βββ app/
β β βββ routers/
β β βββ rag/
β β βββ models.py
β β βββ schemas.py
β β βββ security.py
β β βββ database.py
β β βββ main.py
β β
β βββ tests/
β βββ requirements.txt
β βββ Dockerfile
β
βββ frontend/
β βββ src/
β β βββ pages/
β β βββ components/
β β βββ context/
β β βββ api/
β β
β βββ package.json
β βββ Dockerfile
β
βββ docker-compose.yml
βββ README.md
git clone https://github.com/anushkap0/IronMind.git
cd IronMindNavigate to the backend directory:
cd backendCreate a virtual environment:
python -m venv venv
venv\Scripts\activatepython -m venv venv
source venv/bin/activateInstall the required dependencies:
pip install -r requirements.txtStart the FastAPI backend:
uvicorn app.main:app --reloadBackend runs at:
http://localhost:8000
Swagger API Documentation:
http://localhost:8000/docs
Open a new terminal and navigate to the frontend:
cd frontendInstall dependencies:
npm installStart the development server:
npm run devFrontend runs at:
http://localhost:5173
Create a .env file for the backend and configure the required environment variables.
Example:
DATABASE_URL=your_postgresql_database_url
SECRET_KEY=your_secret_key
SESSION_SECRET_KEY=your_session_secret_key
FRONTEND_ORIGIN=http://localhost:5173
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=http://localhost:8000/auth/google/callback
HF_API_TOKEN=your_huggingface_api_token
β οΈ Important: Never commit your.envfile or real passwords, API keys, tokens, or secret keys to GitHub.
Use .env.example with placeholder values when sharing the project.
For production deployment, configure environment variables through your hosting provider.
IronMind supports Docker and Docker Compose for containerized development and deployment.
Build and start the application:
docker compose up --buildStop the containers:
docker compose downPostgreSQL data is persisted using a Docker volume.
The AI Fitness Coach uses a Retrieval-Augmented Generation (RAG) pipeline to provide intelligent fitness-related responses.
User Question
β
TF-IDF Retrieval
β
LSA Embeddings
β
Cosine Similarity Search
β
Relevant Fitness Context
β
Hugging Face LLM
β
AI-Generated Response
The system retrieves relevant information from a fitness knowledge base before generating a response.
If an AI API token is not available, the application can switch to Demo Mode.
IronMind uses MediaPipe Pose Estimation for real-time exercise analysis.
- Squats
- Push-ups
- Real-time exercise rep counting
- Joint angle detection
- Exercise form analysis
- Real-time form feedback
- Webcam-based exercise tracking
- On-device pose processing
Users can:
- Calculate BMI
- Store BMI history
- View BMI progress charts
- Track daily fitness streaks
- Unlock achievement badges
- Monitor workout progress
Socket.IO is used to provide real-time application functionality.
Features include:
- Workout timer synchronization
- Live notifications
- Achievement updates
- Real-time application events
IronMind provides secure authentication and application protection through:
- JWT Authentication
- OAuth2 Password Flow
- Google OAuth Login
- Bcrypt Password Hashing
- Rate Limiting using SlowAPI
- Environment-based secret management
- Secure API authentication
Backend tests are implemented using Pytest.
Run the test suite:
cd backend
pytest tests/ -vIronMind can be deployed using the following architecture:
βββββββββββββββββββ
β React + Vite β
β Frontend β
ββββββββββ¬βββββββββ
|
βΌ
βββββββββββββββββββ
β FastAPI β
β Backend β
ββββββββββ¬βββββββββ
β
βΌ
Render
β
βΌ
βββββββββββββββββββ
β PostgreSQL β
β Database β
ββββββββββ¬βββββββββ
β
βΌ
Supabase
| Component | Platform |
|---|---|
| Frontend | Render |
| Backend | Render |
| Database | Supabase PostgreSQL |
| Source Code | GitHub |
For production deployment, configure all required environment variables in the hosting platform instead of committing secrets to the repository.
- π₯ Nutrition Tracking
- β Wearable Device Integration
- π§ Intelligent Exercise Recommendation System
- ποΈ Voice-Based AI Fitness Coach
- π± Mobile Application
- π Social Fitness Challenges
- π Advanced Workout Analytics Dashboard
**Anushka **
GitHub: Anushka
If you found this project helpful, consider giving the repository a β on GitHub!