Mike Koss

Vibe Coding a Diet Tracker That Can Keep Your Diary to Itself

Diet Tracker's Today and History screens on a phone (with made-up data)
Try it Diet Tracker

Since the start of the year I have been keeping a keto diary: each morning’s weigh-in, and how many net carbs, grams of protein and calories I ate the day before. For most of the year that diary was a Google Form feeding a Google Sheet. It worked, but typing the numbers into a form meant adding up every meal first, and the sheet’s charts were never quite what I wanted.

So I vibe coded a replacement:

diet.mckoss.com

It is free, it works on a phone, and it works offline. And you get to choose whether your diary lives on my server at all.

What It Does

  • Logs food by meal against daily targets for net carbs, protein and calories, with a bar for each showing how much is left.
  • Finds foods in your own list, a shared list of basics, and USDA’s FoodData Central database, or by scanning a barcode with the phone’s camera.
  • Remembers what you eat. Your frequent foods are a tap away, ranked with TimeScore, so what you’ve been eating lately comes first.
  • Describes a meal for you (when you’re signed in): type “two eggs and a slice of rye toast with butter”, or take a picture of your plate, and Claude splits it into foods and matches each one against your foods and USDA’s numbers.
  • Follows a plan. Keto, or the three phases of the South Beach diet, with goals for weight, body fat and waist size. It watches the trend of your weigh-ins and suggests when to change your targets, but never changes anything without asking.
  • Charts your history: weight, body fat, waist, and each day’s macros against its targets, over 30 days, 90 days, a year or all time.

Your Diary, Your Choice

The first screen offers two ways in.

Sign in with Google and your diary is kept in a database on the server, private to your account. That’s the choice if you want the same diary on your phone and your laptop. It still works offline: changes you make without a connection are saved on the device and sent up when you’re back online.

Use Locally Only needs no account at all. Your whole diary (every food, entry and weigh-in) is kept in your browser’s storage on that one device, and it is never uploaded to the server. There is nothing to sign in to, and no copy of your data anywhere but your phone.

The only things the app asks the server for in local mode are the food databases: the shared list of basic foods, and USDA search results, where the server passes along the words you search for (it holds the USDA key). Nothing you log goes with them. Describing a meal is the one feature that needs an account, because the description goes to Claude through the server.

Either way, you can export your foods and history as a file whenever you like, import them somewhere else, or delete everything from Settings.

Weigh In From a Bluetooth Scale

The part I am happiest with is the scale. Smart scales come with their own apps, which want you to create an account with the scale’s maker and send every weigh-in to their cloud. Diet Tracker talks to the scale directly instead, over Bluetooth, using the browser’s Web Bluetooth support (Chrome on Android).

Tap Weigh in from scale and step on. The scale sends its reading straight to your phone, the app works out your body fat from the scale’s impedance measurement and your profile (sex, age and height), and the weigh-in is saved. In local mode, that reading never leaves the phone either.

I have tested it with the scale I own, the Etekcity HR Smart Fitness Scale (EFS-A591S, “Apex HR”) (also on Amazon). Other Etekcity models that speak the same Bluetooth protocol may work too, but that’s the one I have stood on. (Close the scale’s own VeSync app first, or it grabs the connection.)

Vibe Coding It

As with my other recent projects, I didn’t write the code: I described what I wanted, and Claude Code wrote it, tested it and deployed it. The first version went live on October 30th: daily logging, weigh-ins and history charts, imported from my old spreadsheet. Less than three weeks later it is at version 1.24, with accounts for anyone, the local mode, offline sync, meal descriptions, barcodes, diet plans and the scale.

The scale was the most fun to watch being built. Etekcity doesn’t publish the protocol; Claude worked from an open-source library that had decoded it, and my very first real weigh-in came back as 3,984.9 pounds at 75% body fat. A few rounds of “that’s not right” later, it reads exactly what the scale’s display shows.

That’s the same theme as my Pocket Arcade and QR Code Builder posts: software that serves the person using it, not a business model. A diet diary is about as personal as data gets. I wanted an app that would let me keep it on my own phone, and now there is one.