Building an AI calorie tracker with Claude

Every calorie app hands you one confident number — “620 calories” — no range, no doubt, and a paywall before it will even tell you that. It looks precise, and it often isn’t.

So I built my own. TrueBite: snap a photo of a dish and get the calories, the ingredients, and — most importantly — how sure it is. Free, no account, no card.

What I built

TrueBite is a web app you can open on your phone. You take a photo of your food, tap analyze, and a few seconds later you get:

  • The dish name
  • An estimated portion (“about 1 bowl, ~300 g”)
  • Calories — shown as a best guess and a range (“~520 cal, likely 450–600”)
  • A confidence level: high, medium, or low
  • Protein, carbs, and fat
  • A breakdown of every ingredient it spotted, with calories for each

A photo can’t show you the oil in the pan or how much rice is hiding under the curry. Pretending otherwise is how you end up trusting a number that’s 30% off. TrueBite tells you when it’s guessing.

Tech stack

The surprising part is how little there is to it:

  • The brain: a single call to Claude’s vision model. The photo goes in, a structured JSON estimate comes out. That’s the whole engine — one function.
  • The app: Next.js, deployed on Vercel.
  • A trick for phones: it shrinks big photos right in the browser before sending, so it’s fast and works from any phone.

What I learnt

  • The prompt is the product. The value was in what I asked it to do — give a range, rate its confidence, catch absurd numbers, find hidden ingredients. That’s where the time went, not the code.
  • Portion size is the hard part. A flat photo has no depth, so “how much” is where the error lives. The fix isn’t a fancier camera — it’s letting the user nudge the estimate.
  • Honesty is a real edge. Once I showed uncertainty instead of hiding it, the product got better and more trustworthy at once.

Who this is for

Anyone who wants a quick, rough sense of what they’re eating without downloading an app, making an account, or handing over a card. It won’t replace a dietitian and it isn’t medical advice — it’s a fast, honest ballpark. That covers most of us most of the time.

Try it : https://calorie-snap-pi.vercel.app/