# srideviir/hastavani architecture

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

- Interactive diagram: https://gitdiagram.com/srideviir/hastavani
- Repository: https://github.com/srideviir/hastavani

## Overview

HastaVani is a browser-based accessibility communication app. Its main workflow is a conversation workspace that accepts camera gestures, speech, or typed/visual selections, then presents confirmed messages and can speak them aloud; the reverse direction matches speech or text to ISL video clips and visual fallbacks. The README documents the product capabilities; sampled source and the SOURCE INDEX support the module map, but excerpts do not expose every runtime call, so undocumented connections are omitted.

Main entry points: [`src/components/ConversationWorkspace.tsx`](https://github.com/srideviir/hastavani/blob/main/src/components/ConversationWorkspace.tsx) (Conversation workspace), [`src/App.tsx`](https://github.com/srideviir/hastavani/blob/main/src/App.tsx) (App navigation), [`src/utils/speechService.ts`](https://github.com/srideviir/hastavani/blob/main/src/utils/speechService.ts) (Speech services), [`src/components/QuickCommunicationView.tsx`](https://github.com/srideviir/hastavani/blob/main/src/components/QuickCommunicationView.tsx) (Quick communication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_app["App navigation<br/>[App.tsx]"]
  node_header["Header<br/>[Header.tsx]"]
  node_landing["Landing and commands<br/>[LandingPage.tsx]"]
  node_settings["Accessibility settings"]
end

subgraph group_conversation["Conversation Modes"]
  node_workspace["Conversation workspace"]
  node_quick["Quick communication"]
  node_illustrations["Visual illustrations<br/>[Illustrations.tsx]"]
  node_responses["Clinical responses<br/>[visualResponses.ts]"]
  node_cards["Quick cards<br/>[quickCards.ts]"]
end

subgraph group_isl["ISL Resources"]
  node_translation["ISL translation panel"]
  node_library["Sign library"]
  node_dictionary["ISL dictionary<br/>[islDictionary.ts]"]
  node_videos["Sign video registry"]
end

subgraph group_logic["Recognition and Speech"]
  node_types["Communication types<br/>[communication.ts]"]
  node_gesture["Gesture classifier"]
  node_features["Holistic features"]
  node_intent["Intent matching<br/>[intentMatcher.ts]"]
  node_bidirectional["Concept matching"]
  node_translator["ISL text matching"]
  node_onnx["Optional ONNX inference<br/>[islOnnxModel.ts]"]
  node_speech["Speech services<br/>[speechService.ts]"]
  node_preferences[("Saved preferences<br/>[preferences.ts]")]
  node_gestures["Gesture vocabulary<br/>[gestures.ts]"]
  node_concepts["Visual concepts<br/>[visualConcepts.ts]"]
end

node_user(("Communicating people"))
node_camera(("Camera"))
node_mic(("Microphone"))
node_speaker(("Device speaker"))

node_user -->|"opens"| node_app
node_app -->|"shows"| node_landing
node_app -->|"shows"| node_workspace
node_app -->|"shows"| node_quick
node_app -->|"shows"| node_library
node_app -->|"shows"| node_settings
node_app -->|"renders"| node_header
node_app -->|"loads and saves"| node_preferences
node_camera -->|"provides frames"| node_workspace
node_mic -->|"provides speech"| node_workspace
node_workspace -->|"extracts landmarks"| node_features
node_features -->|"classifies hands"| node_gesture
node_workspace -->|"uses speech services"| node_speech
node_workspace -->|"matches commands"| node_intent
node_intent -->|"reads response sets"| node_responses
node_workspace -->|"requests inference"| node_onnx
node_workspace -->|"uses gesture data"| node_gestures
node_workspace -->|"uses quick cards"| node_cards
node_workspace -->|"renders visuals"| node_illustrations
node_quick -->|"shows cards"| node_cards
node_quick -->|"renders visuals"| node_illustrations
node_quick -->|"uses speech services"| node_speech
node_workspace -->|"renders translation"| node_translation
node_translation -->|"reads video registry"| node_videos
node_workspace -->|"matches text"| node_translator
node_translator -->|"matches sign clips"| node_videos
node_workspace -->|"matches concepts"| node_bidirectional
node_bidirectional -->|"reads concepts"| node_concepts
node_library -->|"reads entries"| node_dictionary
node_library -->|"renders visuals"| node_illustrations
node_library -->|"uses speech services"| node_speech
node_speech -->|"speaks messages"| node_speaker
node_settings -->|"configures speech"| node_speech
node_settings -->|"uses visual options"| node_responses

click node_app "https://github.com/srideviir/hastavani/blob/main/src/App.tsx"
click node_header "https://github.com/srideviir/hastavani/blob/main/src/components/Header.tsx"
click node_landing "https://github.com/srideviir/hastavani/blob/main/src/components/LandingPage.tsx"
click node_settings "https://github.com/srideviir/hastavani/blob/main/src/components/AccessibilitySettingsView.tsx"
click node_workspace "https://github.com/srideviir/hastavani/blob/main/src/components/ConversationWorkspace.tsx"
click node_quick "https://github.com/srideviir/hastavani/blob/main/src/components/QuickCommunicationView.tsx"
click node_illustrations "https://github.com/srideviir/hastavani/blob/main/src/components/Illustrations.tsx"
click node_responses "https://github.com/srideviir/hastavani/blob/main/src/data/visualResponses.ts"
click node_cards "https://github.com/srideviir/hastavani/blob/main/src/data/quickCards.ts"
click node_translation "https://github.com/srideviir/hastavani/blob/main/src/components/IslTranslationPanel.tsx"
click node_library "https://github.com/srideviir/hastavani/blob/main/src/components/SignLibraryView.tsx"
click node_dictionary "https://github.com/srideviir/hastavani/blob/main/src/data/islDictionary.ts"
click node_videos "https://github.com/srideviir/hastavani/blob/main/src/data/islVideoRegistry.ts"
click node_types "https://github.com/srideviir/hastavani/blob/main/src/types/communication.ts"
click node_gesture "https://github.com/srideviir/hastavani/blob/main/src/utils/gestureClassifier.ts"
click node_features "https://github.com/srideviir/hastavani/blob/main/src/utils/islFeatureExtractor.ts"
click node_intent "https://github.com/srideviir/hastavani/blob/main/src/utils/intentMatcher.ts"
click node_bidirectional "https://github.com/srideviir/hastavani/blob/main/src/utils/bidirectionalMatcher.ts"
click node_translator "https://github.com/srideviir/hastavani/blob/main/src/utils/islTextTranslator.ts"
click node_onnx "https://github.com/srideviir/hastavani/blob/main/src/utils/islOnnxModel.ts"
click node_speech "https://github.com/srideviir/hastavani/blob/main/src/utils/speechService.ts"
click node_preferences "https://github.com/srideviir/hastavani/blob/main/src/utils/preferences.ts"
click node_gestures "https://github.com/srideviir/hastavani/blob/main/src/data/gestures.ts"
click node_concepts "https://github.com/srideviir/hastavani/blob/main/src/data/visualConcepts.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_header,node_landing,node_settings toneBlue
class node_workspace,node_quick,node_illustrations,node_responses,node_cards toneAmber
class node_translation,node_library,node_dictionary,node_videos toneMint
class node_types,node_gesture,node_features,node_intent,node_bidirectional,node_translator,node_onnx,node_speech,node_preferences,node_gestures,node_concepts toneRose
class node_user,node_camera,node_mic,node_speaker toneIndigo
```

## Components

### App Shell

- [App navigation](https://github.com/srideviir/hastavani/blob/main/src/App.tsx): `src/App.tsx`
- [Header](https://github.com/srideviir/hastavani/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Landing and commands](https://github.com/srideviir/hastavani/blob/main/src/components/LandingPage.tsx): `src/components/LandingPage.tsx`
- [Accessibility settings](https://github.com/srideviir/hastavani/blob/main/src/components/AccessibilitySettingsView.tsx): `src/components/AccessibilitySettingsView.tsx`

### Conversation Modes

- [Conversation workspace](https://github.com/srideviir/hastavani/blob/main/src/components/ConversationWorkspace.tsx): `src/components/ConversationWorkspace.tsx`
- [Quick communication](https://github.com/srideviir/hastavani/blob/main/src/components/QuickCommunicationView.tsx): `src/components/QuickCommunicationView.tsx`
- [Visual illustrations](https://github.com/srideviir/hastavani/blob/main/src/components/Illustrations.tsx): `src/components/Illustrations.tsx`
- [Clinical responses](https://github.com/srideviir/hastavani/blob/main/src/data/visualResponses.ts): `src/data/visualResponses.ts`
- [Quick cards](https://github.com/srideviir/hastavani/blob/main/src/data/quickCards.ts): `src/data/quickCards.ts`

### ISL Resources

- [ISL translation panel](https://github.com/srideviir/hastavani/blob/main/src/components/IslTranslationPanel.tsx): `src/components/IslTranslationPanel.tsx`
- [Sign library](https://github.com/srideviir/hastavani/blob/main/src/components/SignLibraryView.tsx): `src/components/SignLibraryView.tsx`
- [ISL dictionary](https://github.com/srideviir/hastavani/blob/main/src/data/islDictionary.ts): `src/data/islDictionary.ts`
- [Sign video registry](https://github.com/srideviir/hastavani/blob/main/src/data/islVideoRegistry.ts): `src/data/islVideoRegistry.ts`

### Recognition and Speech

- [Communication types](https://github.com/srideviir/hastavani/blob/main/src/types/communication.ts): `src/types/communication.ts`
- [Gesture classifier](https://github.com/srideviir/hastavani/blob/main/src/utils/gestureClassifier.ts): `src/utils/gestureClassifier.ts`
- [Holistic features](https://github.com/srideviir/hastavani/blob/main/src/utils/islFeatureExtractor.ts): `src/utils/islFeatureExtractor.ts`
- [Intent matching](https://github.com/srideviir/hastavani/blob/main/src/utils/intentMatcher.ts): `src/utils/intentMatcher.ts`
- [Concept matching](https://github.com/srideviir/hastavani/blob/main/src/utils/bidirectionalMatcher.ts): `src/utils/bidirectionalMatcher.ts`
- [ISL text matching](https://github.com/srideviir/hastavani/blob/main/src/utils/islTextTranslator.ts): `src/utils/islTextTranslator.ts`
- [Optional ONNX inference](https://github.com/srideviir/hastavani/blob/main/src/utils/islOnnxModel.ts): `src/utils/islOnnxModel.ts`
- [Speech services](https://github.com/srideviir/hastavani/blob/main/src/utils/speechService.ts): `src/utils/speechService.ts`
- [Saved preferences](https://github.com/srideviir/hastavani/blob/main/src/utils/preferences.ts): `src/utils/preferences.ts`
- [Gesture vocabulary](https://github.com/srideviir/hastavani/blob/main/src/data/gestures.ts): `src/data/gestures.ts`
- [Visual concepts](https://github.com/srideviir/hastavani/blob/main/src/data/visualConcepts.ts): `src/data/visualConcepts.ts`

### Other components

- **Communicating people**
- **Camera**
- **Microphone**
- **Device speaker**

## Connections

- Communicating people → App navigation: opens (evidence: `README.md`)
- App navigation → Landing and commands: shows (evidence: `src/App.tsx`)
- App navigation → Conversation workspace: shows (evidence: `src/App.tsx`)
- App navigation → Quick communication: shows (evidence: `src/App.tsx`)
- App navigation → Sign library: shows (evidence: `src/App.tsx`)
- App navigation → Accessibility settings: shows (evidence: `src/App.tsx`)
- App navigation → Header: renders (evidence: `src/App.tsx`)
- App navigation → Saved preferences: loads and saves (evidence: `src/App.tsx`)
- Camera → Conversation workspace: provides frames (evidence: `README.md`)
- Microphone → Conversation workspace: provides speech (evidence: `README.md`)
- Conversation workspace → Holistic features: extracts landmarks (evidence: `README.md`)
- Holistic features → Gesture classifier: classifies hands (evidence: `src/utils/islFeatureExtractor.ts`)
- Conversation workspace → Speech services: uses speech services (evidence: `src/components/ConversationWorkspace.tsx`)
- Conversation workspace → Intent matching: matches commands (evidence: `src/components/ConversationWorkspace.tsx`)
- Intent matching → Clinical responses: reads response sets (evidence: `src/utils/intentMatcher.ts`)
- Conversation workspace → Optional ONNX inference: requests inference (evidence: `src/components/ConversationWorkspace.tsx`)
- Conversation workspace → Gesture vocabulary: uses gesture data (evidence: `src/components/ConversationWorkspace.tsx`)
- Conversation workspace → Quick cards: uses quick cards (evidence: `src/components/ConversationWorkspace.tsx`)
- Conversation workspace → Visual illustrations: renders visuals (evidence: `src/components/ConversationWorkspace.tsx`)
- Quick communication → Quick cards: shows cards (evidence: `src/components/QuickCommunicationView.tsx`)
- Quick communication → Visual illustrations: renders visuals (evidence: `src/components/QuickCommunicationView.tsx`)
- Quick communication → Speech services: uses speech services (evidence: `src/components/QuickCommunicationView.tsx`)
- Conversation workspace → ISL translation panel: renders translation (evidence: `src/components/ConversationWorkspace.tsx`)
- ISL translation panel → Sign video registry: reads video registry (evidence: `src/components/IslTranslationPanel.tsx`)
- Conversation workspace → ISL text matching: matches text (evidence: `src/components/ConversationWorkspace.tsx`)
- ISL text matching → Sign video registry: matches sign clips (evidence: `src/utils/islTextTranslator.ts`)
- Conversation workspace → Concept matching: matches concepts (evidence: `src/components/ConversationWorkspace.tsx`)
- Concept matching → Visual concepts: reads concepts (evidence: `src/utils/bidirectionalMatcher.ts`)
- Sign library → ISL dictionary: reads entries (evidence: `src/components/SignLibraryView.tsx`)
- Sign library → Visual illustrations: renders visuals (evidence: `src/components/SignLibraryView.tsx`)
- Sign library → Speech services: uses speech services (evidence: `src/components/SignLibraryView.tsx`)
- Speech services → Device speaker: speaks messages (evidence: `README.md`)
- Accessibility settings → Speech services: configures speech (evidence: `src/components/AccessibilitySettingsView.tsx`)
- Accessibility settings → Clinical responses: uses visual options (evidence: `src/components/AccessibilitySettingsView.tsx`)
