From f49a5f2015e911d1a90a93e51a39ca7a0e4560c1 Mon Sep 17 00:00:00 2001 From: zemion Date: Mon, 6 Jul 2026 14:42:16 +0200 Subject: [PATCH] Sync Repo-docs-06-offline-strategy from project files --- Repo-docs-06-offline-strategy.-.md | 96 ++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 Repo-docs-06-offline-strategy.-.md diff --git a/Repo-docs-06-offline-strategy.-.md b/Repo-docs-06-offline-strategy.-.md new file mode 100644 index 0000000..2aeea23 --- /dev/null +++ b/Repo-docs-06-offline-strategy.-.md @@ -0,0 +1,96 @@ + + +> Mirrored from `/mnt/DATA/git/pikebacker/docs/06_offline_strategy.md`. +> Origin: `repository`. +> Active tasks and changing state belong in Gitea issues; this wiki page is durable project context. + +--- +# Offline Strategy + +## Offline requirement + +Offline use must cover riding-critical information, not only maps. + +## Offline pack contents + +A trip offline pack should include: + +- route geometry, +- route alternatives, +- daily stages, +- elevation profile, +- selected vector/raster map area, +- route-corridor POIs, +- emergency/bailout POIs, +- local rule cards, +- cached weather forecast at departure, +- saved bookings/deep links/addresses, +- user notes, +- GPX/TCX/FIT exports, +- report queue for later upload. + +## Pack scope + +Use a corridor-based pack: + +```text +primary corridor: 5 km on either side of route +logistics corridor: 20 km around stage endpoints and bailout towns +map context: bounding box with simplification by zoom level +``` + +## Offline modes + +### MVP offline mode + +- Download planned route, POIs, stage plan, rules, and GPX. +- Allow map viewing if tile pack is present. +- Allow report capture and sync later. +- Allow basic distance-to-next-critical-thing calculation from cached data. + +### Production offline mode + +- Offline rerouting using a compact regional routing graph. +- Offline POI search. +- Offline rule lookup. +- Offline elevation sampling. +- Offline exports. + +## Storage model + +Mobile app storage: + +- SQLite for structured trip data and POIs. +- File storage for tile packs and exports. +- Key-value storage for user preferences and sync state. + +## Pack versioning + +Each offline pack should include: + +```json +{ + "pack_id": "pack_123", + "trip_id": "trip_123", + "created_at": "2026-06-30T00:00:00Z", + "data_versions": { + "osm_extract": "geofabrik-europe-germany-2026-06-29", + "poi_index": "2026-06-29", + "rules": "2026-06-01", + "weather_cached_at": "2026-06-30T06:00:00Z" + }, + "bbox": [6.0, 47.0, 15.0, 55.0], + "route_buffer_km": 5, + "expires_at": "2026-07-14T00:00:00Z" +} +``` + +## User-facing warnings + +Before departure, show: + +- which items are available offline, +- which items are stale, +- which route sections lack cached POIs, +- whether offline rerouting is available, +- which exports are saved.