An AI-powered wellness platform that delivers personalized fitness and nutrition guidance for a smarter, healthier lifestyle. VitaFlex-AI combines FastAPI backend with OpenAI GPT-4o integration and a modern React frontend to create a comprehensive wellness companion.
- π€ AI Coach - Personalized fitness coaching powered by GPT-4o
- π± Food Scanner - AI-powered food recognition and nutritional analysis
- π½οΈ Meal Planner - Smart meal planning with dietary preferences
- πͺ Workout Planner - Custom workout routines tailored to your fitness level
- π± Responsive Design - Seamless experience across all devices
- π³ Docker Support - Easy deployment with Docker and docker-compose
- FastAPI - Modern Python web framework
- OpenAI GPT-4o - Advanced language model for AI recommendations
- Tavily API - Search and data retrieval service
- Uvicorn - ASGI server
- Python 3.8+ - Backend runtime
- Docker - Containerization support
- Nginx - Web server and reverse proxy
- React 18 - UI library with TypeScript
- Vite - Build tool and development server
- TailwindCSS - CSS framework
- ShadCN UI - Component library
- React Router - Client-side routing
- React Query - Data fetching and state management
- Python 3.8+
- Node.js 18+
- npm or yarn or pnpm
- OpenAI API Key
- Tavily API Key
- Clone the repository:
git clone https://github.com/syeda434am/VitaFlex-AI.git
cd VitaFlex-AI- Backend Setup:
# Navigate to backend directory (if separate) or root
# Install Python dependencies
pip install -r requirements.txt
- Frontend Setup:
# Navigate to frontend directory or install frontend dependencies
npm install
# or
yarn install
# or
pnpm installImportant: Start the backend first, then the frontend.
# Start all services with docker-compose
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Start the FastAPI Backend:
uvicorn com.mhire.app.main:app --reloadThe backend will be available at http://localhost:8000
- Start the React Frontend:
npm run dev
# or
yarn dev
# or
pnpm devThe frontend will be available at http://localhost:5173
- Set the project within below structure by copying the files and folders inside com/mhire/ui/ and paste them outside of the com folder. The structure will then look like below:
VitaFlex-AI/
βββ com/
β βββ mhire/
β βββ app/
β βββ main.py # FastAPI main application
β βββ config/ # Configuration files
β βββ services/ # AI-powered microservices
β βββ ai_coach/ # AI fitness coaching service
β βββ food_scanner/ # Food recognition and analysis
β βββ meal_planner/ # AI meal planning service
β βββ workout_planner/ # Workout generation service
βββ nginx/ # Nginx configuration
βββ public/ # Static assets
βββ src/ # React frontend source
β βββ components/ # React components
β β βββ ui/ # ShadCN UI components
β β βββ fitness/ # Fitness-related components
β β βββ nutrition/ # Nutrition components
β β βββ dashboard/ # Dashboard components
β βββ hooks/ # Custom React hooks
β βββ lib/ # Frontend utilities
β βββ pages/ # React pages/routes
β βββ services/ # API client services
β βββ App.tsx # Main React component
β βββ main.tsx # React entry point
βββ .dockerignore # Docker ignore file
βββ .gitignore # Git ignore file
βββ Dockerfile # Docker configuration
βββ LICENSE # Project license
βββ README.md # Project documentation
βββ components.json # ShadCN components config
βββ docker-compose.yml # Docker compose configuration
βββ eslint.config.js # ESLint configuration
βββ index.html # HTML entry point
βββ package-lock.json # NPM lock file
βββ package.json # Node.js dependencies
βββ postcss.config.js # PostCSS configuration
βββ requirements.txt # Python dependencies
βββ tailwind.config.ts # TailwindCSS configuration
βββ tsconfig.app.json # TypeScript app configuration
βββ tsconfig.json # TypeScript configuration
βββ tsconfig.node.json # TypeScript Node configuration
βββ vite.config.ts # Vite configuration
Create a .env file in the root directory:
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
MODEL=model_name
# Tavily API Configuration
TAVILY_API_KEY=your_tavily_api_key_here
The FastAPI backend provides the following key endpoints through specialized services:
POST /api/v1/coach- Get personalized coaching advice
POST /api/v1/food-scanner- Analyze food images for nutritional content
POST /api/v1/meal-planner- Generate personalized meal plans
POST /api/v1/workout-planner- Create custom workout routines
API documentation is available at http://localhost:8000/docs when the backend is running.
- Enhanced search capabilities for fitness and nutrition information
- Real-time data retrieval for up-to-date health trends
- Fact-checking and information validation
- AI Coach Service: Handles all AI-powered coaching interactions
- Food Scanner Service: Uses computer vision for food recognition and analysis
- Meal Planner Service: Manages meal planning algorithms and nutrition data
- Workout Planner Service: Generates and manages fitness routines
# For production deployment, consider using:
gunicorn -w 4 -k uvicorn.workers.UvicornWorker com.mhire.app.main:appnpm run build
# or
yarn build
# or
pnpm build- Heroku - Easy Python app deployment
- AWS EC2/Lambda - Scalable cloud deployment
- DigitalOcean - Simple cloud hosting
- Railway - Modern deployment platform
- Vercel - Recommended for React applications
- Netlify - Great for static site hosting
- AWS S3 + CloudFront - Scalable static hosting
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License Version 2.0 - see the LICENSE file for details.
VitaFlex-AI - Empowering your wellness journey with AI π