A comprehensive fitness application powered by Google Gemini AI that provides personalized workout plans, nutrition advice, progress analysis, and motivational coaching. Built with Spring Boot microservices and React frontend.
FitMind leverages Google's Gemini AI to provide intelligent, personalized fitness guidance:
- π§ Smart Workout Planning: AI-generated 7-day personalized workout plans based on your fitness level, goals, and preferences
- π Nutrition Intelligence: Personalized nutrition advice for pre/post workout meals, hydration, and supplements
- π Progress Analysis: AI-powered analysis of your fitness journey with actionable insights and trends
- πͺ Motivational Coaching: Daily personalized motivational messages and mindset guidance
- π‘οΈ Injury Prevention: Comprehensive safety advice and proper technique guidance
- π₯ Social Fitness: AI-suggested local groups, challenges, and fitness events
- 7-day customized workout schedules
- Exercise variety and progression recommendations
- Rest day optimization
- Difficulty level adjustments
- Equipment recommendations
- Pre-workout meal timing and food suggestions
- Post-workout recovery nutrition
- Hydration strategies
- Supplement recommendations
- Dietary restriction accommodations
- Performance trend analysis
- Strength and weakness identification
- Milestone tracking
- Goal achievement predictions
- Personalized improvement recommendations
- Daily inspirational messages
- Goal-oriented encouragement
- Mindset development
- Actionable daily tasks
- Quote-based motivation
- Warm-up routine generation
- Proper technique guidance
- Common mistake identification
- Recovery and stretching advice
- Equipment safety guidelines
- Local fitness group recommendations
- Challenge suggestions
- Event discovery
- Community engagement tips
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β API Gateway β β Config Server β β Monitoring β
β (Port 8080) β β (Port 8888) β β (Prometheus) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β User Service β β Activity Serviceβ β AI Service β
β (Port 8081) β β (Port 8082) β β (Port 8083) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β PostgreSQL β β MongoDB β β RabbitMQ β
β (Port 5432) β β (Port 27017) β β (Port 5672) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Spring Boot 3.x - Microservices framework
- Spring Security - Authentication & authorization
- Spring Data JPA/MongoDB - Data persistence
- Spring Cloud - Service discovery & configuration
- RabbitMQ - Message queuing
- Google Gemini AI - AI-powered recommendations
- Keycloak - Identity and access management
- React 18 - User interface
- Vite - Build tool
- Tailwind CSS - Styling
- React Router - Navigation
- Axios - HTTP client
- React Hot Toast - Notifications
- Docker & Docker Compose - Containerization
- PostgreSQL - Primary database
- MongoDB - Document storage
- Redis - Caching
- Prometheus - Monitoring
- Grafana - Visualization
- Docker & Docker Compose
- Node.js 18+ (for frontend development)
- Java 17+ (for backend development)
- Google Gemini AI API Key
git clone <repository-url>
cd fitMind-ai-Create a .env file in the root directory:
# Gemini AI Configuration
GEMINI_API_URL=https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent
GEMINI_API_KEY=your_gemini_api_key_here
# Database Configuration
POSTGRES_DB=fitnessapp
POSTGRES_USER=fitnessuser
POSTGRES_PASSWORD=fitnesspass
# MongoDB Configuration
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=password
# RabbitMQ Configuration
RABBITMQ_DEFAULT_USER=guest
RABBITMQ_DEFAULT_PASS=guest# Start all services with Docker Compose
docker-compose up -d
# Wait for services to be ready (2-3 minutes)- Frontend: http://localhost:3000
- API Gateway: http://localhost:8080
- Grafana Dashboard: http://localhost:3001
- Prometheus: http://localhost:9090
- Real-time fitness metrics
- AI-generated insights
- Progress visualization
- Quick action buttons
- Track workout sessions
- AI-powered activity analysis
- Performance metrics
- Historical data
- Workout Planning: Personalized 7-day plans
- Nutrition Advice: Meal timing and food recommendations
- Progress Analysis: AI-driven insights and trends
- Motivation: Daily inspirational messages
- Injury Prevention: Safety guidelines and techniques
- Social Features: Local groups and challenges
- AI-generated fitness suggestions
- Personalized improvement tips
- Goal-oriented recommendations
- Progress-based insights
- User preferences
- Fitness goals
- Achievement tracking
- Settings management
POST /api/ai/recommendations # Generate activity recommendations
GET /api/ai/recommendations/{userId} # Get user recommendations
POST /api/ai/workout-plan # Generate personalized workout plan
POST /api/ai/nutrition-advice # Get nutrition guidance
POST /api/ai/progress-analysis # Analyze fitness progress
POST /api/ai/motivation # Generate motivational messages
POST /api/ai/injury-prevention # Get safety advice
POST /api/ai/social-features # Find social opportunities
POST /api/ai/personalized-coaching # Comprehensive AI coachingGET /api/activities # Get user activities
POST /api/activities # Create new activity
GET /api/activities/{id} # Get specific activity
PUT /api/activities/{id} # Update activity
DELETE /api/activities/{id} # Delete activityThe AI analyzes your:
- Current fitness level
- Available equipment
- Time constraints
- Previous workout history
- Personal goals
Example AI Response:
{
"plan": {
"name": "Intermediate Strength & Cardio Plan",
"days": [
{
"day": 1,
"name": "Upper Body Strength",
"exercises": [
{
"name": "Push-ups",
"sets": 3,
"reps": "10-15",
"rest": "60 seconds"
}
]
}
]
}
}AI considers:
- Activity type and intensity
- Caloric expenditure
- Dietary restrictions
- Meal timing
- Hydration needs
AI analyzes patterns in:
- Workout frequency
- Performance improvements
- Plateaus and setbacks
- Goal progression
- Recovery patterns
Personalized motivation based on:
- Current mood
- Recent achievements
- Goal proximity
- Historical patterns
- Personal preferences
- JWT-based authentication
- Role-based access control
- API rate limiting
- Secure password hashing
- CORS configuration
- Input validation
- Real-time service health monitoring
- Performance metrics
- Error tracking
- User activity analytics
- AI recommendation effectiveness
# Start individual services
cd activityservice && ./mvnw spring-boot:run
cd aiservice && ./mvnw spring-boot:run
cd gateway && ./mvnw spring-boot:runcd fitness-app-frontend
npm install
npm run dev# Backend tests
./mvnw test
# Frontend tests
npm test- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
- Google Gemini AI for intelligent fitness recommendations
- Spring Boot team for the excellent framework
- React team for the powerful frontend library
- The fitness community for inspiration and feedback
Ready to transform your fitness journey with AI? Start FitMind today! π