Skip to content

blopa/musclog-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2,525 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

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

πŸ“… 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 the Open Food Facts database for nutritional information
  • Custom Foods & Meals: Create your own food entries and save meal templates for quick access
  • 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
  • Retrospective Logging: Log meals for past dates
  • Empirical TDEE: Calorie needs estimated from actual activity logs

πŸŒ™ 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

🧠 AI Coach

  • Dual AI Support: Google Gemini (2.0/2.5, via OAuth or 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
  • Workout Generation: AI-generated workout plans tailored to your goals
  • Flexible Config: Choose model, configure API keys, set insight frequency

πŸ”— Health Integration

  • Sync with Google Health Connect (Android) for weight, nutrition, and exercise data
  • 7-day lookback on health data import

πŸ”„ Import & Export

  • Export your full database as an encrypted JSON file
  • Import data across devices or as a backup
  • Support for JSON and CSV formats

πŸ”’ 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
AI Google Generative AI + OpenAI SDK
Camera expo-camera, Quagga2, ZXing, ML Kit OCR
Health expo-health-connect / react-native-health-connect
Localization i18next + react-i18next
Animations React Native Reanimated 4
Error Tracking Sentry
Testing Jest + React Testing Library
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

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 <repo-url>
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_gemini_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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors