Skip to content

blopa/musclog-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3,388 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Musclog-logo

Musclog - Lift, Log, Repeat

Your all-in-one fitness companion for tracking workouts, nutrition, and health β€” powered by AI.

TypeScript React Native Expo NativeWind



Overview

App Dashboard Workout Logging

Musclog is a cross-platform mobile fitness application built with React Native and Expo. It combines workout logging, nutrition tracking, menstrual cycle awareness, and AI-powered coaching into a single, cohesive experience β€” all stored locally with WatermelonDB.

Note: Currently only dark theme is available.

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

πŸ‹οΈ Track Workouts

  • Log workouts with sets, reps, and weights
  • Create and manage custom workout templates and exercises
  • Schedule workouts on a weekly basis with reminders
  • View lifting volume stats and progression over time
  • Comprehensive exercise library with muscle group categorization
  • 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
  • Empirical TDEE: Calorie needs estimated from actual activity logs
  • Weekly Progress Check-ins: Automated weekly check-ins that analyze weight trends, caloric adherence, and activity levels. Get status updates (On Track, Ahead, Behind) and readjust goals based on real-world progress.

πŸŒ™ Menstrual Cycle Tracking

  • Track cycle phases: menstrual, follicular, ovulation, and luteal
  • Predict next period and fertile window
  • Adjust workout intensity automatically based on current cycle phase
  • Support for hormonal and non-hormonal birth control types
  • Toggle cycle tracking on or off at any time

πŸ“ˆ Progress & Insights

  • Visualize fitness progress with charts and graphs
  • Track body metrics: weight, body fat %, and custom measurements
  • Daily and weekly AI-generated insights on workouts and nutrition
  • Mood tracking: Log daily mood and correlate it with calories, workout volume, and cycle phase 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

πŸ”— 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
  • 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

Tech Stack

Layer Technology
Framework React Native 0.81 + Expo Router 6
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 expo-camera, Quagga2, ZXing, ML Kit OCR, Tesseract.js
Health expo-health-connect / react-native-health-connect (Android)
@kingstinct/react-native-healthkit (iOS)
Localization i18next + react-i18next
Animations React Native Reanimated 4
Widgets react-native-android-widget
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/                        # Expo Router screens
β”‚   β”œβ”€β”€ _layout.tsx             # Root layout
β”‚   β”œβ”€β”€ index.tsx               # Dashboard / home
β”‚   β”œβ”€β”€ onboarding/             # Onboarding flow
β”‚   β”œβ”€β”€ workout/                # Workout screens
β”‚   β”œβ”€β”€ nutrition/              # Nutrition/food screens
β”‚   β”œβ”€β”€ cycle.tsx               # Menstrual cycle tracking
β”‚   β”œβ”€β”€ progress.tsx            # Analytics & charts
β”‚   β”œβ”€β”€ profile.tsx             # User profile & metrics
β”‚   β”œβ”€β”€ settings.tsx            # App settings
β”‚   β”œβ”€β”€ chat.tsx                # AI coach chat
β”‚   └── aiSettings.tsx          # AI configuration
β”œβ”€β”€ components/                 # Reusable UI components
β”‚   β”œβ”€β”€ NavigationMenu.tsx      # Custom bottom nav bar
β”‚   β”œβ”€β”€ MasterLayout.tsx        # Root layout wrapper
β”‚   β”œβ”€β”€ CoachModal.tsx          # AI coach chat modal
β”‚   β”œβ”€β”€ SmartCameraModal.tsx    # AI photo analysis modal
β”‚   β”œβ”€β”€ PhaseWheel.tsx          # Cycle phase visualization
β”‚   └── ...
β”œβ”€β”€ database/                   # WatermelonDB models & services
β”‚   β”œβ”€β”€ models/                 # Database models
β”‚   β”œβ”€β”€ services/               # Service layer (CRUD + business logic)
β”‚   β”œβ”€β”€ migrations/             # DB schema migrations
β”‚   └── seeders/                # Initial data seeding
β”œβ”€β”€ hooks/                      # Custom React hooks
β”œβ”€β”€ lang/locales/en-us/         # Localization strings
β”œβ”€β”€ assets/                     # Images, icons, exercise photos
β”œβ”€β”€ constants/                  # App-wide constants
β”œβ”€β”€ utils/                      # Utility functions
└── widgets/                    # Android/iOS home screen widgets (NutritionWidget, SmartCameraWidget)

Getting Started

Prerequisites

  • Node.js (LTS)
  • 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

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

Running Tests

npm test

Other Scripts

npm run lint                # Lint code
npm run format              # Format with Prettier
npm run typecheck           # TypeScript type checking
npm run check-translations  # Validate i18n keys
npm run start-clear         # Start with cleared cache

Building for Production

Musclog uses EAS Build for production builds.

# Android
npm run build-android          # Production APK/AAB
npm run build-android-preview  # Preview/internal testing build

# Submit to Google Play
npm run submit-android

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.


Resources

About

Musclog - Lift, Log, Repeat

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors