Skip to main content

makerundev-server

A self-hosted web app for your running data, built on the makerundev library. Import FIT, GPX and TCX files, browse your activities and see pace, heart-rate and elevation charts, time in heart-rate zones and training load. Everything stays on your machine: there are no accounts, no external services and no CDN assets.

Run it

With uv, straight from PyPI:

uvx makerundev-server

Then open http://127.0.0.1:8000. The database and your files are kept in data/ under the folder you start it from, so start it from the same folder next time or set MAKERUNDEV_DATA_DIR. pip install makerundev-server installs the same makerundev-server command.

With Docker, from the image published with each release:

docker run --name makerundev -p 127.0.0.1:8000:8000 -v makerundev-data:/data ghcr.io/tanhtruong/makerundev-server

From a clone of the repository, to work on it:

uv sync
uv run makerundev-server

The React pages, the activity list for now, need the web app built once with make sync-web and make build-web, which need Node and pnpm; until then they say so, and the other pages work. docker compose up in the clone builds the image, web app included, from the checkout instead.

Configuration

Variable Default What it does
MAKERUNDEV_DATA_DIR ./data (/data in the image) Where the database and imported files are kept
MAKERUNDEV_HOST 127.0.0.1 (0.0.0.0 in the image) Address to listen on
MAKERUNDEV_PORT 8000 Port to listen on
MAKERUNDEV_STRAVA_CLIENT_ID unset Client id of your own Strava API application; enables Strava sync
MAKERUNDEV_STRAVA_CLIENT_SECRET unset Its client secret

The project was called pacelab up to 0.2.0. PACELAB_DATA_DIR, PACELAB_HOST and PACELAB_PORT are still read when the MAKERUNDEV_ variable is not set. The image sets all three MAKERUNDEV_ variables, so override those there.

There is no login. Keep the app on 127.0.0.1 or behind a reverse proxy that adds authentication; the bundled compose.yml only publishes the port on localhost.

So that another website cannot make your browser change anything here, every request other than GET, HEAD and OPTIONS is refused with 403 when the browser marks it as coming from another site (Sec-Fetch-Site other than same-origin or none), or, from a browser that does not send that header, when its Origin names a different host and port than the request's Host. A request with neither header, such as one from curl or a script, goes through. Behind a reverse proxy, make sure it passes the original Host header.

Data

The data directory holds:

  • makerundev.db - a SQLite database with one row per activity and its summary, your athlete settings, and your Strava tokens, Garmin key and sync progress once connected. A data directory created under the old name keeps its pacelab.db, which is used as it is. The app upgrades it to the latest schema on startup, so a newer version can open an older data directory, but not the other way round. After an upgrade that changes how a stored fact is worked out, the first start reads every activity's stream once before it serves.
  • originals/ - each imported file as uploaded (for a ZIP, the file inside), named by its SHA-256, and each synced Strava activity's summary, laps and streams as gzipped JSON, named strava-<id>
  • streams/ - the normalised record stream of each activity as Parquet

Importing the same file twice is detected by its hash and skipped. Uploads are capped at 64 MB per file. To back up, copy the whole directory; with Docker, docker cp makerundev:/data ./makerundev-backup (docker compose cp from a clone).

Strava sync

Create a Strava API application under Settings → My API Application, set its Authorization Callback Domain to the host you open the app on (127.0.0.1 and localhost are always allowed by Strava), and start the app with MAKERUNDEV_STRAVA_CLIENT_ID and MAKERUNDEV_STRAVA_CLIENT_SECRET. The Strava page then offers Connect with Strava and Sync now. Behind a reverse proxy, make sure it passes the original host and scheme, because the OAuth redirect address is built from the request.

  • What a sync does. It fetches activities newer than the newest one synced, then continues back through your history, newest first, with one request per activity for its streams. It runs in the background; the page refreshes while it does.
  • Rate limits. Strava allows a new application 100 read requests per 15 minutes and 1,000 per day. Each activity takes two, its streams and its details with the laps. A sync stops before either limit runs out and the next one continues where it stopped.
  • Laps. Each activity comes with the laps your watch recorded. Activities synced before laps were get theirs over the next syncs, after what is new and the backfill.
  • Files win. A Strava activity is matched to one you imported from a file by the Strava id in a bulk-export filename, or by starting within 60 s and covering the same distance within 5% or 200 m, whichever is larger. The file's data is kept and gains a "View on Strava" link. Importing the file after a sync replaces the synced stream.
  • What is not synced. Activities without streams, such as manual entries, are listed on the page and not tried again. The device name is not read. Edits and deletions made on Strava after an activity was synced are not picked up.
  • Disconnect. Revokes the app's access and deletes the tokens and every activity that came only from Strava. Activities matched to a file stay.
  • Tokens. They are stored unencrypted in the database in your data directory, and nowhere else.

Garmin sync

