Personal running data visualization platform with automatic Strava sync.
- Strava / Nike Run Club data import
- Map route visualization with animated playback
- Split pace analysis and charts
- AI-powered running insights (Claude AI)
- Daily auto-sync via GitHub Actions
- Responsive design for desktop and mobile
Create a .env.local file:
# Required - Map style
NEXT_PUBLIC_MAP_STYLE=https://basemaps.cartocdn.com/gl/positron-gl-style/style.json
# Strava (recommended)
STRAVA_CLIENT_ID=your_client_id
STRAVA_CLIENT_SECRET=your_client_secret
STRAVA_REFRESH_TOKEN=your_refresh_token
# Nike Run Club (optional)
NIKE_ACCESS_TOKEN=your_access_token
# Claude AI (optional - for running insights)
ANTHROPIC_API_KEY=your_api_key
ANTHROPIC_BASE_URL= # Optional: custom API endpoint for proxy
# Goals (optional - customize weekly/monthly targets)
NEXT_PUBLIC_WEEKLY_DISTANCE_GOAL=10000 # Weekly distance goal in meters (default: 10km)
NEXT_PUBLIC_MONTHLY_DISTANCE_GOAL=50000 # Monthly distance goal in meters (default: 50km)
NEXT_PUBLIC_WEEKLY_DURATION_GOAL=3600 # Weekly duration goal in seconds (default: 1 hour)
NEXT_PUBLIC_MONTHLY_DURATION_GOAL=18000 # Monthly duration goal in seconds (default: 5 hours)- Go to Strava API Settings and create an app
- Get your
Client IDandClient Secret - Obtain
Refresh Tokenvia OAuth flow (see strava-oauth guide)
The AI feature generates personalized running insights for each activity, analyzing your pace, splits, and performance patterns.
For Vercel Deployment:
Configure these environment variables in Vercel Dashboard (Settings → Environment Variables):
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
API key from Anthropic Console |
ANTHROPIC_BASE_URL |
(Optional) Custom API endpoint for proxy |
For Local Development:
Add to your .env.local file:
ANTHROPIC_API_KEY=your_api_key
ANTHROPIC_BASE_URL= # Optional: custom API endpointNote: Without Claude AI configured, the app works normally but without AI insights.
# Install dependencies
bun install
# Initialize database
bun run db:push
# Start dev server
bun run dev
# Manual sync
bun run syncVisit http://localhost:3000
- Fork this repository
- Import project in Vercel
- Configure environment variables (same as
.env.local) - Deploy
Note: Vercel deployment requires GitHub Actions for data sync. Database is stored in the repository.
# Using docker-compose
docker compose up -d
# Or manual build
docker build -t runpaceflow .
docker run -d -p 3000:3000 \
-e NEXT_PUBLIC_MAP_STYLE=https://basemaps.cartocdn.com/gl/positron-gl-style/style.json \
-e STRAVA_CLIENT_ID=your_id \
-e STRAVA_CLIENT_SECRET=your_secret \
-e STRAVA_REFRESH_TOKEN=your_token \
-v runpaceflow_data:/app/data \
runpaceflowBuilt-in GitHub Actions workflow for daily activity sync.
Add in repository Settings → Secrets and variables → Actions:
| Secret | Description |
|---|---|
STRAVA_CLIENT_ID |
Strava Client ID |
STRAVA_CLIENT_SECRET |
Strava Client Secret |
STRAVA_REFRESH_TOKEN |
Strava Refresh Token |
PAT |
Personal Access Token for push access |
- Auto sync: Daily at UTC 0:00 (Beijing 8:00)
Customize by editing cron in
.github/workflows/sync.yml:on: schedule: - cron: '0 0 * * *' # UTC time, format: min hour day month weekday
- Manual trigger: Actions → Sync Activities → Run workflow
- Data storage: SQLite database auto-committed to
data/activities.db
Inspired by yihong0618/running_page
MIT