Inspiration

When I was going to the gym regularly, I was always questioning how much I should eat and what my macros should be. Was I eating too much or too little? Was I making good progress? Was there something I could adjust to get better results?

I could track my food and weight, but understanding what those numbers meant together was harder. I built Baseline to help answer those questions.

What it does

Baseline is an iPhone app for anyone changing their body, on a bulk, a cut, or a GLP-1. You weigh in each morning on a smart scale and roughly log what you ate. Baseline then:

  • Learns your real maintenance, what you can eat and stay the same weight, from your own weigh-ins and food, instead of guessing from a formula. A shaded range shows how sure it is, and it narrows every week.
  • Splits every gain or loss into fat and muscle, with a range, by following your smart scale's body-fat trend and checking it against published research.
  • Names your water swings as water. Tag a salty dinner or a short night, and it learns your own patterns ("Monday mornings +0.9 lb") and takes them out of your trend.
  • Sets one number to eat each week, with protein, and if it changes, says why it changed.
  • Lets you set a target weight and body fat, and works out the muscle, the time it takes, and the pace.
  • Has a coach you can text. "What about eating 2,800 a day?" gets an answer worked out by the engine.

How we built it

  • iPhone app: SwiftUI and Swift Charts for iOS 26, built from Apple's own components and in dark mode.
  • Engine: TypeScript. Every number comes from arithmetic on published models: energy balance for maintenance, Hall's energy costs for fat and lean, Forbes for how a loss splits, and a trend line that removes learned water effects.
  • Coach: Claude. It never does math. It gets the engine's facts and calls engine tools (what-if, pace to a goal, tag a weigh-in) for any number it needs. With no API key, a scripted coach runs on the same numbers.
  • Demo data: two made-up people whose real numbers we set in advance and hid from the engine.

The screenshots are the iPhone app running in the iOS simulator. The repo also has a simpler web version that uses the same engine but doesn't have every screen.

Challenges we ran into

  • Day-to-day weight is mostly water. A salty dinner moves the scale more than a week of eating does.
  • Smart-scale body fat swings with hydration, so Baseline had to follow the trend across many readings rather than trust any one morning.
  • Keeping the AI out of the math. A language model will happily invent a number, so every number moved into the engine.

Accomplishments that we're proud of

On generated test data, where we set the real answers and hid them from the engine:

  • For Jordan, a lifter, Baseline found his maintenance at 2,961 ± 124 kcal against a hidden truth ending at 2,960, while the standard formula said about 3,190. It found 47% of his gain was lean, against a hidden 50%.
  • For Emily, two months on semaglutide, it found 29% of her loss was lean, against a hidden 30%, in line with the quarter to two-fifths seen in the GLP-1 trials.
  • From tagged mornings, it learned how much his Mondays and her period weeks add on the scale (+0.9 lb and +1.8 lb) and took that water out of the trend. It missed one planted effect, water the day after leg days.

What we learned

  • The hard part is the noise, not the formula.
  • Showing a range that narrows as the app learns you is more convincing than a confident number on day one.
  • Keep the AI to words.
  • Don't spend all your time designing.

What's next for Baseline

  • Real Apple Health connections, so the scale, food app, and watch fill everything in.
  • Running the engine on the phone, with no server.
  • Testing against DEXA scans on real people.

Built With

Share this project:

Updates

Submission history