Personalized Longevity Diet Planner
Create a diet plan tailored to your body and longevity goals in just a few steps.
Tell us about yourself
What are your dietary preferences?
What are your primary health goals?
Select your main focus. The plan will prioritize foods known to support this area.
Primary Goal: ${goalInfo.name}
${generateMealHTML('Breakfast', plan.breakfast)}
${generateMealHTML('Lunch', plan.lunch)}
${generateMealHTML('Dinner', plan.dinner)}
${generateMealHTML('Snacks', plan.snacks)}
Disclaimer: This is a sample plan for informational purposes only. It is not medical advice. Consult a registered dietitian or healthcare provider for personalized nutritional guidance. Serving sizes are illustrative.
`; document.getElementById('plan-output').innerHTML = planHTML; } function getFood(foodList, type, goal) { // Prioritize foods that match the goal, then fallback to any food of the type let candidates = foodList.filter(f => f.type === type && f.tags.includes(goal)); if (candidates.length === 0) { candidates = foodList.filter(f => f.type === type); } return candidates[Math.floor(Math.random() * candidates.length)] || { name: `No ${type} available`, calories: 0 }; } function generateMealHTML(mealName, foods) { let totalCalories = foods.reduce((sum, food) => sum + (food.calories || 0), 0); return `${mealName} ~${totalCalories} kcal
-
${foods.map(f => `
- ${f.name} `).join('')}
${mealName}
| Subtotal | ~${totalCalories} kcal |
Personalized Longevity Diet Report
Generated on: ${date}
Your Profile Summary
| Age: | ${userData.age} years | Gender: | ${userData.gender} |
| Weight: | ${userData.weight} lbs | Height: | ${userData.height} in |
| Estimated Daily Needs: | ${userData.tdee} kcal | ||
Longevity Goal: ${goalInfo.name}
${goalInfo.description}
