close
Skip to content

Repository files navigation

Training Time Machine: your data, on your machine

Build Test Dependencies

This repo is a protest. In 2026 Strava put API access to your own activities behind a paid subscription. If you don't pay, third-party apps (and you) can no longer read your data through the API; new apps get a 403 Application Inactive until the developer holds an active subscription. Meanwhile Strava keeps monetising that same data itself. Your training history is your data; limiting your access to it is wrong.

You don't have to pay to get it back. Data-portability law (GDPR Art. 20, UK GDPR, and equivalents elsewhere) guarantees your right to a copy of your personal data, and Strava honours it through its bulk export. This repo turns that export into something better than the API ever was: a local MySQL database, an MCP server so AI assistants can answer questions about your training, and a full analysis website. All offline, no Strava account required after the download, no subscription, ever.

Get your data (free, legal, takes minutes)

  1. Go to https://www.strava.com/athlete/download_my_account (Settings → My Account → Download or Delete Your Account).
  2. Under Download Request, click Request Your Archive. This does not delete or affect your account.
  3. Strava emails you an export_XXXXXXX.zip (usually within a few hours). It contains activities.csv, per-activity GPS files, your profile, gear, routes, goals and more.

What's in this repo

Module Folder What it does
Extract src/extract.ts, src/sources/, .claude/skills/strava-extract/ (skill + bundled bash/PowerShell scripts) Imports an export zip into MySQL: activities, full GPS/HR/power streams, athlete, gear, routes, goals. Providers are pluggable; Strava's bulk export is the built-in one
MCP server src/ Lets MCP clients (Claude Code, Claude Desktop, ...) query your history: stats, activities, streams, plus arbitrary read-only SQL
Website website/ "Training Time Machine": dashboard, trends, calendar heatmap, activity maps, GPS heatmap, records, gear and goal progress. Provider-neutral by design: it never mentions any fitness service

Everything runs locally. The only network access is OpenStreetMap map tiles in the website.

Screenshots

All screenshots show synthetic demo data: a fictional rider commuting between Wilmslow and central Manchester (generate it yourself, see Try it without your data). No real person's data appears anywhere in this repo.

Dashboard: headline totals, monthly distance, year comparisons Dashboard Trends: weekly/monthly metrics with year-over-year table Trends
Calendar: daily distance, GitHub-style Calendar Activities: search, filter, sort every activity Activities
Activity detail: full stats, route map, elevation & speed profiles Activity detail Heatmap: every GPS point you've ever recorded, on one map Heatmap
Records: bests, milestones, gear totals, goal progress Records

Try it without your data

Want to evaluate the tooling before requesting your archive? Generate the fictional commuter dataset shown above and import it:

npm install && npm run build
docker compose up -d --wait                     # local MySQL
node dist/demo/generate.js /tmp/demo-export     # 243 synthetic rides, Jan to Jun 2026
node dist/extract.js /tmp/demo-export           # import them
website/start.sh                                # browse it (Windows: website\start.ps1)

Importing replaces the database contents. If you've already imported your real data, keep the demo in its own database:

MYSQL_DATABASE=demo node dist/extract.js /tmp/demo-export
MYSQL_DATABASE=demo website/start.sh

Quickstart

Prerequisites: Node.js ≥ 18, Docker (for MySQL), unzip.

git clone https://github.com/barracoder/training-time-machine.git && cd training-time-machine
npm install

# 1. Import your export (starts MySQL via docker compose automatically)
.claude/skills/strava-extract/strava-extract.sh ~/Downloads/export_XXXXXXX.zip
# Windows: .claude/skills/strava-extract/strava-extract.ps1 $HOME\Downloads\export_XXXXXXX.zip

# 2. Explore in the browser (installs/builds on first run, then opens the site)
website/start.sh          # Windows: website\start.ps1
# → http://localhost:5178

# 3. Ask an AI about your training (Claude Code)
claude mcp add strava -- node /path/to/training-time-machine/dist/index.js

Upcoming features

This started as a way to read my own history back. There's no reason to stop there. In rough order:

  • Mobile apps (iOS and Android): record rides and runs straight into your own database. No account, no cloud, no terms-of-service update in your inbox.
  • Training recording: pair heart-rate straps, power meters and trainers over Bluetooth, and log sessions directly. The recording half of the walled garden is the easy half.
  • More import sources: Garmin, Polar, Suunto, Fitbit, Apple Health. The importer is already pluggable; each service is one adapter file away.
  • Segments and personal leaderboards: compete against yourself without paying for the privilege.
  • Route planning built from your own heatmap, since nobody knows your roads better than your data does.
  • Friend-to-friend sharing: opt-in and peer-to-peer, with no middleman renting your feed back to you.

Every subscription feature that is really just your own data, presented back to you, is fair game. If a walled garden charges you to look over the wall, build a door. Contributions welcome.

Documentation

Testing

npm test              # extract + MCP server (26 tests; integration tests need MySQL up)
cd website && npm test  # website API (24 tests)

Privacy

Your export contains personal data: email address, GPS tracks of every activity (including from your home), messages and more. This repo is built so none of it leaves your machine:

  • The database lives in a local Docker volume; MySQL binds to 127.0.0.1 only.
  • data/, *.zip and .env are gitignored, so your export can never be committed.
  • Test fixtures are entirely synthetic.

License

MIT

About

Your training data, on your machine — import your fitness-service export into local MySQL; analyse it with a website, an MCP server, or plain SQL. No subscription required.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages