An intelligent, all-in-one fitness companion designed to help users achieve their health goals through personalized AI-generated plans. This web application leverages the power of Artificial Intelligence to create custom diet and workout routines based on individual user data.
-
Personalized Fitness Profile:
- BMI Calculator: Instantly calculate your Body Mass Index (BMI) to understand your current health status.
- Data Tracking: Securely store and update your height, weight, and age to track progress over time.
-
AI-Generated Plans:
- Custom Diet Plans: Receive tailored meal plans that align with your fitness goals and dietary preferences.
- Custom Workout Routines: Get personalized exercise schedules designed for your fitness level.
- PDF Downloads: Easily download your diet and workout plans as PDF files for offline access.
-
AI Chat Assistant:
- 24/7 Support: Interact with an intelligent chatbot powered by Groq AI to ask questions about fitness, nutrition, and health.
-
Location Services:
- Find Nearby Gyms & Yoga Classes: Integrated map search to help you discover fitness centers and yoga studios in your vicinity.
-
User Authentication:
- Secure Sign-Up and Login functionality powered by Supabase.
-
Responsive Design:
- A modern, glassmorphism-inspired UI that works seamlessly across desktop and mobile devices.
- Frontend: React, TypeScript, Vite, Tailwind CSS
- Backend / Database: Supabase (PostgreSQL, Auth)
- AI Integration: Groq SDK (LLM for Chatbot), Google Generative AI (Gemini)
- Icons: Lucide React
- PDF Generation: jsPDF
- The Problem: Many people struggle to start their fitness journey due to expensive personal trainers and generic, ineffective online plans.
- The Solution: This application acts as a free, AI-driven personal trainer. It uses your unique body metrics (BMI) to instantly generate a personalized roadmap for diet and exercise.
- Secure Authentication: Powered by Supabase for secure user data storage.
- Smart Onboarding: Calculates BMI from user inputs (Height, Weight, Age) to categorize health status.
- AI-Generated Plans: Creates custom Diet and Workout plans downloadable as PDFs.
- AI Chat Assistant: A 24/7 chatbot for instant health and nutrition advice.
- Location Services: Finds nearby gyms and yoga classes using Google Maps integration.
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/Prajwal-banakar/Ai-powered-Fitness cd Ai-powered-Fitness -
Install dependencies:
npm install
-
Set up environment variables:
Create a
.envfile in the root of your project and add the following, replacing the placeholder values with your actual keys:VITE_SUPABASE_URL=your-supabase-url VITE_SUPABASE_ANON_KEY=your-supabase-anon-key VITE_GROQ_API_KEY=your-groq-api-key -
Run the development server:
npm run dev
This will start the development server, and you can view the app at
http://localhost:5173.
To create a production-ready build, run the following command:
npm run buildThis will generate a dist folder in your project root, which contains the optimized and minified static files for your application.
You can deploy this project to any static hosting service. Here are instructions for two popular free options:
- Sign up for a Netlify account: Go to Netlify and sign up for a free account.
- Create a new site: From your Netlify dashboard, click "New site from Git."
- Connect your Git provider: Choose your Git provider (e.g., GitHub, GitLab, Bitbucket) and authorize Netlify to access your repositories.
- Select your repository: Choose the repository for this project.
- Configure build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
- Add environment variables: Before deploying, go to "Site settings" > "Build & deploy" > "Environment" and add the same environment variables you set up in your
.envfile:VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_GROQ_API_KEY
- Deploy site: Click "Deploy site" to start the build and deployment process. Netlify will provide you with a live URL once it's complete.
- Sign up for a Vercel account: Go to Vercel and sign up for a free account.
- Create a new project: From your Vercel dashboard, click "Add New..." > "Project."
- Import your Git repository: Select your Git provider and import the repository for this project.
- Configure your project: Vercel will automatically detect that you're using Vite and configure the build settings for you.
- Add environment variables: Before deploying, go to the "Settings" tab, then "Environment Variables," and add the same variables you set up in your
.envfile:VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_GROQ_API_KEY
- Deploy: Click "Deploy" to start the build and deployment process. Vercel will provide you with a live URL once it's complete.