Skip to content

fzhem/calorie-tracker

Repository files navigation

Calorie Tracker

Simple Expo Android app for logging calories, visualizing weekly trends, and adjusting the daily target from body weight.

Features

  • 🤖 On-device meal estimation with local AI model inference
  • 🍽️ Meals, weights, and body-fat logs stored locally in SQLite
  • ⚙️ Settings and lightweight preferences stored on-device with MMKV
  • 🎯 Daily calorie target from either a fallback goal or latest weight x calories-per-kg multiplier
  • 💪 Health Connect weight sync on Android
  • 📊 Weekly calorie bar chart
  • 📈 Weight trend line chart

On-device models (LiteRT-LM)

  • 📦 AI models are downloaded to the device and run locally using LiteRT-LM: https://github.com/google-ai-edge/LiteRT-LM
  • 🔒 No cloud inference is done for model execution after download
  • 🛠️ The Settings screen includes controls to download models and run local inference

Showcase

Video demo

estimate_meal.mp4

Screenshots

Log screen Graphs screen Settings screen

Installation

Download the latest APK from the Releases page and sideload it on your Android device. Requires Android 8+ (API 26).

Development

Android

Note: This app uses react-native-health-connect and requires a development build. It does not run inside Expo Go.

  1. Install dependencies:
npm install
  1. Generate the native Android project:
npm run prebuild
  1. Build and launch the Android app:
npm run android
  1. Start Metro for the development build:
npm run start

Health Connect notes

  • The app requests read access for weight records.
  • minSdkVersion is set to 26 because Health Connect requires Android 8+

Acknowledgement

License

CC BY-NC 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

CC BY-NC 4.0

About

Track daily calories, set goals, and visualize nutrition trends with this modern calorie tracker app.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors