# rosmnd/signhome architecture

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

- Interactive diagram: https://gitdiagram.com/rosmnd/signhome
- Repository: https://github.com/rosmnd/signhome

## Overview

SignHome is a local ASL home-automation interface. The main workflow is camera input → hand tracking and gesture classification → shared appliance state and command dispatch → optional Arduino serial control. The control center also exposes virtual appliance controls, calibration, and diagnostics; separate routes provide a gesture guide and language information. Edges follow shown imports/calls or README descriptions; unsampled UI details and integrations are not inferred.

Main entry points: [`src/components/control-center.tsx`](https://github.com/rosmnd/signhome/blob/main/src/components/control-center.tsx) (Control center), [`src/hooks/use-hand-tracker.ts`](https://github.com/rosmnd/signhome/blob/main/src/hooks/use-hand-tracker.ts) (Hand tracker), [`src/routeTree.gen.ts`](https://github.com/rosmnd/signhome/blob/main/src/routeTree.gen.ts) (Route tree), [`src/routes/guide.tsx`](https://github.com/rosmnd/signhome/blob/main/src/routes/guide.tsx) (Gesture guide)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and routes"]
  node_router["Router setup<br/>[router.tsx]"]
  node_routes["Route tree<br/>[routeTree.gen.ts]"]
  node_home_route["Home route<br/>[index.tsx]"]
  node_guide_route["Gesture guide<br/>[guide.tsx]"]
  node_languages_route["Language page<br/>[languages.tsx]"]
end

subgraph group_vision["Hand tracking"]
  node_camera_stage["Camera stage<br/>[camera-stage.tsx]"]
  node_tracker["Hand tracker"]
  node_landmarks["Landmark processing<br/>[landmarks.ts]"]
  node_classifier["Gesture classifier<br/>[classifier.ts]"]
  node_forest["Random Forest<br/>[random-forest.ts]"]
  node_hand_drawing["Hand drawing<br/>[draw-hands.ts]"]
  node_hand_skeleton["Hand skeleton<br/>[hand-skeleton.tsx]"]
  node_gesture_defs["Gesture definitions<br/>[gestures.ts]"]
  node_poses["Hand poses<br/>[hand-poses.ts]"]
  node_diagnostics["Hand diagnostics"]
end

subgraph group_controls["Appliance controls"]
  node_control_center["Control center<br/>[control-center.tsx]"]
  node_store["App state<br/>[store.ts]"]
  node_virtual_home["Virtual appliances<br/>[virtual-home.tsx]"]
  node_calibration["Calibration tools"]
end

subgraph group_hardware["Hardware and guides"]
  node_serial_panel["Serial panel"]
  node_serial["Serial transport<br/>[arduino-serial.ts]"]
  node_multiplayer["Peer connections<br/>[p2p.ts]"]
end

node_user(("User"))
node_browser_camera(("Browser camera"))
node_arduino["Arduino relay"]

node_user -->|"opens app"| node_router
node_router -->|"uses routes"| node_routes
node_routes -->|"registers"| node_home_route
node_routes -->|"registers"| node_guide_route
node_routes -->|"registers"| node_languages_route
node_home_route -->|"renders"| node_control_center
node_control_center -->|"renders"| node_camera_stage
node_control_center -->|"renders"| node_virtual_home
node_control_center -->|"renders"| node_serial_panel
node_control_center -->|"renders"| node_calibration
node_control_center -->|"renders"| node_diagnostics
node_camera_stage -->|"displays tracking"| node_tracker
node_browser_camera -->|"provides video"| node_tracker
node_tracker -->|"processes points"| node_landmarks
node_tracker -->|"classifies hand"| node_classifier
node_tracker -->|"paints hands"| node_hand_drawing
node_tracker -->|"updates state"| node_store
node_classifier -->|"predicts gesture"| node_forest
node_hand_drawing -->|"uses geometry"| node_landmarks
node_camera_stage -->|"renders"| node_hand_skeleton
node_camera_stage -->|"reads status"| node_store
node_virtual_home -->|"reads state"| node_store
node_store -->|"writes commands"| node_serial
node_serial_panel -->|"uses transport"| node_serial
node_serial -.->|"serial control"| node_arduino
node_guide_route -->|"shows commands"| node_gesture_defs
node_guide_route -->|"shows poses"| node_poses
node_guide_route -->|"renders examples"| node_hand_skeleton
node_user -.->|"optional peer use"| node_multiplayer

click node_router "https://github.com/rosmnd/signhome/blob/main/src/router.tsx"
click node_routes "https://github.com/rosmnd/signhome/blob/main/src/routeTree.gen.ts"
click node_home_route "https://github.com/rosmnd/signhome/blob/main/src/routes/index.tsx"
click node_guide_route "https://github.com/rosmnd/signhome/blob/main/src/routes/guide.tsx"
click node_languages_route "https://github.com/rosmnd/signhome/blob/main/src/routes/languages.tsx"
click node_control_center "https://github.com/rosmnd/signhome/blob/main/src/components/control-center.tsx"
click node_camera_stage "https://github.com/rosmnd/signhome/blob/main/src/components/camera-stage.tsx"
click node_tracker "https://github.com/rosmnd/signhome/blob/main/src/hooks/use-hand-tracker.ts"
click node_landmarks "https://github.com/rosmnd/signhome/blob/main/src/lib/landmarks.ts"
click node_classifier "https://github.com/rosmnd/signhome/blob/main/src/lib/classifier.ts"
click node_forest "https://github.com/rosmnd/signhome/blob/main/src/lib/random-forest.ts"
click node_hand_drawing "https://github.com/rosmnd/signhome/blob/main/src/lib/draw-hands.ts"
click node_hand_skeleton "https://github.com/rosmnd/signhome/blob/main/src/components/hand-skeleton.tsx"
click node_store "https://github.com/rosmnd/signhome/blob/main/src/lib/store.ts"
click node_virtual_home "https://github.com/rosmnd/signhome/blob/main/src/components/virtual-home.tsx"
click node_serial_panel "https://github.com/rosmnd/signhome/blob/main/src/components/arduino-serial-panel.tsx"
click node_serial "https://github.com/rosmnd/signhome/blob/main/src/lib/arduino-serial.ts"
click node_gesture_defs "https://github.com/rosmnd/signhome/blob/main/src/lib/gestures.ts"
click node_poses "https://github.com/rosmnd/signhome/blob/main/src/lib/hand-poses.ts"
click node_calibration "https://github.com/rosmnd/signhome/blob/main/src/components/calibrate-panel.tsx"
click node_diagnostics "https://github.com/rosmnd/signhome/blob/main/src/components/landmark-inspector.tsx"
click node_multiplayer "https://github.com/rosmnd/signhome/blob/main/src/lib/multiplayer/p2p.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_router,node_routes,node_home_route,node_guide_route,node_languages_route,node_user,node_browser_camera toneBlue
class node_camera_stage,node_tracker,node_landmarks,node_classifier,node_forest,node_hand_drawing,node_hand_skeleton,node_gesture_defs,node_poses,node_diagnostics toneAmber
class node_control_center,node_store,node_virtual_home,node_calibration toneMint
class node_serial_panel,node_serial,node_multiplayer toneRose
class node_arduino toneIndigo
```

## Components

### App and routes

- [Router setup](https://github.com/rosmnd/signhome/blob/main/src/router.tsx): `src/router.tsx`
- [Route tree](https://github.com/rosmnd/signhome/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`
- [Home route](https://github.com/rosmnd/signhome/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Gesture guide](https://github.com/rosmnd/signhome/blob/main/src/routes/guide.tsx): `src/routes/guide.tsx`
- [Language page](https://github.com/rosmnd/signhome/blob/main/src/routes/languages.tsx): `src/routes/languages.tsx`

### Hand tracking

- [Camera stage](https://github.com/rosmnd/signhome/blob/main/src/components/camera-stage.tsx): `src/components/camera-stage.tsx`
- [Hand tracker](https://github.com/rosmnd/signhome/blob/main/src/hooks/use-hand-tracker.ts): `src/hooks/use-hand-tracker.ts`
- [Landmark processing](https://github.com/rosmnd/signhome/blob/main/src/lib/landmarks.ts): `src/lib/landmarks.ts`
- [Gesture classifier](https://github.com/rosmnd/signhome/blob/main/src/lib/classifier.ts): `src/lib/classifier.ts`
- [Random Forest](https://github.com/rosmnd/signhome/blob/main/src/lib/random-forest.ts): `src/lib/random-forest.ts`
- [Hand drawing](https://github.com/rosmnd/signhome/blob/main/src/lib/draw-hands.ts): `src/lib/draw-hands.ts`
- [Hand skeleton](https://github.com/rosmnd/signhome/blob/main/src/components/hand-skeleton.tsx): `src/components/hand-skeleton.tsx`
- [Gesture definitions](https://github.com/rosmnd/signhome/blob/main/src/lib/gestures.ts): `src/lib/gestures.ts`
- [Hand poses](https://github.com/rosmnd/signhome/blob/main/src/lib/hand-poses.ts): `src/lib/hand-poses.ts`
- [Hand diagnostics](https://github.com/rosmnd/signhome/blob/main/src/components/landmark-inspector.tsx): `src/components/landmark-inspector.tsx`

### Appliance controls

- [Control center](https://github.com/rosmnd/signhome/blob/main/src/components/control-center.tsx): `src/components/control-center.tsx`
- [App state](https://github.com/rosmnd/signhome/blob/main/src/lib/store.ts): `src/lib/store.ts`
- [Virtual appliances](https://github.com/rosmnd/signhome/blob/main/src/components/virtual-home.tsx): `src/components/virtual-home.tsx`
- [Calibration tools](https://github.com/rosmnd/signhome/blob/main/src/components/calibrate-panel.tsx): `src/components/calibrate-panel.tsx`

### Hardware and guides

- [Serial panel](https://github.com/rosmnd/signhome/blob/main/src/components/arduino-serial-panel.tsx): `src/components/arduino-serial-panel.tsx`
- [Serial transport](https://github.com/rosmnd/signhome/blob/main/src/lib/arduino-serial.ts): `src/lib/arduino-serial.ts`
- [Peer connections](https://github.com/rosmnd/signhome/blob/main/src/lib/multiplayer/p2p.ts): `src/lib/multiplayer/p2p.ts`

### Other components

- **User**
- **Browser camera**
- **Arduino relay**

## Connections

- User → Router setup: opens app (evidence: `src/router.tsx`)
- Router setup → Route tree: uses routes (evidence: `src/router.tsx`)
- Route tree → Home route: registers (evidence: `src/routeTree.gen.ts`)
- Route tree → Gesture guide: registers (evidence: `src/routeTree.gen.ts`)
- Route tree → Language page: registers (evidence: `src/routeTree.gen.ts`)
- Home route → Control center: renders (evidence: `src/routes/index.tsx`)
- Control center → Camera stage: renders (evidence: `src/components/control-center.tsx`)
- Control center → Virtual appliances: renders (evidence: `src/components/control-center.tsx`)
- Control center → Serial panel: renders (evidence: `src/components/control-center.tsx`)
- Control center → Calibration tools: renders (evidence: `src/components/control-center.tsx`)
- Control center → Hand diagnostics: renders (evidence: `src/components/control-center.tsx`)
- Camera stage → Hand tracker: displays tracking (evidence: `src/components/control-center.tsx`)
- Browser camera → Hand tracker: provides video (evidence: `src/hooks/use-hand-tracker.ts`)
- Hand tracker → Landmark processing: processes points (evidence: `src/hooks/use-hand-tracker.ts`)
- Hand tracker → Gesture classifier: classifies hand (evidence: `src/hooks/use-hand-tracker.ts`)
- Hand tracker → Hand drawing: paints hands (evidence: `src/hooks/use-hand-tracker.ts`)
- Hand tracker → App state: updates state (evidence: `src/hooks/use-hand-tracker.ts`)
- Gesture classifier → Random Forest: predicts gesture (evidence: `src/lib/classifier.ts`)
- Hand drawing → Landmark processing: uses geometry (evidence: `src/lib/draw-hands.ts`)
- Camera stage → Hand skeleton: renders (evidence: `src/components/camera-stage.tsx`)
- Camera stage → App state: reads status (evidence: `src/components/camera-stage.tsx`)
- Virtual appliances → App state: reads state (evidence: `src/components/virtual-home.tsx`)
- App state → Serial transport: writes commands (evidence: `src/lib/store.ts`)
- Serial panel → Serial transport: uses transport (evidence: `src/components/arduino-serial-panel.tsx`)
- Serial transport → Arduino relay: serial control (evidence: `README.md`)
- Gesture guide → Gesture definitions: shows commands (evidence: `src/routes/guide.tsx`)
- Gesture guide → Hand poses: shows poses (evidence: `src/routes/guide.tsx`)
- Gesture guide → Hand skeleton: renders examples (evidence: `src/routes/guide.tsx`)
- User → Peer connections: optional peer use
