A simple webapp that loads your Strava data, displays it on a map, and let you fill in hexagons with your activities.
Similar to VeloViewer Max Squares, but with two differences:
- Hexagons instead of squares, because hexagons are the Bestagons
- Little hexagons, to encourage walks and runs and exploring local spots
Try it out: hexy.rdrn.me
![Screenshot 2024-04-13 at 21 24 17](https://private-user-images.githubusercontent.com/19817302/322229439-bd6acec8-2d4d-436e-947e-a0dc852a86a7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4Mjg3MDUsIm5iZiI6MTcyMTgyODQwNSwicGF0aCI6Ii8xOTgxNzMwMi8zMjIyMjk0MzktYmQ2YWNlYzgtMmQ0ZC00MzZlLTk0N2UtYTBkYzg1MmE4NmE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI0VDEzNDAwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNiNThlYjY3NjI1OTM4OTZjNzJjNTc1ZDk3ZDg3ZWEwZDU5NjA5ZGZmNzVkZTRmNjE1YzU0MTY0Y2YwODRmMzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kmFbCJN7lrAMBRsWwIkrTAo7Q2NXZGBoFaE7Dir3bHw)
Rust API with the following bits:
rocket
: web framework, partially chosen for OpenAPI compatibility withokapi
but I've ripped that out anyway. Easy HTML templating and slightly-too-clever db pool.diesel
: db queries to on-disk SQLite. Will probably usesqlx
next time because why not. Like diesel's in-process migrations!geo
withh3o
,polyline
,dbscan
for the fun geo bits!serde
,reqwest
,chrono
,anyhow
for the usual.
Bit of plain HTML, JavaScript and Tailwind for the frontend. I'd like to find a nice setup for using compiled TypeScript for the frontend (React or Svelte) together with a backend-first (single server, lots of HTTP) compiled language approach but I haven't found it yet...
Running on render.com with a local SQLite DB on a persistent disk.
You'll need to create a .env
file with the following:
RUST_LOG=info
FERNET_KEYS='32-bytes-of-base64-encoded,another-one-for-rotation'
ROCKET_DATABASES='{db={url="db.sqlite"}}'
ROCKET_SECRET_KEY=''
REDIRECT_URI='http://localhost:8000/callback'
STRAVA_BASE='https://www.strava.com'
STRAVA_CLIENT_ID=''
STRAVA_CLIENT_SECRET=''
OS_KEY=''
The usual:
cargo fmt
check
clippy
build
test
run
Once running, go to localhost:8000 and follow the prompts.