ENGINEERING · · 2 MIN READ

Calorie tracker for my Garmin watch

I am already using my Garmin watch to track my steps and calories burned. I wanted to add a simple calorie tracker to it, so I can see how many calories I have eaten and what the breakdown is.

I also did not want to use any heavy frameworks to build this and did not want to pay for any third party apps as well.

A Garmin watch face showing FOOD 1829 alongside steps, heart rate and calories burned.
FOOD 1829

Desired workflow#

  • I send a photo of the food along with the nutrition information (if available) I am eating to ChatGPT.
  • ChatGPT identifies the food, estimates its calories, and saves the entry in the backend via a MCP endpoint.
  • The backend stores the food item, calorie count, meal type, and date.
  • The calorie tracker on my Garmin watch fetches today’s data from the backend and displays the total calories consumed.
  • A frontend dashboard to fetch the same data and display it in a more detailed way.
A photo of a lunch order sent to ChatGPT, which saves it as a reusable food and logs it under today's lunch with the calories and macros.

Implementation#

  • I ended up using Supabase to store the data because it has a MCP endpoint and a simple database.
  • For the UI surfaces, I used the Garmin Connect SDK to build a watch face and a web app powered by ChatGPT sites.
  • Surprisingly Garmin had a very streamlined process for building and deploying a watch face. Once I uploaded the plugin, I could sync it directly to my watch and see the changes immediately.
  • Rest once the stack was decided Claude did the heavy lifting of the implementation and I just had to wire it up.

In production#

The end result with an overview on the left and a detailed view on the right. The watch face shows the total calories consumed today, while the detailed view shows the breakdown of protein, carbs, and fat.

The watch face showing FOOD 1829 next to steps, heart rate and calories burned.
1829 calories consumed today
The app screen showing a progress ring, 779 calories, 1821 left, and the protein, carbs and fat split.
Breakdown of calories consumed today

And the same number is displayed on the web as well, with a trend graph.

The web dashboard showing 1,829 of 2,600 calories eaten, 70 percent of the goal, and the protein, carbs and fat cards.
Same endpoint, more room to show things