AI Nutrition Coach - Vision-Grounded Calorie Tracking
    Let's talk

    Client

    Personal Project

    Duration

    4 months

    Year

    2026

    AI Nutrition Coach is built around a core architectural insight: separate "seeing" from "calculating." A photo of a meal is identified by a vision model, but every calorie and macro number comes straight from real scientific data rather than an LLM guess. The result is a full nutrition tracking product — photo-based meal logging, an AI coaching agent with full meal history in context, a goals and progress system built on established formulas, and a clinician dashboard for professional oversight — shipped across four fully completed phases.

    team member

    Personal Project

    Client

    Designed a 2-stage pipeline that strictly separates recognition from calculation. Stage 1 uses GPT purely to identify food items and estimate portion sizes in grams — it never touches a calorie or macro number. Stage 2 matches every identified food against USDA FoodData Central and computes macros directly from real scientific data (per_100g × portion_grams / 100). Shipped this across four phases: a core photo-to-macro loop with an edit/confirm screen and confidence badges feeding daily calorie/macro rings; an AI coaching agent with full meal history in context, streaming token-by-token responses, and proactive nudges based on remaining macro targets; a goals and progress system with an onboarding wizard computing TDEE via the Mifflin-St Jeor equation, auto-generated macro targets, and 7-day adherence tracking with streaks; and a clinician dashboard with role-based access, invite-based patient-clinician linking, target overrides, and clinical notes. Every phase was built spec-first — a written contract covering DB schema, Pydantic models, API shapes, UI layout, and a verification checklist — before any code was written, which is why 54 tests pass in CI with zero real API calls using mocked vision and USDA providers.

    0% Hallucinated

    Calorie Accuracy

    All macros computed from USDA FoodData Central

    4/4

    Shipped Phases

    Core loop, coaching, goals, clinician dashboard

    54 Tests

    Test Coverage

    Passing in CI with zero real API calls

    Mifflin-St Jeor

    Goal Calculation

    TDEE-based auto-generated macro targets

    Detail Image 1

    The Challenge

    Nutrition tracking apps that rely on an LLM to estimate calories directly are prone to hallucinated numbers, which is unacceptable for a tool meant to guide real dietary decisions. The system needed a way to use a vision model's strength at recognizing food and estimating portions, without ever trusting it to produce the actual calorie or macro values. It also needed to support coaching, goal-setting grounded in established metabolic formulas, and clinical oversight, all verified by a strong automated test suite rather than live API calls.

    Designed a 2-stage pipeline that strictly separates recognition from calculation. Stage 1 uses GPT purely to identify food items and estimate portion sizes in grams — it never touches a calorie or macro number. Stage 2 matches every identified food against USDA FoodData Central and computes macros directly from real scientific data (per_100g × portion_grams / 100). Shipped this across four phases: a core photo-to-macro loop with an edit/confirm screen and confidence badges feeding daily calorie/macro rings; an AI coaching agent with full meal history in context, streaming token-by-token responses, and proactive nudges based on remaining macro targets; a goals and progress system with an onboarding wizard computing TDEE via the Mifflin-St Jeor equation, auto-generated macro targets, and 7-day adherence tracking with streaks; and a clinician dashboard with role-based access, invite-based patient-clinician linking, target overrides, and clinical notes. Every phase was built spec-first — a written contract covering DB schema, Pydantic models, API shapes, UI layout, and a verification checklist — before any code was written, which is why 54 tests pass in CI with zero real API calls using mocked vision and USDA providers.

    Detail Image 2Detail Image 3
    Detail Image 4

    Our Solution

    Designed a 2-stage pipeline that strictly separates recognition from calculation. Stage 1 uses GPT purely to identify food items and estimate portion sizes in grams — it never touches a calorie or macro number. Stage 2 matches every identified food against USDA FoodData Central and computes macros directly from real scientific data (per_100g × portion_grams / 100). Shipped this across four phases: a core photo-to-macro loop with an edit/confirm screen and confidence badges feeding daily calorie/macro rings; an AI coaching agent with full meal history in context, streaming token-by-token responses, and proactive nudges based on remaining macro targets; a goals and progress system with an onboarding wizard computing TDEE via the Mifflin-St Jeor equation, auto-generated macro targets, and 7-day adherence tracking with streaks; and a clinician dashboard with role-based access, invite-based patient-clinician linking, target overrides, and clinical notes. Every phase was built spec-first — a written contract covering DB schema, Pydantic models, API shapes, UI layout, and a verification checklist — before any code was written, which is why 54 tests pass in CI with zero real API calls using mocked vision and USDA providers.

    Nutrition tracking apps that rely on an LLM to estimate calories directly are prone to hallucinated numbers, which is unacceptable for a tool meant to guide real dietary decisions. The system needed a way to use a vision model's strength at recognizing food and estimating portions, without ever trusting it to produce the actual calorie or macro values. It also needed to support coaching, goal-setting grounded in established metabolic formulas, and clinical oversight, all verified by a strong automated test suite rather than live API calls.

    Detail Image 5

    Latest projects

    More projects

    Bokuza - Digital Products MarketplaceJewasity - Jewish Community Media & Content Sharing Platform

    Let's work together

    Ready to bring your vision to life? Get in touch and let's create something amazing together.