| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Self-hosted sync and dashboards for your Strava activities: PostgreSQL storage, training-load metrics (TRIMP, CTL, ATL, TSB, FTP estimates), and Grafana visualization.
TrainingPulse is not affiliated with, endorsed by, or sponsored by Strava. “Strava” is a trademark of Strava, Inc. Each person who runs this stack must register their own Strava API application and comply with the Strava API Agreement and Strava API Brand Guidelines.
This project is largely AI-generated. The numbers it computes — including training load, fitness, fatigue, form, and FTP estimates — are informational only and are not medical advice. Verify anything you plan to act on, and consult a qualified professional for health or training decisions.
Example views from the bundled dashboards.
![]() Activity detail |
![]() Fitness & Freshness |
![]() Account overview |
![]() Nutrition & weight |
Configure your environment. Copy the example file and fill in your Strava credentials, a strong database password, and the URL the app will be reachable at:
cp .env.example .envAt minimum, set STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET, POSTGRES_PASSWORD, and APP_BASE_URL (used to build the OAuth callback).
Start the stack. From the repo root:
docker compose up -dThis brings up four containers: the FastAPI app on port 8000, Grafana on port 3000, the MCP service on port 8001, and PostgreSQL (internal only).
Connect Strava. Open the app at http://your-host:8000/ and click the official Connect with Strava button to complete OAuth. The initial backfill starts automatically — the same page shows live progress, and ongoing syncs run every 15 minutes from then on.
Open Grafana. Browse to http://your-host:3000/. The Postgres datasource trainingpulse and the bundled dashboards are provisioned automatically.
Optional: connect an MCP client. The read-only MCP service is available at http://your-host:8001/mcp for Cursor or another MCP-aware client. It exposes training summaries, activity lookup, gear usage, and sync-health tools over your network; keep it on a trusted network because tool results can include private training data. If you connect through a homeserver hostname or LAN IP, add it to MCP_ALLOWED_HOSTS in .env. When plugins are enabled (below), weight and nutrition tools are registered on the same endpoint.
TrainingPulse can load in-process plugins for body weight (Withings) and daily nutrition (FDDB). Plugin tables live in Postgres schemas withings and fddb inside the same database as core data. Addon dashboards appear in Grafana under the Addons folder.
| Plugin | Setup UI | Partner callback (Withings) |
|---|---|---|
| Withings | /plugins/withings/ | {APP_BASE_URL}/plugins/withings/get_token |
| FDDB | /plugins/fddb/ | Cookie from browser (see .env.example) |
Pulled from Strava and stored locally:
Computed by this project:
Out of the box Max HR is 190, Resting HR is 60, and FTP comes from your Strava profile (falling back to 200). Override any of them by setting MAX_HR, REST_HR, or FTP in your .env. See DEVELOPERS.md for the full precedence rules, including how to let Strava's profile values drive Max HR and zones.
For architecture, the HTTP API, the full list of environment variables, and how each metric is calculated, see DEVELOPERS.md.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3.0 as published by the Free Software Foundation. See the LICENSE file for the full text.
| Back | FazBrowse Home | New Git URL |