Create a Personal API key in Garmin Connect on the web under Settings → Personal API Key, open the Garmin page and paste it. Saving exchanges the key for a 24-hour token at once, so a mistyped or expired key is turned away before it is stored. The page then offers Sync now.

  • What a sync does. It fetches activities newer than the newest one synced, then continues back through your history, newest first. It walks Garmin's list by date window, not by position, so activities added or deleted on Garmin during a sync do not make it skip others. Each activity's original file is downloaded and imported exactly like an upload: a ZIP is stored as the file inside, under its own name, and deduplicated by its SHA-256. A file whose name would be all digits is stored as garmin-<id>.<ext>, so it is never mistaken for a Strava id. It runs in the background; the page refreshes while it does.
  • Pacing. Garmin publishes no rate limits, so a sync waits a second between requests and stops when Garmin answers 429, saying when to try again if Garmin does. The next sync continues where it stopped.
  • Already here. An activity that starts within 60 s of one you already have from a file, and covers the same distance within 5% or 200 m, is not downloaded. One that came only from Strava is replaced by the Garmin file, which keeps the Strava link.
  • What is not synced. Manual entries have no file, and a download that cannot be read, such as a multi-sport ZIP holding several files or a file not sent as a ZIP, is skipped. Both are listed on the page and not tried again. Edits and deletions made on Garmin Connect after a sync are not picked up.
  • An expired key. Keys last 30 to 365 days. When Garmin stops accepting yours, the sync stops and the page explains how to create a new one; paste it in and sync again.
  • Remove key. Deletes the key, the token and the sync progress. Activities imported from Garmin stay, because they are ordinary files.
  • The key. It is stored unencrypted in the database in your data directory, and nowhere else. It is never shown on a page.

Routes

Method and path What it returns
GET / The activity list with the import form (the React app; every path the server does not own returns it)
GET /load?days=90|180|365|all Fitness, fatigue and form from daily TRIMP (default 180 days), in the React app
GET /activities/{id} Activity page with charts, best efforts, time in zones and TRIMP (the React app)
GET /settings Athlete settings form (the React app)
GET /strava Strava connection, sync status and skipped activities (the React app)
POST /strava/connect Start connecting: redirects to Strava's authorisation page
GET /strava/callback Where Strava sends you back after authorising; redirects to the Strava page
GET /garmin Garmin key form, sync status and skipped activities (the React app)
GET /api/activities?limit=50&offset=0 Activities newest first with their summaries and TRIMP, as {items, total} JSON (limit up to 200)
POST /api/activities Import one or more files (multipart field files) and report each as imported, already_imported or failed, with the activity id or the reason
GET /api/activities/{id}/records The activity's record stream, as JSON
GET /api/settings The saved athlete settings (or null), the defaults a first save starts from, zone starts in bpm, the highest recorded heart rate and the accepted timezone names
PUT /api/settings Save the athlete settings and report how many activities had TRIMP recomputed; an invalid value is refused with 422 naming the field
GET /api/training-load Fitness, fatigue and form per day over days (90, 180, 365 or all), the weekly table, and current VDOT and critical speed with their efforts
GET /api/strava Whether Strava is configured and connected, the sync's progress, how the last sync ended and the skipped activities
POST /api/strava/sync Start a sync in the background (202 with the same body as GET /api/strava; 409 before Strava is connected)
DELETE /api/strava Revoke access, delete Strava-only activities and report how many were removed
GET /api/garmin Whether a Garmin key is saved, and the sync's progress, outcome and skipped activities; never the key
PUT /api/garmin/key Check a Personal API key with Garmin and save it; a key Garmin refuses is a 422, and Garmin out of reach a 502
POST /api/garmin/sync Start a sync in the background (202), or keep the one running
DELETE /api/garmin/key Delete the key and sync progress; imported activities stay
GET /openapi.json The JSON API's OpenAPI schema

The JSON API follows docs/api.md. It is public but unversioned before 1.0, so a breaking change is listed in the changelog.

Development

The app is a FastAPI JSON API with the React app in apps/web on top (ADR 8). make check at the repository root runs the server's tests along with the library's and needs no Node. From a clone, run make build-web once to serve the React pages; without it they show how to build them. See docs/frontend.md and CONTRIBUTING.md.

After changing a JSON route or its models, run make openapi at the repository root and commit apps/server/openapi.json; a test fails while it is stale.

Changing the database schema

The schema is managed by Alembic migrations in src/makerundev_server/migrations/versions/, numbered 0001, 0002, and so on. After changing the models in db.py, from apps/server:

MAKERUNDEV_DATA_DIR=/tmp/makerundev-dev uv run alembic upgrade head
MAKERUNDEV_DATA_DIR=/tmp/makerundev-dev uv run alembic revision --autogenerate --rev-id NNNN -m "describe the change"

NNNN is the next number after the newest file in versions/. Read the generated file before committing: autogenerate misses some changes, such as renames, and SQLite changes run in batch mode, which copies the table. tests/test_migrations.py fails while the models and the migrations disagree, and checks that a 0.1.0 database still upgrades.

Metadata

Release files for makerundev-server 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for makerundev-server 0.8.0
File Size Uploaded Provenance Actions
makerundev_server-0.8.0.tar.gz 856.8 kB With provenance Details for makerundev_server-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for makerundev-server 0.8.0
File Interpreter ABI Platform Actions
makerundev_server-0.8.0-py3-none-any.whl Python 3 none any Details for makerundev_server-0.8.0-py3-none-any.whl

Total release size: 1.7 MB

Release files / makerundev_server-0.8.0.tar.gz

Download URL makerundev_server-0.8.0.tar.gz
Size 856.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e1ee0b8c74e0d33f9006a7494b6d6780d6b5ae89aba3f96a05644e03764343be
BLAKE2b-256 checksum
How to use checksums
ac9dfb732bc4c4736bf0f3c4028fe2fc9b1f16d976e1f28deccb236996099eb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / makerundev_server-0.8.0-py3-none-any.whl

Download URL makerundev_server-0.8.0-py3-none-any.whl
Size 892.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
145509938082cc0c018fa63bf1b0c5101eef6bc35cae9af627480a19a5309e92
BLAKE2b-256 checksum
How to use checksums
f7d11a7841aa035f7992b9e7469e9283f400588de4fbcf7373b0fc9e8ab1e890
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for makerundev-server 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for makerundev_server-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page