⚙️ Installation & Setup
This dashboard runs serverless using Streamlit Cloud and GitHub Actions. You do not need to pay for hosting.
Prerequisites
- A GitHub account.
- A Strava account.
- A Streamlit Cloud account.
Step 1: Fork the Repository
Click the Fork button on the GitHub Repository to create your own copy.
Step 2: Get Strava API Keys
This is the tricky part, but you only do it once.
- Log in to Strava API Settings.
- Create an Application:
- Name:
HumblebragDashboard - Category:
Visualizer - Website:
http://localhost - Authorization Callback Domain:
localhost
- Name:
- Copy your
Client IDandClient Secret.
Crucial Step: The Refresh Token
You cannot use the standard Access Token. You need a Refresh Token with activity:read_all permissions.
- Paste your Client ID into this URL and open it in your browser:
https://www.strava.com/oauth/authorize?client_id=[YOUR_CLIENT_ID]&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=activity:read_all - Click Authorize.
- Look at the URL in your browser. It will look like:
http://localhost/exchange_token?state=&code=c40c...&scope=... - Copy the code after
code=. - Exchange this code for a token using cURL or a Python script (see
get_token.pyin the repo/issues).
Step 3: Configure GitHub Secrets
- Go to your forked repository on GitHub.
- Navigate to Settings > Secrets and variables > Actions.
- Add the following Repository Secrets:
| Secret Name | Value |
|---|---|
STRAVA_CLIENT_ID |
Your numeric Client ID |
STRAVA_CLIENT_SECRET |
Your alphanumeric Client Secret |
STRAVA_REFRESH_TOKEN |
The long token string starting with r... |
Step 4: Deploy to Streamlit
- Go to share.streamlit.io.
- Click New App.
- Select your forked repository.
- Main file path:
app.py. - Click Deploy.
Step 5: First Data Sync
- Go to the Actions tab in your GitHub Repo.
- Select Strava Daily Sync.
- Click Run workflow.
Your dashboard will now update automatically every day at 06:00 UTC!