diff --git a/Cargo.lock b/Cargo.lock index 2fc0243..33e4b1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5258,6 +5258,7 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" name = "velopopuli" version = "0.3.9" dependencies = [ + "async-trait", "base64 0.22.1", "block2 0.6.2", "btleplug", diff --git a/HANDOFF.md b/HANDOFF.md index 893687c..32796f9 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -63,7 +63,11 @@ src-tauri/ The app (Tauri 2) mapdata.rs Downloading + caching vector tiles and Overpass data per route native/ Native renderer (mod.rs, host.rs NSView, shader.wgsl) diag.rs Diagnostics log + reports; issues.rs: GitHub new-issue links; snapshot.rs: window PNGs (macOS) - strava, geo, photos, smart, group, library, terrain, secrets, store + connectors/ Services a ride is uploaded to, and whose past rides can be raced as ghosts: + mod.rs (Connector trait, registry, descriptor types the settings card is built from), + strava.rs (OAuth, upload, recent rides, segments). + docs/ADDING_A_CONNECTOR.md explains adding one. + geo, photos, smart, group, library, terrain, secrets, store web/ React + three.js (Vite). ui/ screens, world/ the 3D scene (scene.ts, terrain.ts, trees.ts (tree models, sprite atlas), rider.ts, barriers.ts, surfaces.ts, weather.ts, native.ts = assets handed to the native renderer) docs/images/ README screenshots; docs/wiki/ wiki source @@ -80,7 +84,8 @@ How a ride flows end to end is in the wiki's [Architecture](https://github.com/p - **App data folder:** macOS `~/Library/Application Support/org.velopopuli.VeloPopuli`, Windows `%APPDATA%\org.velopopuli.VeloPopuli`, Linux `~/.local/share/org.velopopuli.VeloPopuli`. Override with `VP_DATA_DIR`. - `data/*.json` (store keys): `settings`, `routes` (library list) + `route-` (name + GPX), `rides`, `profile`, `ghosts-`, `scenery-`, `buildings-`, workouts, segments. - **Caches have versions:** buildings `FORMAT` (2) and `SCENERY_FORMAT` (4) in `mapdata.rs`; road tags `WAY_TAGS` (3, since trails added `mtb:scale`) in `world/surface.rs`. Bump the relevant one when the cached shape changes, or old caches will be read wrongly. -- **Secrets** (Strava, Home Assistant, GitHub none): OS keychain on macOS/Windows under the service name **"Velo Populi"** (with the space — kept on purpose so saved logins survive the rename), files with 0600 permissions on Linux. +- **Secrets** (Strava, Home Assistant, GitHub none): OS keychain on macOS/Windows under the service name **"Velo Populi"** (with the space — kept on purpose so saved logins survive the rename), files with 0600 permissions on Linux. Each connector's credentials are one entry named after its id (`strava`, …); the Home Assistant token is `homeassistant`. +- **Uploads:** a ride records where it went in `RideSummary.uploads` by connector id. Rides from before v0.3.10 carry `stravaActivityId` instead; `RideSummary::upload()` (Rust) and `uploadOf()` (page) read both, and `connector_upload` copies it into `uploads` when it next writes the list. The old field is kept alongside for a release or two so 0.3.9 still sees the ride as uploaded. The old `stravaAutoUpload` setting becomes `autoUpload: ["strava"]` in `mergeSettings`. - **Logs:** `logs/diagnostics-