Build a reactive, geographically accurate bus map for mobile web using Rust-first architecture:
Bevy + WGPU/WASMfor the interactive clientAxumfor the backend proxy and asset APItype-driven developmentacross domain, ingestion, API, and rendering
Dorset is the first region package, but the architecture must remain region-agnostic.
- Preserve the Rust workspace split between
apps/*andcrates/*. - Add new behaviour to shared domain types before wiring it into handlers or rendering.
- Prefer explicit newtypes and enums to free-form strings for IDs, state, and filters.
- Keep region data external under
assets/regions/*; do not hardcode Dorset-specific data into app logic. - Assume browsers must not see upstream BODS credentials.
- Keep browser integration thin. Core logic should remain portable Rust.
- Introduce domain types first, then serialization, then adapters.
- Encode invalid states out of the system where practical.
- Keep DTOs at crate boundaries and convert into richer domain types internally.
- Use small, composable modules with clear ownership of invariants.
- Mobile-first interaction and rendering performance take priority.
- Render routes clearly before adding visual ornament.
- Keep camera and projection logic separate from realtime overlay logic.
- Design with future multi-region loading in mind.
- Model upstream providers behind traits.
- Keep polling, caching, and normalization separate.
- Return stable JSON contracts to the client, even if upstream formats vary.