Inspiration

My wife and I both work long hours and have two daughters under two years old. By the time the day is done, the last thing either of us can think about is what to cook for dinner. We'd end up ordering takeout or throwing together something quick and unhealthy — not because we didn't care, but because we were exhausted and decision fatigue had already won.

We wanted something that could take that burden away. Not just a recipe app, but an AI that actually knows what you've already eaten today, understands your macro goals, and suggests exactly what you should cook tonight to round out your nutrition. That idea became Eleanor.


What We Built

Eleanor is an AI meal planner and nutrition tracker powered by Amazon Nova on AWS Bedrock. Users can:

  • Log meals by voice — speak naturally and Eleanor transcribes and estimates the nutrition
  • Log meals by photo — photograph a plate or a nutrition label and Eleanor handles the rest
  • Chat for recipes — ask Eleanor what to cook and she'll generate a personalised recipe sized to fit your remaining macro budget for the day
  • Track macros and weight — a full food diary with daily calorie and macro totals

How We Built It

The backend is a FastAPI server running on Python, with all AI powered by Amazon Bedrock:

  • Amazon Nova 2 Lite handles chat, recipe generation, and nutrition calculation via an agentic tool-use loop
  • Amazon Nova 2 Sonic powers real-time voice transcription via bidirectional streaming
  • Multimodal Nova 2 Lite analyses food photos and reads nutrition labels directly from images
  • AWS DynamoDB stores users, meal logs, saved recipes, and weight history
  • The mobile app is built in React Native (Expo) for iPhone

This was my first time building a mobile app — I had never written React Native before this project.


The 3-Pass Nutrition Pipeline

One of the biggest challenges was getting accurate macro calculations. Early versions of Eleanor would hallucinate nutrition values — confidently returning 0g of fat for a meal cooked in butter, or wildly incorrect calorie totals that didn't add up across ingredients.

To solve this, we built a 3-pass Nova pipeline for every nutrition estimate:

Pass 1 — Identify: Nova examines the image or text description and produces a structured ingredient list with estimated quantities. For photos, it checks for a nutrition label first — if one is found, it reads the values directly and skips to the result.

Pass 2 — Calculate: A second Nova call takes the ingredient list and calculates calories, protein, carbs, and fat for each item using USDA food database values, then sums them. Separate prompts enforce that Nova never returns zero for a macro the food clearly contains.

Pass 3 — QA: A final Nova call reviews its own work. For photo inputs, Nova looks at the original image again and checks whether the portion estimates match what it actually sees. For text inputs, it checks for implausible zero values and corrects them. A final deterministic step recalculates calories from macros using the formula:

$$\text{Calories} = (\text{Protein} \times 4) + (\text{Carbs} \times 4) + (\text{Fat} \times 9)$$

If the stated calorie total deviates from the calculated value by more than 15%, the pipeline overrides it with the mathematically correct figure.

This approach turned Eleanor from an app that frequently hallucinated nutrition data into one that consistently produces reliable, coherent macro estimates.


Challenges

  • Learning to build a mobile app from scratch — React Native, Expo, navigation, AsyncStorage, camera and microphone permissions — all new to me
  • Nova Sonic bidirectional streaming — implementing real-time audio streaming to Nova 2 Sonic required learning a new AWS SDK with limited documentation
  • iOS HTTP restrictions — iOS blocks plain HTTP in native apps, requiring a localtunnel HTTPS setup for local development
  • Nutrition hallucinations — solved with the 3-pass pipeline described above
  • Agentic loop guardrails — Eleanor would sometimes try to log a meal before asking the user to confirm. We added a confirmation guard that blocks the log_meal tool call unless the user has explicitly said yes in their last message

What We Learned

  • How to build and ship a full-stack mobile app end to end — this was my first ever mobile app
  • How to use Amazon Bedrock's Converse API with tool use for agentic workflows
  • How to integrate Nova 2 Sonic's bidirectional streaming for real-time voice transcription
  • How multi-pass prompting dramatically improves AI output reliability and eliminates hallucinations
  • AWS as a full platform — beyond just the AI, this project introduced us to DynamoDB for NoSQL data storage, IAM for access management, and how AWS services connect together to form a production-ready backend
  • Designing a data model for tracking — structuring DynamoDB tables to efficiently store and query meal logs, weight history, saved recipes, and user profiles taught us how to think about persistence and data relationships in a real app
  • That with the right tools, a sleep-deprived parent can still ship something they're proud of

Built With

Share this project:

Updates