https://github.com/mountainash/cycletreks
A visual diary of your cycle adventure.
https://github.com/mountainash/cycletreks
cloudflare cycletrek journey strava-api workers
Last synced: 5 months ago
JSON representation
A visual diary of your cycle adventure.
- Host: GitHub
- URL: https://github.com/mountainash/cycletreks
- Owner: mountainash
- Created: 2021-08-25T19:05:33.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-08T00:57:57.000Z (about 1 year ago)
- Last Synced: 2025-06-01T22:08:53.401Z (about 1 year ago)
- Topics: cloudflare, cycletrek, journey, strava-api, workers
- Language: JavaScript
- Homepage: https://strava-auth.mountainash.workers.dev/
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# CycleTreks
> A visual diary of your cycle adventures
## About
[Strava](https://www.strava.com/) is good for tracking single-activity GPS & fitness logs. This project seeks to combine multiple single activities into a multi-day adventure journal.
Using a Cloudflare Worker to connect to the Strava API and pull concurrent cycle logs and combine them into a single journey.
## Dependencies
- [Cloudflare Workers](https://workers.cloudflare.com/)
- [Strava API v3](https://developers.strava.com/docs/reference/)
## Use
1. Create a new Worker and save the content from `./worker/index.js` into your script (note the URL)
1. Get a Strava `access_token` by creating an application at
1. Visit your running Worker in a web browser and authorise your app
## Running locally
### Setup
1. `npm install`
1. `cp .env.example .dev.vars`
1. Edit `.dev.vars` with keys and IDs from your [Strava Application settings](https://www.strava.com/settings/api)
1. `npm run worker:init` to put the details from `.dev.vars` into `worker/wrangler.toml` [Docs](https://developers.cloudflare.com/workers/platform/environment-variables#adding-environment-variables-via-wrangler)
1. `wrangler login` (optional for easier deployment with `npm run worker:publish`)
### Develop
```sh
npm run worker:dev
npm run worker:tail # for logs from the remote Worker - good for callbacks
```
## Resources
- [UI](https://codepen.io/mountainash/pen/jOgPjob)
- **Strava**
- [API Docs](https://developers.strava.com/docs/)
- [Strava API Auth flow](https://developers.strava.com/docs/authentication/#requestingaccess)
- **Cloudflare**
- [Workers](https://developers.cloudflare.com/workers)
- [Wranger](https://developers.cloudflare.com/workers/cli-wrangler)