Overview
My Plan is your comprehensive weekly meal management center. It displays your complete 7-day nutrition plan with detailed statistics, allows you to visualize daily meal distributions, and provides powerful tools to swap individual recipes using AI-powered recommendations.What It Does
My Plan serves as your weekly nutrition command center:- Weekly Overview: Displays all meals for every day of the week
- Nutritional Statistics: Shows average daily intake of calories, protein, carbs, and fats
- Visual Meal Cards: Presents each recipe with images, nutritional info, and action buttons
- AI-Powered Swaps: Suggests alternative recipes using machine learning
- Day Navigation: Quickly jump to any day of the week
- Progress Tracking: Compares your plan’s averages against your nutritional goals
Key Capabilities
Weekly Statistics
View average daily nutritional metrics across your entire week to ensure consistency.
Meal Visualization
Each meal is displayed as a card with recipe image, name, and complete macro breakdown.
Smart Recipe Swaps
Request AI-suggested alternatives for any meal using the trained KNN recommendation model.
Day-by-Day Navigation
Click on any day to scroll directly to that day’s meal section.
Goal Comparison
Stats cards show current vs. target values for quick goal alignment checks.
Recipe Details
View complete nutritional information for each recipe including calories and all macros.
How to Use My Plan
Access Your Plan
Click 📆 My Nutrition Plan in the sidebar to view your active weekly meal plan.
You must have an active plan generated through the AI Chat before accessing My Plan.
Review Weekly Statistics
At the top of the page, check your average daily nutritional intake:
- Calories (kcal)
- Proteins (g)
- Carbohydrates (g)
- Fats (g)
Navigate Through Days
Use the day selector buttons to jump to specific days:
- Click any day name (Monday, Tuesday, etc.)
- The page scrolls to that day’s meal section
Review Daily Meals
Each day shows all scheduled meals in order:
- Breakfast
- Mid-morning snack (if applicable)
- Lunch
- Afternoon snack (if applicable)
- Dinner
- Evening snack (if applicable)
Interface Components
Weekly Statistics Cards
The top section displays four prominent statistics cards:- Calories Card
- Proteins Card
- Carbohydrates Card
- Fats Card
- Icon: Flame 🔥
- Current: Average daily calories across the week
- Goal: Your target daily calorie intake
- Unit: kcal
Averages Explained: Statistics show the average across all 7 days, helping you identify if your weekly plan is balanced or if certain days skew high/low.
Day Selector
The day selector provides quick navigation:- Layout: Horizontal row of day names (Mon, Tue, Wed, etc.)
- Interaction: Click any day to scroll to its section
- Visual Feedback: Active day is highlighted
- Responsive: Adapts to mobile screens
Day Sections
Each day has its own section displaying:Day Header
- Day name (e.g., “Monday”)
- Day number (1-7)
Meal Cards
Each meal is presented as an interactive card:Card Layout
Card Layout
Left Side:
- Recipe image (or placeholder if unavailable)
- “Swap Recipe” button
- Recipe name
- Meal type badge (Breakfast, Lunch, Dinner, Snack)
- Nutritional breakdown:
- Calories (kcal)
- Protein (g)
- Carbs (g)
- Fat (g)
Swap Recipe Button
Swap Recipe Button
Recipe Swap Workflow
The swap feature uses a trained K-Nearest Neighbors (KNN) machine learning model:AI Processes Request
The system:
- Identifies the current recipe and meal type
- Queries the KNN model for similar recipes
- Filters by your dietary restrictions and preferences
- Selects the best alternative
Suggestion Presented
You see a comparison:
- Original recipe (name, calories, macros)
- Suggested alternative (name, calories, macros)
- Visual difference highlight
User Decision
Choose one of three actions:
- Accept: Replace the meal in your plan
- Request Another: Get a different suggestion
- Cancel: Keep the original recipe
ML Model Details: The KNN model was trained on 91,000+ clean recipes, considering nutritional similarity, diet types, and ingredient compatibility.
Daily Meal Distribution
Your plan displays meals according to your profile’s “meals per day” setting:| Meals Per Day | Typical Schedule |
|---|---|
| 3 meals | Breakfast, Lunch, Dinner |
| 4 meals | Breakfast, Lunch, Snack, Dinner |
| 5 meals | Breakfast, Snack, Lunch, Snack, Dinner |
| 6 meals | Breakfast, Snack, Lunch, Snack, Dinner, Snack |
Use Cases
Weekly Meal Prep Planning
Weekly Meal Prep Planning
Use My Plan to create your weekly grocery list:
- Open My Plan
- Review all recipes for the week
- Note ingredients needed for each recipe
- Shop for the entire week in one trip
Meal Variety Check
Meal Variety Check
Scan through the week to ensure you’re not eating the same thing too often:
- Look for repeated recipes
- Check for ingredient variety
- Swap meals if you see too much repetition
Adapting to Schedule Changes
Adapting to Schedule Changes
If your week’s schedule changes:
- Swap a complex dinner recipe for a quick one on busy days
- Replace a meal you won’t be home for
- Adjust portion sizes by swapping to higher/lower calorie options
Nutritional Optimization
Nutritional Optimization
Use the statistics to fine-tune your plan:
- If protein is consistently low, swap meals for high-protein alternatives
- If calories are too high, request lower-calorie swaps
- Balance macros across the week by strategic swapping
Accommodating Food Preferences
Accommodating Food Preferences
As you discover recipes you love or dislike:
- Keep favorites in your plan
- Swap out meals you’re not excited about
- Gradually optimize your weekly routine to your taste
Sharing with Family/Roommates
Sharing with Family/Roommates
Statistics Insights
Goal Alignment
If your average intake matches your goals (within 5-10%), your plan is well-calibrated.
Macro Distribution
Compare the ratio of protein:carbs:fats to ensure it aligns with your diet type (e.g., high-protein for muscle gain, higher fat for keto).
Consistency Check
Ideally, each day should be within 10-15% of your daily goal. Large variations may indicate imbalanced days.
Progressive Adjustment
Over time, use statistics to incrementally improve your plan by swapping outlier meals.
Plan States
- Active Plan
- No Plan
- Loading
When you have a current meal plan:
- Full week is displayed
- All statistics are calculated
- Swap functionality is available
- You can track daily progress
Interactive Features
Real-Time Updates
When you accept a recipe swap, the plan updates immediately without page refresh.
Visual Feedback
Cards highlight on hover, buttons show loading states during swaps, and success indicators confirm changes.
Smooth Scrolling
Clicking day names smoothly scrolls to that section for a polished UX.
Responsive Design
My Plan adapts to all screen sizes - desktop, tablet, and mobile.
Technical Details
KNN Recommendation Model
The recipe swap feature is powered by a K-Nearest Neighbors (KNN) machine learning model:- Training Data: 91,056 cleaned recipes from Food.com dataset
- Features: Nutritional content (calories, protein, carbs, fats, fiber, sugar, etc.)
- Algorithm: Euclidean distance in scaled feature space
- Filtering: Results filtered by meal type and dietary restrictions
- Objective: Find recipes with similar nutritional profiles
The model ensures swaps maintain nutritional consistency, helping you stay on track with your goals.
Data Flow
- Fetch Plan: GET request to
/api/plan/current - Transform Data: Convert API response to UI-friendly format
- Calculate Stats: Compute weekly averages for display
- Swap Request: POST to
/api/ml/swap-recipewith recipe ID and meal type - Update Plan: PUT to
/api/meal-detail/{id}with new recipe ID - Refresh UI: Update state and recalculate statistics
Tips for Effective Meal Planning
Related Features
- Dashboard: Track daily execution of your weekly plan
- AI Chat: Generate new plans or request plan-wide modifications
- Profile Setup: Adjust preferences that influence plan generation
Plan Flexibility
Your meal plan is a guide, not a rigid schedule. Life happens! Use the swap feature freely to adapt your plan to real-world circumstances while maintaining nutritional consistency.
