Your free and open-source calorie tracker for privacy-focused health monitoring.
LibreFit is a cross-platform app built with Tauri that helps you track your caloric intake and monitor your weight progress with complete privacy. Calculate your TDEE (Total Daily Energy Expenditure), set personalized goals, and visualize your progress with beautiful charts - all without sacrificing your privacy.
- 📊 Science-based TDEE calculator - Get personalized calorie recommendations based on your body metrics and activity level
- 🎯 Goal-oriented tracking - Set weight loss or gain targets with customizable timelines
- 📱 Simple daily logging - Track your meals and weight in seconds
- 📈 Visual progress charts - Monitor your journey with intuitive graphs and insights
- 🔒 Privacy-first - All data stays on your device, no cloud sync, no tracking, no ads
- 🎨 Clean, modern UI - Built with Svelte 5 and Tauri for a smooth, near-native experience
- 📤 Data export - Export your data as CSV or complete database backups
- 🔧 Cross-platform - Currently targeting Android, with broader support possible in the future
- Backend: Rust 1.84.0 + Tauri 2.2
- Database: SQLite 3 with Diesel ORM 2.2.6
- Frontend: SvelteKit 2 + Svelte 5
- UI: Tailwind CSS 4 + DaisyUI 5
- Build: Vite 6
- Rust 1.84.0 or higher
- Node.js 20.x or higher
- Android Studio (for Android development)
- Android NDK (for Android builds)
librefit/
├── src/ # SvelteKit frontend
│ ├── lib/ # Reusable components and utilities
│ └── routes/ # App pages and layouts
├── src-tauri/ # Rust backend
│ ├── src/ # Rust source code
│ ├── migrations/ # Database migrations
│ └── gen/android/ # Generated Android project
├── .github/
│ ├── workflows/ # CI/CD pipelines
│ └── scripts/ # Build scripts
└── tests/ # Frontend tests
git clone https://github.com/thwbh/librefit.git
cd librefit
npm installcd src-tauri
cargo build
cd ..Desktop development:
cargo tauri devAndroid development:
cargo tauri android devIf you encounter this error:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__floatunditf"
The linker path in build.rs doesn't match your system. Fix it by:
-
Locate your NDK linker library:
$NDK_HOME/toolchains/llvm/prebuilt/<host>/lib/clang/<version>/lib/<os>/libclang_rt.builtins-<guest>.a -
Run with explicit linker:
RUSTFLAGS="-C link-arg=$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/19/lib/linux/libclang_rt.builtins-x86_64-android.a" cargo tauri android dev
This project uses nextest for Rust and vitest for frontend tests.
Run frontend tests:
npm run testRun backend tests:
cd src-tauri
cargo nextest runRun with coverage:
npm run test:ci # Frontend with coverage
cargo llvm-cov nextest # Backend with coverageContributions are welcome! Here's how you can help:
- Report bugs: Use the Issue Tracker to report bugs or request features
- Discuss ideas: Join the Discussions to share ideas or ask questions
- Submit PRs: Fork the repo, make your changes, and submit a pull request
- Improve documentation: Help make the docs clearer and more comprehensive
Please review any open issues before starting work to avoid duplicated efforts.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.