top of page

Training tech projects: Food tracking | Part 1

If you try to break down health into the major fundamental requirements, you’ll find food, exercise and sleep comprising 90% of it. Rest 10% is the fancy stuff (Bryon Jhonshon type XD). Now, everyone says how easy it is to get the fundamentals right and gives simple steps to do so as well. But that doesn’t usually work.

I’ve been experimenting to build multiple projects which can help me in shaping myself better with more analytical involvements.

So, this series of projects that I build will demonstrate my efforts and learnings on the way.


The food tracking saga


First in the line is the most discussed topic around what to eat and how much of it.

Personally, I never had to worry about it as my metabolism was shaped better and I used to workout more than required to keep myself in shape. But recently it started bugging me as I was not able to quantify where I stand on a day to day basis calories count with my workout regime on fall (due to injury on my both hamstrings and my wrist). Suddenly that weight meter started clicking in my mind. Hence, I decided to build my own daily calories counter.

I did not prefer anything already existing because I could not relate much to them (like Fittr needs raw material quality, I don’t have those values) and the range in which the calories are provided is very wide i.e. 400-600 kcals. This difference of 200 kcals is worth a workout session in itself that too per meal basis. Itna inaccuracy kaise chalega.


Quick note: I vibe coded whole of the project using cursor, chatgpt and claude.


Tools used:

xCode by Apple development, above mentioned LLMs for vibe coding and research, (that’s it, honestly AI phod dega sab kuch jald hi )


Sections:


Dashboard:

With the overall summary of how much calories intake is remaining and if eaten extra, how much steps do I need to walk today to cover that up. This also keeps a tab of how much extra workout is needed in the weekend to finish the extra cals gained througout the week.

This shall ensure that I am keeping my weekly calories intake in deficit or at par to remain in weight till the time I recover fully.

Calories in + overall dashboard
Calories in + overall dashboard

Section 1 | Calories In:

This section included a normal text row to get the type of food with quantity (eg. 2 roti and 1 cup dal, etc.) where the algorithm would convert this to kcals matching roti to the database and retrieving kcals for 1 roti multiplying it with the quality i.e. 2. Similarly matching and calculating calories for dal.

The idea was that my quantity of food and calories majorly remains same as the utensils that we used (thali, tiffin box) are same. So, if I create a database with precise values for myself then the problem related to accuracy would get solved as majority of us get food made from same sources (cooks, hotel and if you’re as lucky as me, mother at home) and use same utensils majority of the time.

The tough part is the change in the food that we eat regularly. I used simple text to be showcased in the bottom of the input box which has suggestions. These additive as you can choose options like 2 rotis twice to mean 4 rotis. The whole idea was to ease out the process of taking input from the user.

Further, the decision to make these suggestions generated by the app basis what you are ordering across multiple platforms like Blinkit, Zepto, etc. and also your past eating routine because some people stick to it, but many don't. This still needs to be built and will be part of the part 2 of the series.

The idea around food classification and calories estimation basis pics was also explored. Though it feels novel but there are constraints to it like how do you identify the quantity of food post classification. This needs some work and will be explored in more depth later.


Section 2 | Calories out:

On a similar trajectory as the above, workout logging was planned out to be taken as text input like 2km run, etc. However, the accuracy of the model varies a lot as the body functions differently and quanity of calories burnt is not easy to be calculated. The idea was to calculate the BMR (Basal Metabolic Rate) and keep subtracting the calories in value from it.

To get more accuracy, we used api call to the Apple Health app to get the exact values for the day. For someone using wearable device, these values will be quite precise as the ecosystem around this have already been developed by multiple firms. So, there is no need to recreate the cycle.

This section will be build further once I have the wearable device with me, which I am still shortlisting.


There will be a second part to this post after things are worked upon in depth. This was a very surface level exploration helping me understand the product development and app based requirements. Making things simpler is tough is what I have been able to learn from this project.

Until next time then...


Comentários


bottom of page