DEV Community

Jeremy Libeskind
Jeremy Libeskind

Posted on

Building OpenNutriTracker: A Privacy-First Nutrition App You Can Hack On 🚀

L;DR: OpenNutriTracker is a cross-platform calorie and nutrition tracker written in Flutter, licensed under GPL-3.0, and powered by the Open Food Facts and USDA FoodData Central databases. In this post you’ll learn what problems it solves, how its clean-architecture codebase is laid out, and how you can spin it up locally in under five minutes—then start contributing real features.

Why Another Nutrition App?
Most mainstream food-logging apps are closed-source, ad-heavy, and monetize your data. OpenNutriTracker flips that model on its head:

100 % open source—anyone can audit or extend the code.

Local-first storage—your diary never leaves your device unless you decide otherwise.

No ads, no in-app purchases, no subscriptions.

That combination makes it a perfect playground for developers who want to practice mobile development and ship something immediately useful to friends and family.
GitHub

Under the Hood
Layer Tech / Pattern Why It’s There
UI Flutter + Material 3 (with custom theming) Single codebase for Android & iOS, blazing-fast hot reload
State Riverpod Unidirectional data flow & testability
Data Hive for local storage Lightweight, no SQL boilerplate
APIs Open Food Facts & USDA FDC Millions of community-maintained nutrition records
GitHub
CI/CD GitHub Actions + Fastlane Automated builds and store deployments
License GPL-3.0 Guarantees the app—and derivatives—stay libre
GitHub

The repo also follows a Clean Architecture folder structure (presentation → domain → data) to keep UI, business logic, and external services nicely decoupled.

Spinning It Up Locally
bash
Copier
Modifier

1. Clone the repo

git clone https://github.com/simonoppowa/OpenNutriTracker.git
cd OpenNutriTracker

2. Pull dependencies

flutter pub get

3. Fire up an emulator or plug in a device, then:

flutter run
That’s it! Hot-reload any Dart file and watch the UI update live.

Quick sanity checks
Log a meal — tap the ➕ button and search the food database.

Scan a barcode — real devices only; relies on mobile_scanner.

Toggle Dark Mode — Material You colors adapt automatically.

If everything works, you’re ready to hack.

Good First Issues
Issue What You’ll Touch Difficulty
“Add Serving-Size Selector” Riverpod state + Hive schema migration 🟧 Medium
“Material You Color Seed Picker” Flutter theming layer 🟩 Easy
“Nutrition Goals Graph” fl_chart + domain layer aggregation 🟥 Hard

Check the good first issue label in GitHub for the latest list, or open a fresh one if you spot a bug.
GitHub

Contribution Workflow
Fork → feature branch.

Run dart format and flutter analyze.

Write a simple widget or unit test (the repo uses flutter_test).

Open a PR; the GitHub Actions pipeline will lint, test, and build.

A maintainer reviews, provides feedback, and merges.

Tip: read the concise CONTRIBUTING.md in the repo before you start.

Roadmap Highlights
Material You dynamic color on Android 12+

Watch-OS & Wear OS companion widgets for quick calorie entry

End-to-end encrypted cloud sync (opt-in)

Open Source OCR for snapping nutrition labels offline

If any of those excite you, jump in and make them happen.

Beyond Calories: Why Open Data Matters
Because OpenNutriTracker uses open datasets, every scan or manual entry you add can (optionally) flow back into Open Food Facts—helping researchers, dietitians, and other indie apps build better public-health tools. You’re not just coding an app; you’re enriching a commons.
GitHub

Final Thoughts
The nutrition-tracking space is ripe for transparent, user-respecting tools. OpenNutriTracker offers a modern codebase, a friendly community, and a tangible way to sharpen your Flutter chops while doing something good for the world. Fork it, star it, and let me know what you build!

Repo: https://github.com/simonoppowa/OpenNutriTracker

Happy hacking!

Top comments (0)