Projects

Things I’ve built

A short write-up of each project — what it does, and the interesting parts of how it works.

Macro

In development

A calorie and macro tracker that works out your daily targets from your own body stats and goal — lose, maintain, or gain — rather than a one-size-fits-all number. Targets come from the Mifflin–St Jeor BMR formula, adjusted for your activity level and for whether a given day is a workout or a rest day, and they always recalculate against your most recent weigh-in rather than the weight you signed up with.

The part I find most interesting is the split between what the AI does and what the code does. Two features use Claude, and in both the model is only allowed to organise real data — it never supplies a number:

  • Label scanning. Photograph a product's nutrition panel and a vision model transcribes the printed values. It works in any language, because it's reading a real label rather than guessing macros from a food name.
  • Meal planning. Claude composes a recipe — the dish, the method, the ingredient amounts — but it can only draw on ingredient names from a fixed 185-item database. Every macro figure is then computed server-side from that database's real per-100g values, and any ingredient the model invents is discarded rather than trusted.

Food lookup uses the USDA FoodData Central database, proxied through the server so the API key never reaches the browser. Alongside the daily tracker there's a calendar with a weight-trend chart, saved recipes, a week/month/all-time summary of what you ate against what you were allowed, a "Worth It?" tool that tells you how many grams of something fit in the macros you have left, and a personal schedule with day/week/month views and recurring events.

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS v4
  • Anthropic Claude API
  • USDA FoodData Central
  • NextAuth