How insanecoder789/navgate works
NavGate is a native Android navigation app: users discover a place, choose endpoints and a travel mode, preview routes, then follow one shared trip on a map or optionally in AR. The diagram preserves the documented discovery, routing, guidance, saved-place, manual-route, offline-map, and offline-routing capabilities. Relationships are based on the README and the shown source excerpts; unsampled implementation details are not inferred, and optional providers are marked dashed.
Main entry points: NavigationBackend.kt Navigation backend · JourneyUi.kt Journey screens · NavGateViewModel.kt Journey state and actions · PhotonPlaceSearch.kt Place search
Components 25
App experience
- Android app entry
app/src/main/java/com/rohanc/navgate/MainActivity.kt - Journey screens
app/src/main/java/com/rohanc/navgate/ui/journey/JourneyUi.kt - Journey state and actions
app/src/main/java/com/rohanc/navgate/ui/state/NavGateViewModel.kt
Place discovery
- Place search
app/src/main/java/com/rohanc/navgate/data/search/PhotonPlaceSearch.kt - Offline place indexes
app/src/main/java/com/rohanc/navgate/data/search/IndiaPlaceIndex.kt
Route planning
- Navigation backend
navigation-core/src/main/kotlin/com/rohanc/navgate/core/NavigationBackend.kt - Route models and choices
navigation-core/src/main/kotlin/com/rohanc/navgate/core/Routing.kt - Valhalla routing
app/src/main/java/com/rohanc/navgate/data/routing/ValhallaRoutingProvider.kt - Offline routing provider
app/src/main/java/com/rohanc/navgate/data/routing/offline/OfflineRoutingProvider.kt - BRouter engine
app/src/main/java/com/rohanc/navgate/data/routing/offline/BRouterEngine.kt - Manual route editing
app/src/main/java/com/rohanc/navgate/ui/ManualRoutePanel.kt
Trip guidance
- Navigation session and progress
navigation-core/src/main/kotlin/com/rohanc/navgate/core/NavigationSession.kt - Location and motion tracking
app/src/main/java/com/rohanc/navgate/ui/location/LocationTracker.kt - Map guidance and rendering
app/src/main/java/com/rohanc/navgate/ui/NativeMap.kt - AR guidance and rendering
app/src/main/java/com/rohanc/navgate/ui/ar/ArSessionView.kt - Foreground guidance notification
app/src/main/java/com/rohanc/navgate/nav/NavigationService.kt
Local state and data
- Offline routing data
app/src/main/java/com/rohanc/navgate/data/routing/offline/RoutingDataStore.kt - Saved manual routes
app/src/main/java/com/rohanc/navgate/data/local/ManualRouteStore.kt - Trip and route persistence
app/src/main/java/com/rohanc/navgate/data/local/NavGateDatabase.kt - App preferences
app/src/main/java/com/rohanc/navgate/data/local/DataStoreAppPreferencesStore.kt - Offline map packs
app/src/main/java/com/rohanc/navgate/data/maps/MapPackStore.kt
Other components
- Traveler
- Android location and sensors
- Photon search service
- Valhalla service
Connections 26
- Traveler → Android app entry: opens app
- Android app entry → Journey screens: shows journey
app/src/main/java/com/rohanc/navgate/MainActivity.kt - Traveler → Journey screens: searches and plans
- Journey screens → Journey state and actions: dispatches actions
- Journey state and actions → Place search: searches places
- Place search → Offline place indexes: queries indexes
- Place search → Photon search service: queries online
- Journey state and actions → Navigation backend: plans trip
- Navigation backend → Route models and choices: uses route models
navigation-core/src/main/kotlin/com/rohanc/navgate/core/NavigationBackend.kt - Navigation backend → Valhalla routing: requests routes
- Valhalla routing → Valhalla service: requests directions
- Navigation backend → Offline routing provider: uses fallback
- Offline routing provider → BRouter engine: delegates routing
app/src/main/java/com/rohanc/navgate/data/routing/offline/BRouterEngine.kt - BRouter engine → Offline routing data: uses installed data
- Navigation backend → Navigation session and progress: advances trip
navigation-core/src/main/kotlin/com/rohanc/navgate/core/NavigationBackend.kt - Android location and sensors → Location and motion tracking: supplies readings
- Location and motion tracking → Navigation backend: sends fixes
- Navigation backend → Trip and route persistence: persists trip state
- Navigation backend → Journey screens: shares trip state
- Journey screens → Map guidance and rendering: renders map view
- Journey screens → AR guidance and rendering: renders optional AR
- Journey screens → Manual route editing: edits itinerary
- Manual route editing → Saved manual routes: saves routes
- Journey state and actions → App preferences: stores preferences
- Journey screens → Offline map packs: manages map packs
- Navigation backend → Foreground guidance notification: updates notification