Inspiration

Most fitness apps stop after producing a calorie target or workout schedule. Real life is messier: adherence changes, hunger rises, energy falls, and a static plan quickly becomes unrealistic. We built Adaptive AI Fat-Loss Planner around a simple question: how should the plan change to better fit the user's real week?

What it does

Users create an account and save a wellness profile. The app calculates BMI, BMR, TDEE, and a moderate calorie target with deterministic formulas, then generates a structured weekly meal and training plan. After each week, the user records weight, calories, workouts, hunger, energy, difficulty, and feedback. The planner creates the next week with a bounded adjustment and a plain-language explanation. A dashboard shows progress and plan history.

Seven-day recipe guide

Each weekly calorie target now becomes a practical seven-day cooking plan with 21 varied recipes. Every breakfast, lunch, and dinner includes estimated calories, preparation time, ingredients, seasonings, and step-by-step cooking instructions. The three meals plus a flexible snack budget add up to the current daily target, so the weekly feedback loop also flows through to what the user can cook next.

How we built it

  • Frontend: React, TypeScript, Vite, and Recharts
  • Backend: Python, FastAPI, Pydantic, SQLAlchemy, Alembic, JWT, and Argon2
  • Database: PostgreSQL on Render, with SQLite locally
  • AI: OpenAI Responses API with strict structured output and a deterministic mock fallback
  • Deployment: Vercel, Docker, Render Blueprint, and GitHub Actions

We separated deterministic calculations from generated recommendations. Normal code owns arithmetic, validation, authorization, and safety limits. The AI layer handles flexible suggestions, and model responses are schema validated. Identity fields are not sent to the AI provider.

Challenges

The hardest problem was making adaptation useful without allowing uncontrolled calorie changes. We limited changes to 100 kcal per week, added a 1,200 kcal floor, and made rapid weight change, low adherence, high hunger, and low energy override aggressive adjustments. We also coordinated migrations, CORS, JWT ownership checks, resilient fallback, two deployment platforms, and a full recipe experience that stays aligned with the calculated target.

Accomplishments

  • Complete account-to-Week-2 feedback loop
  • Seven-day menu with 21 cookable, calorie-matched recipes
  • Ingredients, seasonings, preparation time, and cooking steps for every dish
  • Explainable, bounded weekly adaptation
  • Persistent PostgreSQL data and migrations
  • JWT-protected routes with ownership checks
  • Graceful AI fallback without an API key
  • Automated CI and deployment

What we learned

AI is most dependable when it handles flexible recommendations while normal code owns calculations and safety constraints. A small feedback loop can be more useful than a large static plan, especially when its recommendations become concrete actions such as deciding what to cook today.

What's next

Enable the live OpenAI provider, personalise recipes from dietary preferences and allergies, generate shopping lists, add richer charts, password reset and account deletion, exportable plans, reminders, accessibility testing, and more durable hosted database storage.

Disclaimer

Adaptive AI Fat-Loss Planner provides general wellness estimates and planning ideas only. It is not medical advice, diagnosis, or treatment. People with medical conditions, a history of disordered eating, pregnancy, or other special requirements should consult a qualified healthcare professional. Do not enter real personal health information into the temporary free hosted demo.

Built With

Share this project:

Updates

Submission history