MCPcopy Index your code
hub / github.com/CodeWithCJ/SparkyFitness

github.com/CodeWithCJ/SparkyFitness @v0.17.2 sqlite

repository ↗ · DeepWiki ↗ · release v0.17.2 ↗
6,007 symbols 17,756 edges 1,537 files 125 documented · 2%
README

🌐 Language

English

简体中文

繁體中文

日本語

한국어

हिन्दी

ไทย

Français

Deutsch

Español

Italiano

Русский

Português

Nederlands

Polski

العربية

فارسی

Türkçe

Tiếng Việt

Bahasa Indonesia

SparkyFitness

A self-hosted, privacy-first alternative to MyFitnessPal. Track nutrition, exercise, body metrics, and health data while keeping full control of your data. image

SparkyFitness is a self-hosted fitness tracking platform made up of:

  • A backend server (API + data storage)
  • A web-based frontend
  • Native mobile apps for iOS and Android

It stores and manages health data on infrastructure you control, without relying on third party services.

Core Features

  • Nutrition, exercise, hydration, sleep, fasting, mood and body measurement tracking
  • Goal setting and daily check-ins
  • Interactive charts and long-term reports
  • Multiple user profiles and family access
  • Light and dark themes
  • OIDC, TOTP, Passkey, MFA etc.

Health & Device Integrations

SparkyFitness can sync data from multiple health and fitness platforms:

  • Apple Health (iOS)
  • Google Health Connect (Android)
  • Fitbit
  • Garmin Connect
  • Withings
  • Polar Flow
  • Hevy (not tested)
  • OpenFoodFacts
  • USDA
  • Fatsecret
  • Nutritioninx
  • Mealie
  • Tandoor
  • Strava (partially tested)
  • Norish
  • Yazio (uses unofficial API)

Integrations automatically sync activity data such as steps, workouts, and sleep, along with health metrics like weight and body measurements, to your SparkyFitness server.

Optional AI Features (Beta)

SparkyAI provides a conversational interface for logging data and reviewing progress.

  • Log food, exercise, body stats, and steps via chat
  • Upload food images for automatic meal logging
  • Retains conversation history for follow ups

Note: AI features are currently in beta.

Installation

Choose one of the two ways to run SparkyFitness:

1. Self-Hosted

Get a SparkyFitness server running in minutes using Docker Compose:

# 1. Create a new folder
mkdir sparkyfitness && cd sparkyfitness

# 2. Download Docker files only
curl -L -o docker-compose.yml https://github.com/CodeWithCJ/SparkyFitness/releases/latest/download/docker-compose.prod.yml
curl -L -o .env https://github.com/CodeWithCJ/SparkyFitness/releases/latest/download/default.env.example

# 3. (Optional) Edit .env to customize database credentials, ports, etc.

# 4. Start the app
docker compose pull && docker compose up -d

# Access application at http://localhost:8080

Note: For other self-hosted installation methods, refer to the documentation at https://codewithcj.github.io/SparkyFitness/.

2. Cloud (for non-technical users)

If you are not a technical user and do not want to run SparkyFitness on your own server, you can use PikaPods to deploy a hosted instance of SparkyFitness in the cloud:

Run on PikaPods

🎥 Video Tutorial

Watch the video

Quick 2-minute tutorial showing how to install SparkyFitness (self-hosted fitness tracker).

Documentation

For full installation guides, configuration options, and development docs, please visit our Documentation Site.

Quick Links

Need Help?

  • Post in Github issues/discussion.
  • For faster response and get help from other community memebers Join our Discord

Star History

<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=CodeWithCJ/SparkyFitness&type=Date" width="100%" />

Translations

Weblate Translations

Translation status

Repository activity

Alt

Contributors

⚠️ Known Issues / Beta Features ⚠️

SparkyFitness is under active development. Breaking changes may occur between releases.

  • Auto-updating containers is not recommended
  • Always review release notes before upgrading

The following features are currently in beta and may not have been thoroughly tested. Expect potential bugs or incomplete functionality:

  • AI Chatbot
  • Family & Friends access
  • API documentation

Extension points exported contracts — how you extend this code

BarcodeScannerEngine (Interface)
(no doc) [4 implementers]
SparkyFitnessFrontend/src/lib/scannerEngines/EngineInterface.ts
StoredServerConfig (Interface)
Config shape stored in AsyncStorage (apiKey stripped out).
SparkyFitnessMobile/src/services/storage.ts
TestProps (Interface)
(no doc)
SparkyFitnessMobile/__tests__/components/ScreenErrorBoundary.test.tsx
ToolResponse (Interface)
(no doc)
SparkyFitnessMCP/src/types.ts
ResolvedExerciseCalories (Interface)
(no doc)
shared/src/utils/calorieCalculations.ts
GarminTokenPayload (Interface)
(no doc)
SparkyFitnessServer/types/garmin.ts
CacheEntry (Interface)
(no doc)
SparkyFitnessServer/utils/apiKeySessionCache.ts
ImageFormat (Interface)
(no doc)
SparkyFitnessServer/middleware/checkInPhotoUpload.ts

Core symbols most depended-on inside this repo

log
called by 1529
SparkyFitnessServer/config/logging.ts
getClient
called by 373
SparkyFitnessServer/db/poolManager.ts
addLog
called by 365
SparkyFitnessMobile/src/services/LogService.ts
apiCall
called by 260
SparkyFitnessFrontend/src/api/api.ts
toast
called by 245
SparkyFitnessFrontend/src/hooks/use-toast.ts
cn
called by 209
SparkyFitnessFrontend/src/lib/utils.ts
transformHealthRecords
called by 183
SparkyFitnessMobile/src/services/healthkit/dataTransformation.ts
parseDecimalInput
called by 171
SparkyFitnessMobile/src/utils/numericInput.ts

Shape

Function 4,927
Interface 914
Method 92
Class 62
Enum 6
Route 6

Languages

TypeScript100%
Python1%

Modules by API surface

SparkyFitnessMobile/src/services/api/externalFoodSearchApi.ts45 symbols
SparkyFitnessFrontend/src/api/Settings/externalProviderService.ts44 symbols
SparkyFitnessFrontend/src/utils/workoutPlayback.ts43 symbols
SparkyFitnessServer/services/exerciseService.ts42 symbols
SparkyFitnessServer/integrations/yazio/yazioService.ts41 symbols
SparkyFitnessServer/services/measurementService.ts39 symbols
SparkyFitnessMobile/src/utils/foodDetails.ts37 symbols
SparkyFitnessServer/models/measurementRepository.ts36 symbols
SparkyFitnessServer/integrations/googlehealth/googleHealthService.ts34 symbols
SparkyFitnessServer/ai/providerDispatch.ts34 symbols
SparkyFitnessMobile/src/services/api/authService.ts32 symbols
SparkyFitnessMobile/src/components/FoodForm.tsx32 symbols

Dependencies from manifests, versioned

@ai-sdk/anthropic3.0.79 · 1×
@ai-sdk/google3.0.79 · 1×
@ai-sdk/openai3.0.65 · 1×
@ai-sdk/react3.0.193 · 1×
@assistant-ui/react0.14.9 · 1×
@assistant-ui/react-ai-sdk1.3.28 · 1×
@babel/core7.25.2 · 1×
@babel/runtime7.25.0 · 1×
@bacons/apple-targets4.0.6 · 1×
@better-auth/api-key1.5.6 · 1×
@better-auth/passkey1.5.6 · 1×

For agents

$ claude mcp add SparkyFitness \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact