Skip to content

About

Free, open-source, offline-first workout and nutrition tracker for Android, iOS and web. No account, no ads, data stays on your device. Optional AI coaching with your own API key, plus cycle tracking. React Native + Expo, GPL-3.0.

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

5,406 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Musclog-logo

Musclog - Lift, Log, Repeat

Free, open-source workout and nutrition tracker. No account, no ads, your data stays on your phone.

TypeScript React Native Expo NativeWind

Google Play Β· iOS (TestFlight) Β· Try the web demo Β· Website



Overview

App Dashboard Workout Logging

Musclog logs your lifts and your food in one app, with no account and no server to run. Everything is stored on your device (encrypted where it is sensitive), works offline, and can be exported or moved to another phone without the cloud.

  • Train: workout plans, progression that explains every number it changes, plate math, rest timers and a weekly review.
  • Eat: food diary, barcode and label scanning, macros and an energy target that adapts to your real weight trend.
  • Optional extras: AI coaching with your own API key (or none at all), cycle tracking, Health Connect and HealthKit.

It is built with React Native and Expo (Android, iOS and web) and stores data locally with WatermelonDB.

Note: Kinetic Depth, Kinetic Light, Kinetic Shock, and Kinetic Volt are available under Settings β†’ Interface β†’ Appearance. Choose one directly or let System follow your device's light/dark mode.

Read the blog post about how this app came to be.


Screenshots

App Dashboard Workout Logging Nutrition Tracking Progress Charts
AI Coach Chat Food Search Cycle Tracking Settings

Key Features

See CURRENT_FEATURES.md for the complete shipped feature list and FUTURE_FEATURES.md for the roadmap.

πŸ‹οΈ Track Workouts

  • Log workouts with sets, reps, and weights
  • Create and manage custom workout templates and exercises
  • Group workouts into named weekly or rotating plans, with multi-plan membership and an Unplanned section
  • Browse built-in workout programs, including a five-session cable superset split
  • Schedule workouts on a weekly basis with reminders
  • Log directly in Inline or Guided views with shared inputs, one-tap completion, and persistent rest timers
  • Set per-exercise progression rules, see explained upcoming targets, and undo changes to unfinished sets
  • View lifting volume stats and progression over time
  • Browse 873 built-in exercises with localized names and instructions, muscle-group categorization, and two-frame technique photos
  • Superset support: Group exercises with a shared group ID for superset tracking
  • Exercise reordering: Drag-and-drop reordering of exercises in both active and past workouts
  • Rest timer: Built-in rest timer with customizable duration and alerts
  • Keep-screen-awake during active workout sessions

πŸ“… Schedule & Plan

  • Plan workouts on a weekly basis to ensure consistency
  • Receive reminders to stay on track with your goals

🍎 Food Tracking & Nutrition

  • Daily Food Logging: Track meals (breakfast, lunch, dinner, snack) with detailed macro and calorie info
  • Barcode Scanning: Add foods instantly by scanning product barcodes with your camera
  • Food Search: Search Open Food Facts, USDA, or a local barcode database β€” configurable per user
  • Custom Foods & Meals: Create your own food entries and save meal templates for quick access
  • Meal Display: AI-generated and saved meals are shown as a single item (not individual ingredients) in the food log
  • Micronutrient Tracking: Track 40+ vitamins and minerals beyond basic macros
  • AI Macro Estimation: Use AI vision to estimate nutrition from food photos or nutrition label images; optionally run local OCR before sending to AI
  • Retrospective Logging: Log meals for past dates
  • Fasting Days: Optionally mark a no-food day as an intentional fast so it counts as a real 0-calorie day in your TDEE, averages, and streaks β€” while forgotten (unflagged) empty days are skipped
  • Empirical TDEE: Calorie needs estimated from logged intake and smoothed trend-weight changes
  • Weekly Review: Review training and nutrition from Home, Workouts, or Food. Apply explained calorie/macronutrient targets beginning tomorrow, keep current targets, or edit the recommendation. Approved targets stay stable between reviews; Manual and Daily automatic modes remain available.
  • Comeback mode: After a long break, ease back in with an opt-in four-week ramp: lighter loads and fewer sets for workouts, maintenance-first nutrition, a minimum day that counts, and check-ins instead of guilt.

πŸŒ™ Menstrual Cycle Tracking

  • Track bleeding and symptoms or keep a symptom-only journal; choose your goals, custom symptoms, favorite quick actions and optional daily fields
  • Log periods, bleeding, symptoms with severity, pain, energy and shared mood; period deletion has undo, and clearing a daily log explicitly clears that day’s shared mood
  • Calendar, period history and cycle-day comparisons with symptom filters; recorded values, missing days and estimates remain distinct
  • Next-period estimate as a range with an explained confidence level; overdue periods are stated plainly, and predictions can be hidden
  • Optional, off-by-default fertile-window estimate, always labelled as not contraception
  • Birth control and life stage change what is shown (for example, no predicted date on a method that suppresses ovulation)
  • Patterns drawn only from your own records, with the days behind each one; no phase-based workout prescriptions
  • Cycle records are encrypted on the device, with an optional lock, discreet reminders, CSV/JSON exports and an appointment PDF including shared mood
  • Encrypted cycle backups and an import preview that merges records with explicit conflict choices; full-app backup and restore remain available from cycle settings
  • Unknown-length setup, confirmed long-cycle correction, sparse-history uncertainty and retrospective prediction checks
  • Symptoms-only trends/search, custom rating scales, daily-life impact, optional diary presets and quiet pregnancy/loss/surgery/menopause contexts
  • Reminders that explain themselves: a range-based period heads-up, optional due-day and neutral "longer than usual" notes, a pack-aware pill reminder, a daily check-in, a pause, three lock-screen wording levels with a live preview, and a delivery check with a test notification
  • Restore-first import, external CSV mapping, selected-field file sharing and explicit native cycle health-store imports/exports
  • Manual password-protected backup files with restore preview and optional backup reminders; no automatic cloud uploads
  • Pause tracking without losing history, or permanently delete all cycle data

πŸ“ˆ Progress & Insights

  • Visualize fitness progress with charts and graphs
  • Track body metrics with a smoothed weight trend, editable scale readings, body fat %, and custom measurements
  • Daily and weekly AI-generated insights on workouts and nutrition
  • Recent training load: a body map of what you trained this week, and weekly sets per muscle
  • Strength levels for your main lifts, compared with your body weight
  • Your year in Musclog: a shareable look back at your year, each December
  • Mood tracking: Log daily mood and correlate it with calories, workout volume, and days around recorded periods over time

🧠 AI Coach

  • Dual AI Support: Google Gemini (2.0/2.5, via API key) or OpenAI (GPT-4, GPT-4o, O1, O3)
  • In-App Chat: Conversational AI coach for workout and nutrition advice
  • Photo Analysis: AI-powered food photo and nutrition label analysis; optional local OCR pre-processing
  • Workout Generation: AI-generated workout plans tailored to your goals
  • Custom System Prompts: Create and toggle multiple context-specific prompts (general, nutrition, exercise)
  • Flexible Config: Choose model, configure API keys, set insight frequency, control conversation history length

πŸ“ Notes

  • Jot down what you're making ("70g of broccoli", a recipe idea) without committing to a nutrition log
  • Latest two notes are highlighted; older ones load in pages, each with edit / duplicate / delete
  • Track this: hand a note to the AI Coach to turn it into a logged meal when you're ready

πŸ”— Health Integration

  • Sync with Google Health Connect (Android) for weight, nutrition, and exercise data
  • Sync with Apple HealthKit (iOS) for health and fitness data
  • Historical health data import

πŸ”„ Import & Export

  • Export your full database as an encrypted JSON file (encryption optional, configurable)
  • Import data across devices or as a backup, including optical QR transfer directly from the first onboarding screen
  • Bring your history: import workouts from Strong, Hevy and FitNotes CSV exports; importing again adds nothing, and an import can be undone
  • Import the complete Musclog GB cartridge database by scanning its Share Data QR stream on Android, iOS, or web
  • Support for JSON format

πŸ”’ Privacy & Security

  • All data stored locally on-device via WatermelonDB
  • Sensitive fields (nutrition logs, user metrics) encrypted at rest with AES
  • AI features are fully optional β€” app works offline without them
  • Optical Transfer: move your whole profile, an individual food, a saved meal, a named meal in the nutrition diary, an entire meal section, or a full day of eating using only the two screens β€” one shows a stream of QR codes, the other reads them with its camera. Food, meal and day shares preview and save without replacing existing data. Android, iOS, and web work in any combination, and Musclog GB can send its whole cartridge database, or one day of its food log, to any of them. No internet, cable, account, or third party

Tech Stack

Layer Technology
Framework React Native 0.86 + Expo SDK / Router 57
Language TypeScript 5.9
Database WatermelonDB 0.28 (SQLite-backed, reactive)
Styling NativeWind 4.2 (Tailwind CSS for React Native)
Icons Lucide React Native
Charts Victory Native (Skia)
Graphics @shopify/react-native-skia
AI Google Generative AI + OpenAI SDK
Camera / OCR react-native-vision-camera, Quagga2, ZXing, ML Kit OCR, Tesseract.js
Health react-native-health-connect (Android)
@kingstinct/react-native-healthkit (iOS)
Localization i18next + react-i18next
Animations React Native Reanimated 4
Widgets expo-widgets + Expo UI (Android and iOS)
Chat UI react-native-gifted-chat
Validation Zod
Error Tracking Sentry
Testing Jest + React Testing Library + Playwright (web E2E)
Build EAS (Expo Application Services)

Repository Structure

musclog/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ app/                    # Product app routes (native + web app)
β”‚   └── (website)/              # Public website and blog routes
β”œβ”€β”€ components/                 # Shared UI, modals, charts, and website components
β”œβ”€β”€ context/                    # Cross-screen React providers
β”œβ”€β”€ database/                   # WatermelonDB schema, models, repositories, and services
β”œβ”€β”€ services/                   # AI, health, notification, and other app services
β”œβ”€β”€ hooks/                      # Reusable reactive hooks
β”œβ”€β”€ utils/                      # Pure and platform-specific utilities
β”œβ”€β”€ data/                       # Generated exercise/food catalogues and wire contracts
β”œβ”€β”€ lang/locales/               # App and website translations
β”œβ”€β”€ gameboy/                    # Musclog GB ROM source and build tools
β”œβ”€β”€ public/                     # Website assets and generated SEO outputs
β”œβ”€β”€ scripts/                    # Build, generation, validation, and maintenance scripts
└── widgets/                    # Android/iOS Nutrition, Smart Camera, Activity Heatmap and Cycle widgets

Getting Started

Prerequisites

  • Node.js
  • npm or yarn
  • Expo CLI
  • For Android: Android Studio + emulator or physical device
  • For iOS: macOS with Xcode

Installation

# 1. Clone the repository
git clone git@github.com:blopa/musclog-app.git
cd musclog

# 2. Install dependencies
npm install

# 3. Configure environment variables
cp .env.example .env
# Edit .env to add optional API keys (see below)

# 4. Start the development server
npm start

Running on a Platform

npm run android   # Android emulator or device
npm run ios       # iOS simulator (macOS only)
npm run web       # Web browser

Environment Variables

AI features are optional. To enable them, add your keys to .env:

# USDA api key
EXPO_PUBLIC_USDA_API_KEY=your_usda_key

# Sentry error tracking (optional)
EXPO_PUBLIC_SENTRY_DSN=your_sentry_dsn
SENTRY_AUTH_TOKEN=your_sentry_token

If you run a local release build and Sentry uploads fail with an auth token error, run:

npx sentry-cli login

For production builds, use EAS Secrets instead of committing keys to version control.

Running Tests

npm test

Other Scripts

npm run lint:all                  # ESLint fixes, formatting, prebuild, and typecheck
npm run lint:eslint               # ESLint without the full suite
npm run format                    # Format with Prettier
npm run typecheck                 # TypeScript type checking
npm run check-translations        # Validate used i18n keys
npm run check-locale-consistency  # Validate key parity across locales
npm run screenshots               # Build web and capture Playwright screenshots
npm run screenshots:wrapped       # Build web and capture only "Your year in Musclog"
npm run start-clear               # Start Expo with a cleared cache

Screenshot runs default to kinetic-depth. Select a palette with an environment variable:

MUSCLOG_SCREENSHOT_THEME=kinetic-light npm run screenshots
# Reuse an existing web build and capture only one device size:
MUSCLOG_SCREENSHOT_THEME=kinetic-shock npm run playwright-runner -- tests/screenshot-automation.spec.ts --project=portrait-6.7

Valid themes are kinetic-depth, kinetic-light, kinetic-shock, kinetic-volt, kinetic-blush, kinetic-varia, and kinetic-scope. Images are saved under screenshots/app-store/<theme>/<device>/ (the Wrapped story goes in its wrapped/ subfolder; npm run screenshots:all runs both suites and the website images). The screenshot suite enables reduced motion, which disables web confetti for every screen and modal. Screenshot commands run only the capture suite; SDK compatibility tests remain available separately. They use npm run screenshots:build to enable the modal fixture in the web export. Normal production builds keep test routes disabled.


Building for Production

Musclog uses EAS Build for production builds.

If a local EAS Android build fails during Sentry sourcemap upload, make sure SENTRY_AUTH_TOKEN is set or run npx sentry-cli login first.

# Android
npm run build-android             # Production AAB
npm run build-android-apk         # Installable release APK
npm run build-android-preview     # Preview/internal build

# Submit to Google Play
npm run submit-android

# iOS
npm run build-ios                 # Production build
npm run build-ios-preview         # Preview/internal build
npm run submit-ios                # Submit to App Store Connect

Project Documentation


Contributing

Contributions are welcome! Please open an issue or pull request. For larger changes, open an issue first to discuss the approach.


License

This project is open source. See the LICENSE file for details.

The bundled exercise data and photos come from free-exercise-db, a public-domain project released under CC0.

Loggy, the mascot, is public domain under CC0 1.0: use him anywhere, for anything, with no attribution. The poses are in assets/avatars/loggy-poses (animated ones in loggy-animated, the parts they are built from in loggy-parts), and the scope and legal text are in assets/avatars/LOGGY_LICENSE.txt. The Musclog name and logo are not part of that, and the code that draws him stays under the project's license.


Resources

SDK 58 verification: npm run check-widget-bundles builds and executes both isolated widget runtimes (the iOS half needs npm run prebuild on a Mac first, which regenerates the widget target's registry). After npm run build-android-web, npm run test:upgrade:web checks exported SEO, blog navigation, public controls, and fresh app seeding in Chromium. Set MUSCLOG_TEST_PORT when another local test server is already running. The iOS widget extension requires App Groups on both app identifiers and matching signing profiles.

About

Free, open-source, offline-first workout and nutrition tracker for Android, iOS and web. No account, no ads, data stays on your device. Optional AI coaching with your own API key, plus cycle tracking. React Native + Expo, GPL-3.0.

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages