jakji93 / airon-fitness

AIRON Fitness is an AI-powered fitness companion supporting your personal health journey by delivering customized fitness and meal plans tailored to your goals and preferences.
https://airon-fitness.onrender.com/
MIT License
3 stars 2 forks source link

Implement mealScheduleController openAI API calls, route privacy, and refactoring #39

Closed d-x-s closed 12 months ago

d-x-s commented 1 year ago

Notes:

Meal Schedule Creation: Example user flow (made with actual API calls): 1) Generated schedule

{
  "mealPlan": {
    "Monday": {
      "breakfast": "Omelette with vegetables (spinach, bell peppers, onions) and a side of whole wheat toast",
      "snack1": "Greek yogurt with mixed berries",
      "lunch": "Grilled chicken breast with quinoa and steamed broccoli",
      "snack2": "Protein shake with almond milk",
      "dinner": "Salmon fillet with roasted sweet potatoes and asparagus"
    },
    "Tuesday": {
      "breakfast": "Avocado toast on whole grain bread with a side of sliced tomatoes",
      "snack1": "Hard-boiled eggs",
      "lunch": "Turkey lettuce wraps with hummus and cucumber slices",
      "snack2": "Mixed nuts",
      "dinner": "Lean beef stir-fry with brown rice and mixed vegetables"
    },
    "Wednesday": {
      "breakfast": "Smoothie made with spinach, banana, almond milk, and protein powder",
      "snack1": "Apple slices with almond butter",
      "lunch": "Grilled shrimp salad with mixed greens, cherry tomatoes, and balsamic vinaigrette",
      "snack2": "Cottage cheese with pineapple chunks",
      "dinner": "Baked chicken thighs with roasted Brussels sprouts and quinoa"
    },
    "Thursday": {
      "breakfast": "Vegetable omelette with a side of whole wheat toast",
      "snack1": "Greek yogurt with honey",
      "lunch": "Salmon salad with mixed greens, avocado, and lemon dressing",
      "snack2": "Protein bar",
      "dinner": "Grilled tofu with stir-fried vegetables and brown rice"
    },
    "Friday": {
      "breakfast": "Quinoa porridge with almond milk, topped with berries and nuts",
      "snack1": "Carrot sticks with hummus",
      "lunch": "Chicken and vegetable stir-fry with brown rice noodles",
      "snack2": "Trail mix",
      "dinner": "Baked cod with roasted sweet potatoes and green beans"
    },
    "Saturday": {
      "breakfast": "Whole grain pancakes with sliced bananas and a drizzle of honey",
      "snack1": "Protein smoothie with almond milk and spinach",
      "lunch": "Turkey and avocado wrap with whole wheat tortilla",
      "snack2": "Greek yogurt with granola",
      "dinner": "Grilled steak with roasted vegetables and quinoa"
    },
    "Sunday": {
      "breakfast": "Egg white omelette with spinach, mushrooms, and feta cheese",
      "snack1": "Mixed berries with cottage cheese",
      "lunch": "Quinoa salad with grilled chicken, cherry tomatoes, and cucumber",
      "snack2": "Rice cakes with almond butter",
      "dinner": "Baked salmon with steamed asparagus and wild rice"
    }
  }
} 

2) Set custom inputs

0 "make my meal plan vegetarian"
1 "make my meal plan low calorie"

3) Transform schedule (not totally accurate, but still improved based on the custom inputs. Need to spend some time refining the prompt.)

{
  "mealPlan": {
    "Monday": {
      "breakfast": "Vegetable omelette with a side of whole wheat toast",
      "snack1": "Greek yogurt with mixed berries",
      "lunch": "Quinoa and steamed broccoli",
      "snack2": "Protein shake with almond milk",
      "dinner": "Roasted sweet potatoes and asparagus"
    },
    "Tuesday": {
      "breakfast": "Avocado toast on whole grain bread with a side of sliced tomatoes",
      "snack1": "Hard-boiled eggs",
      "lunch": "Hummus and cucumber slices",
      "snack2": "Mixed nuts",
      "dinner": "Brown rice and mixed vegetables"
    },
    "Wednesday": {
      "breakfast": "Smoothie made with spinach, banana, almond milk, and protein powder",
      "snack1": "Apple slices with almond butter",
      "lunch": "Grilled shrimp salad with mixed greens, cherry tomatoes, and balsamic vinaigrette",
      "snack2": "Cottage cheese with pineapple chunks",
      "dinner": "Roasted Brussels sprouts and quinoa"
    },
    "Thursday": {
      "breakfast": "Vegetable omelette with a side of whole wheat toast",
      "snack1": "Greek yogurt with honey",
      "lunch": "Salad with mixed greens, avocado, and lemon dressing",
      "snack2": "Protein bar",
      "dinner": "Grilled tofu with stir-fried vegetables and brown rice"
    },
    "Friday": {
      "breakfast": "Quinoa porridge with almond milk, topped with berries and nuts",
      "snack1": "Carrot sticks with hummus",
      "lunch": "Vegetable stir-fry with brown rice noodles",
      "snack2": "Trail mix",
      "dinner": "Baked cod with roasted sweet potatoes and green beans"
    },
    "Saturday": {
      "breakfast": "Whole grain pancakes with sliced bananas and a drizzle of honey",
      "snack1": "Protein smoothie with almond milk and spinach",
      "lunch": "Turkey and avocado wrap with whole wheat tortilla",
      "snack2": "Greek yogurt with granola",
      "dinner": "Grilled vegetables and quinoa"
    },
    "Sunday": {
      "breakfast": "Egg white omelette with spinach, mushrooms, and feta cheese",
      "snack1": "Mixed berries with cottage cheese",
      "lunch": "Quinoa salad with grilled tofu, cherry tomatoes, and cucumber",
      "snack2": "Rice cakes with almond butter",
      "dinner": "Baked salmon with steamed asparagus and wild rice"
    }
  }
}