Client-only proof-of-concept React app using the Strava API to edit shoes on activities.
I use Strava to track my exercise, including runs and walks. I like the Strava feature that tracks your shoe usage. It tracks the shoe miles logged and will remind you when you approach the lifetime miles limit so that you can replace them.
Not surprisingly, I use running shoes for the runs and walking shoes for the walks. Strava, however, uses the same pair of shoes for both running and walking by default. Seems silly to me, but whatev.
You can use the UI to change shoes for each workout, but without getting into too much detail... it's annoying. One day I was so annoyed, I decided to learn about the Strava API and build a simple React app to let me edit shoes in an easy-to-use table format.
I just fire up the dev container in VSCode, run npm start, browse to the app, login to Strava, and edit my activities.
Overkill? Of course!
Did I learn something? Yeah. So that's cool.
NOTE: You must have Docker, Visual Studio Code and the VSCode Remote Containers extension installed in order for these instructions to work. For info about how to install these, see https://code.visualstudio.com/docs/remote/containers.
- Clone this repo.
- In VSCode, open the repo in a container.
- Follow the steps at https://developers.strava.com/docs/getting-started/ under "B. How to Create an account". In this process, note your Client ID and Client Secret.
- Copy
src/components/config.js.orig
tosrc/components/config.js
. Insrc/components/config.js
, enter yourconfig.strava.client_id
andconfig.strava.client_secret
values. Forconfig.strava.redirect_uri
, enterlocalhost
. Save the file. - In the VSCode terminal, type
npm install
. This will install the node modules. - In the VSCode terminal, type
npm start
to start the app. - Browse to http://localhost:3000. You should be re-directed to Strava.
- Login to Strava if asked.
- You may need to authorize your app. Select all of the checkboxes and click "Authorize".
- You should be re-directed to the app.
- Edit the gear for any entry by clicking the Edit link, editing the gear ID, and clicking the Save button.