kg Food Log
kg is a food tracking log that lets you use natural English language to log your food items.
It provides an LLM chat like interface to enter your food items.
I disliked scanning food items or finding items in a database, and taking photos of meals to allow AI to infer the items is not accurate enough. For example, olive oil is very dense and has a high impact on health, yet a photo will not convey that information.
I typically track my own foods in grams, and have found that just describing the item and adding “x grams” allows the LLM to accurately infer the nutrients in that serving.
LLMs are not currently completely accurate, but I believe in the upcoming years they will become more capable and faster, which would make this app more viable.
Currently it takes around 30 seconds to look up a new food item, which is not an issue as the user does not need to wait around. But almost instant responses would be an improvement.
It currently works best on desktops as it uses the full screen for canvas based visuals.
I have found canvas for visualizations much faster and capable of handling large amounts of data vs SVG or HTML visuals. Echarts and Glide Data Grid have turned out to be very good at handling large datasets.
I created a concept for sparklines drawn with bezier curves which came out much better than I had expected. These are drawn inside each Glide Data Grid cell, which allows for 120fps infinite scrolling without having to use the DOM API. I tested quite a few DOM based infinite scrolling APIs, but all produced jank. Glide Data Grid was exceptional here.
I find the curves of the bezier lines much easier to quickly scan to find highs and lows (vs reading every number). When using group by (food, meal, day, week), you can quickly scan for highs/lows of a given nutrient.
I find biochemistry fascinating, and with LLMs it is fast to research any areas of interest.
The goal of kg is not to impose any kind of dietary goal on the user. It is just a simple tool for looking up data, calculating sums and visualising them. You can set your own goals as needed.
I had originally chosen "Diet Snitch" for the name of this app.
You can find a demo with 6 months of food data loaded on the homepage.
To health 🥐
