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.
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 install
cd src-tauri
cargo build
cd ..
Desktop development:
cargo tauri dev
Android development:
cargo tauri android dev
If 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 test
Run backend tests:
cd src-tauri
cargo nextest run
Run with coverage:
npm run test:ci # Frontend with coverage
cargo llvm-cov nextest # Backend with coverage
Contributions are welcome! Here's how you can help:
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.