Overview
FitAiid’s nutrition planning system complements the AI workout generator by providing users with meal guidance tailored to their fitness goals. The system considers user profiles including weight goals, activity level, and dietary preferences.Nutrition Profile
The nutrition planning is based on the user’s fitness profile which includes:Basic Metrics
- Current weight
- Height
- Age
- Gender
Fitness Goals
- Main goal (lose weight, gain muscle, maintain)
- Activity level
- Training frequency
Dietary Preferences
- Medical conditions
- Food allergies
- Dietary restrictions
Calculations
- BMI (Body Mass Index)
- Recommended calorie intake
- Macro distribution
BMI Calculation
The system automatically calculates Body Mass Index when users enter their height and weight:Fitness Profile API
Save Fitness Profile
Users submit their nutritional information through the questionnaire endpoint:Get Fitness Profile
Backend Implementation
Questionnaire Controller
Frontend Integration
Loading User Profile
Nutritional Goals by Objective
The system provides different nutritional recommendations based on user goals:Lose Weight
Lose Weight
Caloric Deficit: 15-20% below maintenance caloriesMacros:
- Protein: 30-35% (to preserve muscle)
- Carbs: 30-40%
- Fats: 25-30%
- Focus on high-protein, low-calorie foods
- Increase vegetable intake
- Reduce refined sugars and processed foods
- Stay hydrated (2-3 liters daily)
Gain Muscle Mass
Gain Muscle Mass
Caloric Surplus: 10-15% above maintenance caloriesMacros:
- Protein: 30-35% (1.6-2.2g per kg of body weight)
- Carbs: 40-50%
- Fats: 20-25%
- Eat protein with every meal
- Consume complex carbs around workouts
- Don’t neglect healthy fats
- Consider 4-6 smaller meals per day
Maintain / Tone
Maintain / Tone
Maintenance Calories: Stay at current caloric needsMacros:
- Protein: 25-30%
- Carbs: 40-45%
- Fats: 25-30%
- Balanced meals with variety
- Time carbs around training sessions
- Focus on whole, unprocessed foods
- Consistent meal timing
User Data Structure
The fitness profile is stored in the User model:User Flow
Complete Questionnaire
Users fill out their personal information, including height, weight, age, and fitness goals
The fitness profile is used not only for nutrition recommendations but also to personalize workout routines, exercise difficulty, and rest periods.
Security & Validation
MongoDB ID ValidationThe system validates user IDs before database queries:
Integration with Workouts
The nutrition profile directly influences workout generation:- Beginners get easier exercises with more rest
- Weight loss goals include more cardio and HIIT
- Muscle gain focuses on strength training and progressive overload
- Home training uses bodyweight and minimal equipment
- Gym training includes machine and free weight exercises
Related Features
- AI Workouts - Personalized routines based on fitness profile
- Progress Tracking - Monitor weight changes over time
- Push Notifications - Meal time reminders