# akash-xcoder/iris architecture

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

- Interactive diagram: https://gitdiagram.com/akash-xcoder/iris
- Repository: https://github.com/akash-xcoder/iris

## Overview

yooolo is a browser-based vision and accessibility app: camera or image frames are analyzed locally for objects and walls, then surfaced as overlays and readouts. The source also contains indoor room guidance, route teaching/following, outdoor turn-by-turn navigation, and fall alerts. The graph preserves those distinct user-facing stages alongside the documented YOLO inference engine. Some connections rely on README statements or module references because the relevant source was not excerpted; uncertain links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/akash-xcoder/iris/blob/main/src/App.tsx) (App shell), [`src/home/HomeGuide.tsx`](https://github.com/akash-xcoder/iris/blob/main/src/home/HomeGuide.tsx) (Home guide), [`src/Viewport.tsx`](https://github.com/akash-xcoder/iris/blob/main/src/Viewport.tsx) (Camera viewport), [`src/safety/FallAlert.tsx`](https://github.com/akash-xcoder/iris/blob/main/src/safety/FallAlert.tsx) (Fall alert)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and vision"]
  node_app["App shell<br/>[App.tsx]"]
  node_viewport["Camera viewport<br/>[Viewport.tsx]"]
  node_torch["Auto torch<br/>[torch.ts]"]
end

subgraph group_vision["YOLO inference"]
  node_overlay["Detection overlays<br/>[draw.ts]"]
  node_model["Model runner<br/>[model.ts]"]
  node_worker["Inference worker<br/>[worker.ts]"]
  node_fetch["Model fetch<br/>[fetchModel.ts]"]
  node_decode["Output decoding<br/>[postprocess.ts]"]
  node_manifest["Model manifest<br/>[manifest.json]"]
  node_weights["ONNX weights<br/>[yolo26n.onnx]"]
  node_wallweights["Wall model"]
end

subgraph group_home["Indoor guidance"]
  node_guide["Home guide<br/>[HomeGuide.tsx]"]
  node_rooms["Room recognition<br/>[rooms.ts]"]
  node_pdr["Step tracking<br/>[pdr.ts]"]
  node_homeroutes[("Saved home routes<br/>[routes.ts]")]
end

subgraph group_navigation["Navigation"]
  node_navigation["Trip navigation<br/>[Navigation.tsx]"]
  node_routing["Route planning<br/>[route.ts]"]
  node_hazards["Hazard detection<br/>[hazards.ts]"]
  node_voice["Speech interface<br/>[voice.ts]"]
  node_voice_reply["Voice reply hook<br/>[useVoiceReply.ts]"]
end

subgraph group_safety["Fall safety"]
  node_fallwatch["Fall monitoring<br/>[fall.ts]"]
  node_fallalert["Fall alert<br/>[FallAlert.tsx]"]
  node_settings["Family settings<br/>[FamilySettings.tsx]"]
  node_contacts[("Emergency contacts<br/>[contacts.ts]")]
end

node_user(("User"))
node_routes_api["Google Routes API"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_viewport
node_viewport -->|"runs frames"| node_model
node_viewport -->|"starts"| node_torch
node_viewport -->|"draws results"| node_overlay
node_app -->|"reads coverage"| node_overlay
node_app -.->|"loads models"| node_manifest
node_manifest -.->|"lists model"| node_weights
node_manifest -.->|"lists model"| node_wallweights
node_model -.->|"runs in"| node_worker
node_worker -->|"fetches weights"| node_fetch
node_worker -->|"decodes output"| node_decode
node_app -->|"renders"| node_guide
node_guide -->|"recognizes rooms"| node_rooms
node_guide -->|"tracks walking"| node_pdr
node_guide -->|"loads and saves"| node_homeroutes
node_guide -->|"announces hazards"| node_hazards
node_guide -->|"listens for replies"| node_voice_reply
node_voice_reply -->|"listens through"| node_voice
node_app -->|"renders"| node_navigation
node_navigation -.->|"plans trips"| node_routing
node_routing -->|"requests route"| node_routes_api
node_app -->|"starts monitoring"| node_fallwatch
node_app -->|"shows alert"| node_fallalert
node_app -->|"renders"| node_settings
node_fallalert -->|"listens for response"| node_voice_reply
node_fallalert -->|"speaks prompts"| node_voice
node_fallalert -->|"loads recipients"| node_contacts
node_settings -->|"manages contacts"| node_contacts

click node_app "https://github.com/akash-xcoder/iris/blob/main/src/App.tsx"
click node_viewport "https://github.com/akash-xcoder/iris/blob/main/src/Viewport.tsx"
click node_torch "https://github.com/akash-xcoder/iris/blob/main/src/camera/torch.ts"
click node_overlay "https://github.com/akash-xcoder/iris/blob/main/src/yolo/draw.ts"
click node_model "https://github.com/akash-xcoder/iris/blob/main/src/yolo/model.ts"
click node_worker "https://github.com/akash-xcoder/iris/blob/main/src/yolo/worker.ts"
click node_fetch "https://github.com/akash-xcoder/iris/blob/main/src/yolo/fetchModel.ts"
click node_decode "https://github.com/akash-xcoder/iris/blob/main/src/yolo/postprocess.ts"
click node_manifest "https://github.com/akash-xcoder/iris/blob/main/public/models/manifest.json"
click node_weights "https://github.com/akash-xcoder/iris/blob/main/public/models/yolo26n.onnx"
click node_wallweights "https://github.com/akash-xcoder/iris/blob/main/public/models/yolo26n-sem-ade20k.onnx"
click node_guide "https://github.com/akash-xcoder/iris/blob/main/src/home/HomeGuide.tsx"
click node_rooms "https://github.com/akash-xcoder/iris/blob/main/src/home/rooms.ts"
click node_pdr "https://github.com/akash-xcoder/iris/blob/main/src/home/pdr.ts"
click node_homeroutes "https://github.com/akash-xcoder/iris/blob/main/src/home/routes.ts"
click node_navigation "https://github.com/akash-xcoder/iris/blob/main/src/navigation/Navigation.tsx"
click node_routing "https://github.com/akash-xcoder/iris/blob/main/src/navigation/route.ts"
click node_hazards "https://github.com/akash-xcoder/iris/blob/main/src/navigation/hazards.ts"
click node_voice "https://github.com/akash-xcoder/iris/blob/main/src/navigation/voice.ts"
click node_voice_reply "https://github.com/akash-xcoder/iris/blob/main/src/navigation/useVoiceReply.ts"
click node_fallwatch "https://github.com/akash-xcoder/iris/blob/main/src/safety/fall.ts"
click node_fallalert "https://github.com/akash-xcoder/iris/blob/main/src/safety/FallAlert.tsx"
click node_settings "https://github.com/akash-xcoder/iris/blob/main/src/safety/FamilySettings.tsx"
click node_contacts "https://github.com/akash-xcoder/iris/blob/main/src/safety/contacts.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_app,node_viewport,node_torch,node_user toneBlue
class node_overlay,node_model,node_worker,node_fetch,node_decode,node_manifest,node_weights,node_wallweights toneAmber
class node_guide,node_rooms,node_pdr,node_homeroutes,node_routes_api toneMint
class node_navigation,node_routing,node_hazards,node_voice,node_voice_reply toneRose
class node_fallwatch,node_fallalert,node_settings,node_contacts toneIndigo
```

## Components

### App and vision

- [App shell](https://github.com/akash-xcoder/iris/blob/main/src/App.tsx): `src/App.tsx`
- [Camera viewport](https://github.com/akash-xcoder/iris/blob/main/src/Viewport.tsx): `src/Viewport.tsx`
- [Auto torch](https://github.com/akash-xcoder/iris/blob/main/src/camera/torch.ts): `src/camera/torch.ts`

### YOLO inference

- [Detection overlays](https://github.com/akash-xcoder/iris/blob/main/src/yolo/draw.ts): `src/yolo/draw.ts`
- [Model runner](https://github.com/akash-xcoder/iris/blob/main/src/yolo/model.ts): `src/yolo/model.ts`
- [Inference worker](https://github.com/akash-xcoder/iris/blob/main/src/yolo/worker.ts): `src/yolo/worker.ts`
- [Model fetch](https://github.com/akash-xcoder/iris/blob/main/src/yolo/fetchModel.ts): `src/yolo/fetchModel.ts`
- [Output decoding](https://github.com/akash-xcoder/iris/blob/main/src/yolo/postprocess.ts): `src/yolo/postprocess.ts`
- [Model manifest](https://github.com/akash-xcoder/iris/blob/main/public/models/manifest.json): `public/models/manifest.json`
- [ONNX weights](https://github.com/akash-xcoder/iris/blob/main/public/models/yolo26n.onnx): `public/models/yolo26n.onnx`
- [Wall model](https://github.com/akash-xcoder/iris/blob/main/public/models/yolo26n-sem-ade20k.onnx): `public/models/yolo26n-sem-ade20k.onnx`

### Indoor guidance

- [Home guide](https://github.com/akash-xcoder/iris/blob/main/src/home/HomeGuide.tsx): `src/home/HomeGuide.tsx`
- [Room recognition](https://github.com/akash-xcoder/iris/blob/main/src/home/rooms.ts): `src/home/rooms.ts`
- [Step tracking](https://github.com/akash-xcoder/iris/blob/main/src/home/pdr.ts): `src/home/pdr.ts`
- [Saved home routes](https://github.com/akash-xcoder/iris/blob/main/src/home/routes.ts): `src/home/routes.ts`

### Navigation

- [Trip navigation](https://github.com/akash-xcoder/iris/blob/main/src/navigation/Navigation.tsx): `src/navigation/Navigation.tsx`
- [Route planning](https://github.com/akash-xcoder/iris/blob/main/src/navigation/route.ts): `src/navigation/route.ts`
- [Hazard detection](https://github.com/akash-xcoder/iris/blob/main/src/navigation/hazards.ts): `src/navigation/hazards.ts`
- [Speech interface](https://github.com/akash-xcoder/iris/blob/main/src/navigation/voice.ts): `src/navigation/voice.ts`
- [Voice reply hook](https://github.com/akash-xcoder/iris/blob/main/src/navigation/useVoiceReply.ts): `src/navigation/useVoiceReply.ts`

### Fall safety

- [Fall monitoring](https://github.com/akash-xcoder/iris/blob/main/src/safety/fall.ts): `src/safety/fall.ts`
- [Fall alert](https://github.com/akash-xcoder/iris/blob/main/src/safety/FallAlert.tsx): `src/safety/FallAlert.tsx`
- [Family settings](https://github.com/akash-xcoder/iris/blob/main/src/safety/FamilySettings.tsx): `src/safety/FamilySettings.tsx`
- [Emergency contacts](https://github.com/akash-xcoder/iris/blob/main/src/safety/contacts.ts): `src/safety/contacts.ts`

### Other components

- **User**
- **Google Routes API**

## Connections

- User → App shell: uses (evidence: `README.md`)
- App shell → Camera viewport: renders (evidence: `src/App.tsx`)
- Camera viewport → Model runner: runs frames (evidence: `README.md`)
- Camera viewport → Auto torch: starts (evidence: `src/Viewport.tsx`)
- Camera viewport → Detection overlays: draws results (evidence: `src/Viewport.tsx`)
- App shell → Detection overlays: reads coverage (evidence: `src/App.tsx`)
- App shell → Model manifest: loads models (evidence: `README.md`)
- Model manifest → ONNX weights: lists model
- Model manifest → Wall model: lists model
- Model runner → Inference worker: runs in (evidence: `README.md`)
- Inference worker → Model fetch: fetches weights (evidence: `src/yolo/worker.ts`)
- Inference worker → Output decoding: decodes output (evidence: `src/yolo/worker.ts`)
- App shell → Home guide: renders (evidence: `src/App.tsx`)
- Home guide → Room recognition: recognizes rooms (evidence: `src/home/HomeGuide.tsx`)
- Home guide → Step tracking: tracks walking (evidence: `src/home/HomeGuide.tsx`)
- Home guide → Saved home routes: loads and saves (evidence: `src/home/HomeGuide.tsx`)
- Home guide → Hazard detection: announces hazards (evidence: `src/home/HomeGuide.tsx`)
- Home guide → Voice reply hook: listens for replies (evidence: `src/home/HomeGuide.tsx`)
- Voice reply hook → Speech interface: listens through (evidence: `src/navigation/useVoiceReply.ts`)
- App shell → Trip navigation: renders (evidence: `src/App.tsx`)
- Trip navigation → Route planning: plans trips (evidence: `src/navigation/Navigation.tsx`)
- Route planning → Google Routes API: requests route (evidence: `src/navigation/route.ts`)
- App shell → Fall monitoring: starts monitoring (evidence: `src/App.tsx`)
- App shell → Fall alert: shows alert (evidence: `src/App.tsx`)
- App shell → Family settings: renders (evidence: `src/App.tsx`)
- Fall alert → Voice reply hook: listens for response (evidence: `src/safety/FallAlert.tsx`)
- Fall alert → Speech interface: speaks prompts (evidence: `src/safety/FallAlert.tsx`)
- Fall alert → Emergency contacts: loads recipients (evidence: `src/safety/FallAlert.tsx`)
- Family settings → Emergency contacts: manages contacts (evidence: `src/safety/FamilySettings.tsx`)
