Architecture
"/home/yossef/notes/git/projects/inguide/Architecture.md"
path: inguide/Architecture.md
- **fileName**: Architecture
- **Created on**: 2026-06-16 00:48:42
Architecture
Purpose: High-level components, boundaries, dependencies, and data/control flow.
Two-Tier Architecture
Android Native (Kotlin/Compose) Web Runtime (MapLibre GL JS)
┌──────────────────────────────┐ ┌────────────────────────────┐
│ MainActivity │ │ index.html (WebView) │
│ ├── AppNavigation (NavHost) │ │ ├── MapLibre GL JS │
│ └── MainScreen (tabs) │ │ ├── MVF indoor layers │
│ ├── HomeScreen │ │ ├── A* pathfinding │
│ ├── MapScreen ──────── │ JSBridge│ ├── GPS tracking │
│ ├── ArNavigationScreen│ │ ├── Floor management │
│ ├── ChatScreen │ │ └── Search │
│ └── ScheduleScreen │ └────────────────────────────┘
└──────────────────────────────┘
│ │
│ IndoorPositioningService │ Route data
│ (magnetometer → fingerprints) │ (via AndroidBridge)
│ GPS (FusedLocationProviderClient) │
v v
┌──────────────────────────────────────────────────────────────┐
│ AR Navigation (CameraX + Canvas overlay) │
│ └── CoordinateRegistration: [lng,lat] → AR world-space │
└──────────────────────────────────────────────────────────────┘
DI
- Manual DI via
AppContainer(no Hilt/Dagger) ViewModelFactoryprovides VMs to Compose screens
JS Bridge
@JavascriptInterfaceonMapBridgeclass registered as"AndroidBridge"- JS calls
window.AndroidBridge.*to send data to native - Native calls
webView.evaluateJavascript()to send commands to JS MapJsActionsqueues commands before map is ready
Navigation
AppNavigation→ either Login or MainMainScreentabs: Home, Map, Schedule, Chat, ArView (5 destinations)LoadingControllermanages cross-tab transition animations
AR Data Path
See ./flows/route-data-flow.md for the complete WebView → AR screen chain.
Related: ./Project Map.md, ./modules/ar.md, ./modules/services.md
continue:[[]]
before:[[]]