Train Libre is an open-source, offline-first fitness app for logging workouts, calories, macros, bodyweight, and recovery — without ads, mandatory accounts, or commercial tracking.
Designed for people who want serious tracking without social feeds, gamification, or subscription pressure, Train Libre prioritizes privacy, local data ownership, and transparent analytics.
|
App Store Release |
Android (via Obtainium) |
Android (via F-Droid) |
Google Play release is currently not available.
Train Libre is built with Flutter and supports:
- iOS (Active)
- Android (Active)
- Workout Tracker: Log sets (warm-up, failure, dropsets), routines, and session history.
- Calorie & Macro Tracker: Track nutrition, hydration, and supplements with adaptive weekly guidance.
- Bodyweight & Recovery Analytics: Deep insights into muscle readiness, volume trends, and body measurements.
- Sleep & Vitals: Sleep Health Score across five domains, plus steps and heart-rate aggregates imported from Apple Health or Health Connect.
- Meal Logging, Four Ways: Barcode, catalog search, saved templates, or the camera — barcodes are detected passively while the meal camera is open, so there is no mode to pick in advance.
- Next-Gen AI Meal Capture: Capture meals from photos, dictated speech or text via BYOK (Bring Your Own Key) setup. Fully integrated with a holistic culinary anchor (
mealContext) and a state-aware "Top-N Fuzzy Alternatives" SQLite matching system that prevents hallucinations. Always reviewable and self-repairing before saving. Self-hosted Ollama and any OpenAI-compatible endpoint are supported alongside the commercial providers. - LiDAR Scale Hint: On supported iPhones, a measured scale of the scene is handed to the model instead of a guessed plate size — the largest single source of error in estimating a portion from a photo. Switchable, and silently skipped everywhere else.
- Privacy & Local-First: Data stays on device. Optional one-way health export to Apple Health and Google Health Connect.
- No Ads. No Mandatory Account. No Commercial Tracking (Optional Pseudonymised Usage Statistics, off by default).
- Offline-First: Your data stays local unless you explicitly choose otherwise.
- Open-Source Transparency: Trust through public code and understandable data flows.
- User-Controlled AI: Optional AI features require your own API key; no data is sent to providers without opt-in.
This project features a comprehensive, modular documentation suite split by target audience and component. Use the links below to access the technical resources:
- Developer Overview: Technical vision, key architectural pillars, technology stack, and testing philosophy.
- Architecture & SQLite Lifecycle: Clean Architecture layering and database connection lifecycle pattern.
- Data Flow & State Lifecycle: Reactive reads, imperative writes, subscription cancellation, and UI concurrency guards.
- Localization Architecture: Offline-first relational localization and the guide for adding a new locale.
- Smart Features Overview: Overview of algorithmic features and architectural privacy invariants.
- Bayesian TDEE Estimator: Comprehensive mathematical and statistical formulation of the Kalman filter-based adaptive energy expenditure engine.
- BYOK AI Meal Validation: AI meal capture pipeline details, fuzzy validation scoring, and the 3-pass self-repair verification loop.
- Meal Capture Pipeline: Unified camera and passive barcode detection, voice dictation, meals as logged events, photo storage, and what leaves the device on each capture path.
- Depth Scale Hint (LiDAR): Measured scale facts and the optional depth image, the quality gate that discards untrustworthy measurements, and the explicit non-goals.
- Native Health Sync & Export: Bidirectional vital synchronization (Steps, Sleep), outbound manual log export pipelines, SQLite-backed idempotency tracking, and fault-tolerance patterns.
- Sleep Health Score Engine: The five scoring domains, their curve shapes, and the soft-cap penalty logic.
- Muscle Recovery & Fatigue Model: Volume-based recovery windows and intensity-driven fatigue extension per muscle.
- Estimated 1-Rep Max Heuristic: The Epley-based submaximal strength model behind PRs and progression.
- Live Activity & Workout Session: The iOS Live Activity and Dynamic Island surface for a running workout.
- iOS Home Screen Widgets: The widget family, their configuration, and the data they read.
- Telemetry & Privacy Architecture: The complete opt-in telemetry event catalog and the anti-profiling safeguards around it.
For the full interlinked documentation map, see the main Documentation Entry Point.
The long-term vision, future modules, and planned features are maintained in the ROADMAP.md file.
- Open Food Facts for food database coverage.
- OpenExerciseDB for the exercise catalog.
- wger for the upstream exercise data OpenExerciseDB was built from.
The application is licensed under GPL-3.0.
The bundled exercise catalog is not. Exercise data comes from OpenExerciseDB, licensed under CC BY-SA 4.0, derived in part from the wger project. Individual records keep their original upstream licence and author, listed in ATTRIBUTION.md.
ShareAlike travels with the data, not with this repository's code: redistributing the catalog — or a database derived from it — means passing on the same licence and the same credit. Food data from Open Food Facts is separately licensed under the ODbL.






