A modern, full-featured web dashboard for viewing your Strava stats with a beautiful live dashboard to track your progress.
- Live Dashboard - Real-time display of your Strava stats with beautiful visualizations
- Progress Tracking - Track your distance goals with visual progress bars
- Strava Integration - Full OAuth flow for secure Strava connection
- Personalization - Customize goals, sport type, and tracking periods
- Auto-Refresh - Automatically updates your stats at configurable intervals
- Offline Support - Cached stats available even when offline
- Distinctive Design - Custom typography, smooth animations, and vibrant color scheme
- Strava API OAuth flow
- Configuration management (name, sport, goal, tracking period, refresh interval)
- Battery life estimates (for hardware reference)
- Funny loading messages
- Step-by-step wizard interface
- NEW: Live dashboard with real stats
- NEW: Progress visualization with charts
- NEW: Auto-refresh functionality
- NEW: Offline caching of stats
- Serial/USB connection
- WiFi configuration
- Direct board communication
- E-ink display rendering
- Hardware power management
- Node.js (v14 or higher)
- A modern web browser
- Strava account and API credentials
Before using the app, you need to create a Strava API application:
- Go to strava.com/settings/api
- Click "Create an App" or "My API Application"
- Fill in the form:
- Application Name: Strava Stats
- Category: Choose any
- Club: Leave blank (or choose if you have one)
- Website: http://localhost:8089
- Authorization Callback Domain:
localhost(important: just "localhost", not a full URL)
- Click "Create"
- You'll receive a Client ID and Client Secret - save these!
# Navigate to the directory containing the files
cd path/to/strava-stats
# Start the server (default: localhost:8089)
node server.js
# OR specify custom host and port
HOST=yourdomain.com PORT=3000 node server.jsThe server supports these environment variables:
- HOST: The hostname/domain (default:
localhost) - PORT: The port number (default:
8089)
The server will automatically inject the correct HOST and PORT values into the HTML file, so the OAuth callback redirects to the right location.
Important for Production: If deploying to a public domain, make sure to:
- Set
HOSTto your domain (e.g.,HOST=myapp.example.com) - Update your Strava API application's "Authorization Callback Domain" to match your domain
Open your browser and navigate to:
http://localhost:8089
The app has two main views accessible via the top navigation:
Your live Strava statistics dashboard showing:
- Progress Bar: Visual representation of your goal progress
- Distance: Total kilometers traveled
- Moving Time: Active time spent on activities
- Elevation Gain: Total meters climbed
- Activities: Number of completed activities
- Average Distance: Average per activity
- Athlete Info: Your name and location
Features:
- π Click the refresh button (bottom-right) to update stats manually
- π Stats update automatically based on your refresh interval setting
- πΎ Data is cached, so you can view your last stats even offline
Setup your Strava connection and preferences:
- Enter your Strava Client ID and Client Secret
- Click "π Authorize Strava"
- A popup will open asking you to authorize the app on Strava
- Click "Authorize" on the Strava page
- The popup will close automatically and you'll see a success message
- Your stats will automatically load in the Dashboard
Configure your dashboard preferences:
- Your Name: Displayed on the dashboard (optional)
- Sport Type: Run, Ride, Swim, Hike, or Walk
- Distance Goal: Target distance in kilometers
- Tracking Period:
- Yearly: Jan 1 - Dec 31
- Monthly: Last ~30 days
- Weekly: Last ~7 days
- Auto Refresh Interval: How often to fetch new data
- Every hour
- Every 6 hours
- Every 12 hours
- Once a day (recommended)
- Manual only
Click "πΎ Save Configuration" and switch to the Dashboard tab to see your stats!
- OAuth Authentication: Securely connects to Strava using OAuth 2.0
- Data Fetching: Retrieves your athlete stats via Strava API v3
- Local Caching: Stores data in browser localStorage for offline viewing
- Auto-Refresh: Optionally fetches new data at your configured interval
- Token Management: Automatically refreshes access tokens as needed
This app requests the following Strava API permissions:
- read: Read public profile data
- activity:read_all: Read all activity data (public and private)
node server.js
# Access at http://localhost:8089# Set environment variables
export HOST=yourdomain.com
export PORT=8089
# Start the server (consider using PM2 or similar)
node server.js
# Or with PM2
pm2 start server.js --name strava-stats# Install PM2
npm install -g pm2
# Start with environment variables
HOST=yourdomain.com PORT=8089 pm2 start server.js --name strava-stats
# Save PM2 configuration
pm2 save
pm2 startupDon't forget to:
- Update Strava API "Authorization Callback Domain" to your domain
- Set up SSL/HTTPS if deploying publicly (Strava requires HTTPS for production)
- Configure your firewall to allow traffic on your chosen port
| Variable | Default | Description |
|---|---|---|
HOST |
localhost |
Hostname or domain where the app is running |
PORT |
8089 |
Port number for the HTTP server |
Example:
HOST=dashboard.example.com PORT=3000 node server.jsIf the Strava authorization popup is blocked by your browser:
- Check your browser's popup blocker settings
- Allow popups for your domain (e.g.,
localhost:8089) - Try clicking the button again
If you see "Authorization failed":
- Verify your Client ID and Client Secret are correct
- Make sure the Authorization Callback Domain in Strava matches your HOST
- For local: use
localhost - For production: use your domain without protocol (e.g.,
myapp.comnothttps://myapp.com)
- For local: use
- Try creating a new API application on Strava
If port is already in use:
# Use a different port
PORT=3000 node server.jsIf you get a redirect URI mismatch error:
- Check your Strava API application's callback domain
- Ensure it matches your HOST setting
- The callback domain should be just the hostname (no protocol, no path)
- β
Correct:
localhostormyapp.com - β Wrong:
http://localhostormyapp.com/callback
- β
Correct:
If stats don't appear after authorization:
- Open browser developer console (F12) to check for errors
- Verify your access token is valid (check localStorage)
- Try clicking the refresh button
- Clear browser cache and re-authorize
The app consists of two files:
strava-stats.html- Single-page application with dashboard and configurationserver.js- Minimal Node.js server for OAuth callback handling
- Frontend: Vanilla JavaScript (no frameworks needed!)
- Styling: Custom CSS with animations and gradients
- Typography: DM Serif Display + IBM Plex Mono (Google Fonts)
- API: Strava API v3
- Storage: Browser localStorage for configuration and caching
- Backend: Node.js HTTP server (only for OAuth redirect)
/oauth/authorize- Strava OAuth authorization/oauth/token- Get/refresh access tokens/api/v3/athlete- Get athlete profile/api/v3/athletes/:id/stats- Get athlete statistics
{
// Configuration
stravaStatsConfig: {
clientID, clientSecret, refreshToken, accessToken,
tokenExpiry, name, sport, goal, trackPeriod, refreshInterval
},
// Cached Stats
stravaStatsData: {
athlete: { id, firstname, city, ... },
stats: { ytd_run_totals, recent_run_totals, ... },
fetchedAt: timestamp
}
}This web app features a distinctive design that avoids generic UI patterns:
- Typography: Editorial serif headings paired with monospace body text
- Color Palette: Dark theme with vibrant accent colors (coral red, turquoise, warm yellow)
- Animations: Smooth transitions and playful loading states
- Layout: Card-based wizard with clear visual hierarchy
ISC
Originally converted from a Python Tkinter application by @ibisette
For issues related to:
- This web app: Open an issue in this repository
- Original Ibis Dashboard hardware: See the original repository
- Strava API: Check Strava's API documentation
