The overview
The programme day, the sessions and the body on one screen.

How does a training session stack up against the food I put away, counted in calories?
That’s what I wanted to find out, so I built an app that kept count for me. The reason? I had just signed up for a ten-week training programme, and wanted to keep track daily.
So the solution had to log training sessions, weight & muscle/fat percentage, know what food I had eaten, and then turn all of it into a balance of calories in vs calories out. The training was handled by my Apple Watch Ultra, weight and other bodily things were measured by a Withings scale — but the food? How do you turn “three eggs and a banana” into calories?
I started out trying to look up foods in a couple of public databases, but it turned out Swedish foods weren’t well represented in openfoodfacts.org and the like. The Swedish Food Agency was also missing certain specific products — “Lindahls vaniljkvarg”, for instance.
So I made a curated list of what was missing (and that I ate often) on top of the Food Agency’s open data. Specific products (fish, for one) I found on the manufacturers’ own websites.
Barcode scanning is the obvious answer to fast food logging, so I built that too, but with certain products missing it was still quickest to just type free text into the app.
“150 g kalkonfärs, 2 ägg, 3 dl mjölk” — 150 g turkey mince, two eggs, 300 ml milk — becomes three entries with the right units. The parser reads quantity, measure and food out of the sentence and looks up what the household measure weighs.
That was the whole basic question when I decided to build the app. Being able to see day by day how “things are going” felt like it would spur me on to eat better or train more.
A view that’s always current, if a theoretical one
The app showed theoretical basal metabolism over time; that is: an adult man burns around 2,000 kCal a day. A training session burns more, and then you add what you eat. The sum is either a surplus or a deficit.
Here Friday’s PT session is added: 399 kcal moves the subtotal and the net. The numbers are demo data.

Eleven columns, one row a day, filled in by hand.
In 2019 I made the same journey as now, and used a Google Sheet back then to punch in workouts, food intake and the rest. The sheet counted correctly, but only when I updated it, and always after the fact. This time I wanted the overview available all the time. And a snazzy app is more fun, isn’t it?
To give myself a running picture of where I stood, I needed to pull in three different kinds of data: how much I had burned per session, what weight, muscle and fat mass I had every time I stepped on the scale, and what I had eaten each day. All of it lived in different places (the food intake, admittedly, lived nowhere at all), and collecting it turned out to be differently hard in each case.
Withings
Apple Health
Health Auto ExportI deliberately kept the interface fairly tight, since I was the only one who would use the app and knew where things were. If I were building it for outside users I’d probably go over accessibility, legibility and the rest.

The programme day, the sessions and the body on one screen.
Well, it went reasonably given the circumstances. I was ill for just under two weeks, plus away on a Home Guard exercise (where you eat ration packs with extreme amounts of calories). Got a lot stronger though, lost six kilos and generally felt better.