# felixysw/accessible-navigation architecture

> Architecture diagram of the GitHub repository felixysw/accessible-navigation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/felixysw/accessible-navigation
- Repository: https://github.com/felixysw/accessible-navigation

## Overview

Accessible Navigation plans pedestrian routes with mobility-aware timing and barrier screening, then guides the walker using geospatial AR and on-device hazard detection. The map is the main entry point; a selected route enters full-screen AR navigation. Separate branches provide camera-only hazard detection, an indoor AR preview, and accessibility settings. The README documents product capabilities not visible in sampled source; edges are limited to those documented there or supported by the source index and excerpts.

Main entry points: [`src/screens/MapScreen.tsx`](https://github.com/felixysw/accessible-navigation/blob/main/src/screens/MapScreen.tsx) (Route map), [`src/screens/ARNavigationScreen.tsx`](https://github.com/felixysw/accessible-navigation/blob/main/src/screens/ARNavigationScreen.tsx) (AR navigation screen), [`src/navigation/RootNavigator.tsx`](https://github.com/felixysw/accessible-navigation/blob/main/src/navigation/RootNavigator.tsx) (Root navigation), [`src/services/accessibleRouting.ts`](https://github.com/felixysw/accessible-navigation/blob/main/src/services/accessibleRouting.ts) (Accessible router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_route["Route planning"]
  node_map["Route map<br/>[MapScreen.tsx]"]
  node_routing["Route orchestration<br/>[routing.ts]"]
  node_directions["Place and directions<br/>[directions.ts]"]
  node_accessible["Accessible router"]
  node_barriers["Barrier screening<br/>[accessibility.ts]"]
  node_mobility["Mobility pace<br/>[mobility.ts]"]
  node_osm(("OpenStreetMap services"))
  node_google(("Google services"))
  node_route_types["Route domain types<br/>[route.ts]"]
  node_geo["Route geometry<br/>[geo.ts]"]
end

subgraph group_guidance["AR guidance"]
  node_ar["AR navigation screen"]
  node_nativear["Geospatial AR scene"]
  node_arbridge["AR native bridge<br/>[index.tsx]"]
  node_preview["AR preview"]
end

subgraph group_hazards["Hazard detection"]
  node_hazardscreen["Hazard camera screen"]
  node_hazardservice["Hazard detector service<br/>[hazardDetector.ts]"]
  node_nativehazard["On-device detector"]
  node_hazardtypes["Hazard domain types<br/>[hazard.ts]"]
end

subgraph group_access["Accessibility"]
  node_voice["Voice cues<br/>[voiceCues.ts]"]
  node_speech["Speech output<br/>[speech.ts]"]
  node_settings["Settings screen<br/>[SettingsScreen.tsx]"]
  node_preferences[("Preferences")]
  node_tokens["Theme tokens<br/>[tokens.ts]"]
end

subgraph group_app["App experience"]
  node_root["Root navigation<br/>[RootNavigator.tsx]"]
  node_tabs["Tab navigation<br/>[TabNavigator.tsx]"]
end

node_walker(("Walker"))

node_walker -->|"plans route"| node_map
node_map -->|"requests routes"| node_routing
node_routing -->|"uses fallback"| node_directions
node_routing -->|"uses primary"| node_accessible
node_map -->|"screens routes"| node_barriers
node_map -->|"applies pace"| node_mobility
node_accessible -->|"requests routes"| node_osm
node_directions -->|"requests places and fallback"| node_google
node_map -->|"uses geometry"| node_geo
node_root -->|"shows tabs"| node_tabs
node_root -->|"opens navigation"| node_ar
node_root -->|"opens preview"| node_preview
node_map -->|"enters selected route"| node_root
node_ar -->|"renders AR view"| node_arbridge
node_arbridge -->|"bridges to scene"| node_nativear
node_preview -->|"renders preview scene"| node_arbridge
node_ar -->|"processes camera hazards"| node_hazardservice
node_hazardscreen -->|"processes camera hazards"| node_hazardservice
node_hazardservice -->|"subscribes to native detections"| node_arbridge
node_nativear -->|"uses detector"| node_nativehazard
node_hazardservice -->|"uses hazard types"| node_hazardtypes
node_ar -->|"requests turn and hazard cues"| node_voice
node_hazardscreen -->|"requests hazard cues"| node_voice
node_voice -->|"speaks cues"| node_speech
node_settings -->|"updates preferences"| node_preferences
node_preferences -->|"resolves theme and scale"| node_tokens
node_map -->|"screens alternatives"| node_accessible
node_map -->|"uses route data"| node_route_types
node_accessible -->|"selects restrictions"| node_mobility
node_barriers -->|"checks barrier data"| node_osm

click node_map "https://github.com/felixysw/accessible-navigation/blob/main/src/screens/MapScreen.tsx"
click node_routing "https://github.com/felixysw/accessible-navigation/blob/main/src/services/routing.ts"
click node_directions "https://github.com/felixysw/accessible-navigation/blob/main/src/services/directions.ts"
click node_accessible "https://github.com/felixysw/accessible-navigation/blob/main/src/services/accessibleRouting.ts"
click node_barriers "https://github.com/felixysw/accessible-navigation/blob/main/src/services/accessibility.ts"
click node_mobility "https://github.com/felixysw/accessible-navigation/blob/main/src/services/mobility.ts"
click node_root "https://github.com/felixysw/accessible-navigation/blob/main/src/navigation/RootNavigator.tsx"
click node_tabs "https://github.com/felixysw/accessible-navigation/blob/main/src/navigation/TabNavigator.tsx"
click node_ar "https://github.com/felixysw/accessible-navigation/blob/main/src/screens/ARNavigationScreen.tsx"
click node_nativear "https://github.com/felixysw/accessible-navigation/blob/main/modules/ar-geospatial/ios/ARGeospatialView.swift"
click node_arbridge "https://github.com/felixysw/accessible-navigation/blob/main/modules/ar-geospatial/index.tsx"
click node_preview "https://github.com/felixysw/accessible-navigation/blob/main/src/screens/ARPreviewScreen.tsx"
click node_hazardscreen "https://github.com/felixysw/accessible-navigation/blob/main/src/screens/HazardDetectionScreen.tsx"
click node_hazardservice "https://github.com/felixysw/accessible-navigation/blob/main/src/services/hazardDetector.ts"
click node_nativehazard "https://github.com/felixysw/accessible-navigation/blob/main/modules/ar-geospatial/ios/HazardDetector.swift"
click node_hazardtypes "https://github.com/felixysw/accessible-navigation/blob/main/src/types/hazard.ts"
click node_voice "https://github.com/felixysw/accessible-navigation/blob/main/src/services/voiceCues.ts"
click node_speech "https://github.com/felixysw/accessible-navigation/blob/main/src/services/speech.ts"
click node_settings "https://github.com/felixysw/accessible-navigation/blob/main/src/screens/SettingsScreen.tsx"
click node_preferences "https://github.com/felixysw/accessible-navigation/blob/main/src/theme/SettingsContext.tsx"
click node_tokens "https://github.com/felixysw/accessible-navigation/blob/main/src/theme/tokens.ts"
click node_route_types "https://github.com/felixysw/accessible-navigation/blob/main/src/types/route.ts"
click node_geo "https://github.com/felixysw/accessible-navigation/blob/main/src/utils/geo.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_map,node_routing,node_directions,node_accessible,node_barriers,node_mobility,node_osm,node_google,node_route_types,node_geo toneBlue
class node_ar,node_nativear,node_arbridge,node_preview toneAmber
class node_hazardscreen,node_hazardservice,node_nativehazard,node_hazardtypes toneMint
class node_voice,node_speech,node_settings,node_preferences,node_tokens toneRose
class node_root,node_tabs,node_walker toneIndigo
```

## Components

### Route planning

- [Route map](https://github.com/felixysw/accessible-navigation/blob/main/src/screens/MapScreen.tsx): `src/screens/MapScreen.tsx`
- [Route orchestration](https://github.com/felixysw/accessible-navigation/blob/main/src/services/routing.ts): `src/services/routing.ts`
- [Place and directions](https://github.com/felixysw/accessible-navigation/blob/main/src/services/directions.ts): `src/services/directions.ts`
- [Accessible router](https://github.com/felixysw/accessible-navigation/blob/main/src/services/accessibleRouting.ts): `src/services/accessibleRouting.ts`
- [Barrier screening](https://github.com/felixysw/accessible-navigation/blob/main/src/services/accessibility.ts): `src/services/accessibility.ts`
- [Mobility pace](https://github.com/felixysw/accessible-navigation/blob/main/src/services/mobility.ts): `src/services/mobility.ts`
- **OpenStreetMap services**
- **Google services**
- [Route domain types](https://github.com/felixysw/accessible-navigation/blob/main/src/types/route.ts): `src/types/route.ts`
- [Route geometry](https://github.com/felixysw/accessible-navigation/blob/main/src/utils/geo.ts): `src/utils/geo.ts`

### AR guidance

- [AR navigation screen](https://github.com/felixysw/accessible-navigation/blob/main/src/screens/ARNavigationScreen.tsx): `src/screens/ARNavigationScreen.tsx`
- [Geospatial AR scene](https://github.com/felixysw/accessible-navigation/blob/main/modules/ar-geospatial/ios/ARGeospatialView.swift): `modules/ar-geospatial/ios/ARGeospatialView.swift`
- [AR native bridge](https://github.com/felixysw/accessible-navigation/blob/main/modules/ar-geospatial/index.tsx): `modules/ar-geospatial/index.tsx`
- [AR preview](https://github.com/felixysw/accessible-navigation/blob/main/src/screens/ARPreviewScreen.tsx): `src/screens/ARPreviewScreen.tsx`

### Hazard detection

- [Hazard camera screen](https://github.com/felixysw/accessible-navigation/blob/main/src/screens/HazardDetectionScreen.tsx): `src/screens/HazardDetectionScreen.tsx`
- [Hazard detector service](https://github.com/felixysw/accessible-navigation/blob/main/src/services/hazardDetector.ts): `src/services/hazardDetector.ts`
- [On-device detector](https://github.com/felixysw/accessible-navigation/blob/main/modules/ar-geospatial/ios/HazardDetector.swift): `modules/ar-geospatial/ios/HazardDetector.swift`
- [Hazard domain types](https://github.com/felixysw/accessible-navigation/blob/main/src/types/hazard.ts): `src/types/hazard.ts`

### Accessibility

- [Voice cues](https://github.com/felixysw/accessible-navigation/blob/main/src/services/voiceCues.ts): `src/services/voiceCues.ts`
- [Speech output](https://github.com/felixysw/accessible-navigation/blob/main/src/services/speech.ts): `src/services/speech.ts`
- [Settings screen](https://github.com/felixysw/accessible-navigation/blob/main/src/screens/SettingsScreen.tsx): `src/screens/SettingsScreen.tsx`
- [Preferences](https://github.com/felixysw/accessible-navigation/blob/main/src/theme/SettingsContext.tsx): `src/theme/SettingsContext.tsx`
- [Theme tokens](https://github.com/felixysw/accessible-navigation/blob/main/src/theme/tokens.ts): `src/theme/tokens.ts`

### App experience

- [Root navigation](https://github.com/felixysw/accessible-navigation/blob/main/src/navigation/RootNavigator.tsx): `src/navigation/RootNavigator.tsx`
- [Tab navigation](https://github.com/felixysw/accessible-navigation/blob/main/src/navigation/TabNavigator.tsx): `src/navigation/TabNavigator.tsx`

### Other components

- **Walker**

## Connections

- Walker → Route map: plans route
- Route map → Route orchestration: requests routes (evidence: `src/screens/MapScreen.tsx`)
- Route orchestration → Place and directions: uses fallback (evidence: `src/services/routing.ts`)
- Route orchestration → Accessible router: uses primary (evidence: `src/services/routing.ts`)
- Route map → Barrier screening: screens routes (evidence: `src/screens/MapScreen.tsx`)
- Route map → Mobility pace: applies pace (evidence: `src/screens/MapScreen.tsx`)
- Accessible router → OpenStreetMap services: requests routes
- Place and directions → Google services: requests places and fallback
- Route map → Route geometry: uses geometry (evidence: `src/screens/MapScreen.tsx`)
- Root navigation → Tab navigation: shows tabs (evidence: `src/navigation/RootNavigator.tsx`)
- Root navigation → AR navigation screen: opens navigation (evidence: `src/navigation/RootNavigator.tsx`)
- Root navigation → AR preview: opens preview (evidence: `src/navigation/RootNavigator.tsx`)
- Route map → Root navigation: enters selected route (evidence: `src/screens/MapScreen.tsx`)
- AR navigation screen → AR native bridge: renders AR view (evidence: `src/screens/ARNavigationScreen.tsx`)
- AR native bridge → Geospatial AR scene: bridges to scene (evidence: `modules/ar-geospatial/index.tsx`)
- AR preview → AR native bridge: renders preview scene (evidence: `src/screens/ARPreviewScreen.tsx`)
- AR navigation screen → Hazard detector service: processes camera hazards (evidence: `src/screens/ARNavigationScreen.tsx`)
- Hazard camera screen → Hazard detector service: processes camera hazards (evidence: `src/screens/HazardDetectionScreen.tsx`)
- Hazard detector service → AR native bridge: subscribes to native detections (evidence: `src/services/hazardDetector.ts`)
- Geospatial AR scene → On-device detector: uses detector (evidence: `modules/ar-geospatial/ios/ARGeospatialView.swift`)
- Hazard detector service → Hazard domain types: uses hazard types (evidence: `src/services/hazardDetector.ts`)
- AR navigation screen → Voice cues: requests turn and hazard cues (evidence: `src/screens/ARNavigationScreen.tsx`)
- Hazard camera screen → Voice cues: requests hazard cues (evidence: `src/screens/HazardDetectionScreen.tsx`)
- Voice cues → Speech output: speaks cues (evidence: `src/services/voiceCues.ts`)
- Settings screen → Preferences: updates preferences (evidence: `src/screens/SettingsScreen.tsx`)
- Preferences → Theme tokens: resolves theme and scale (evidence: `src/theme/SettingsContext.tsx`)
- Route map → Accessible router: screens alternatives (evidence: `src/screens/MapScreen.tsx`)
- Route map → Route domain types: uses route data (evidence: `src/screens/MapScreen.tsx`)
- Accessible router → Mobility pace: selects restrictions (evidence: `src/services/accessibleRouting.ts`)
- Barrier screening → OpenStreetMap services: checks barrier data
