Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.61 KB

File metadata and controls

40 lines (28 loc) · 1.61 KB

AGENTS.md

Project intent

Build a reactive, geographically accurate bus map for mobile web using Rust-first architecture:

  • Bevy + WGPU/WASM for the interactive client
  • Axum for the backend proxy and asset API
  • type-driven development across domain, ingestion, API, and rendering

Dorset is the first region package, but the architecture must remain region-agnostic.

Working rules

  • Preserve the Rust workspace split between apps/* and crates/*.
  • 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.

Type-driven guidance

  • 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.

Frontend guidance

  • 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.

Backend guidance

  • Model upstream providers behind traits.
  • Keep polling, caching, and normalization separate.
  • Return stable JSON contracts to the client, even if upstream formats vary.