# aayansh54/isl architecture

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

- Interactive diagram: https://gitdiagram.com/aayansh54/isl
- Repository: https://github.com/aayansh54/isl

## Overview

ISL Interpreter recognizes static Indian Sign Language signs from a browser camera, builds a sentence, and offers guided live testing and model results. In the main workflow, the browser tracks hand landmarks, sends them to the backend classifier, then smooths and gates predictions before the interpreter commits a held sign. Results include parity and live-test measurements; live-test records are persisted in SQLite. The README also documents a separate desktop webcam demo and model-training workflow. Edges reflect excerpts, SOURCE INDEX references, or README statements; links to unsampled implementation details are omitted.

Main entry points: [`frontend/src/components/Stage.tsx`](https://github.com/aayansh54/isl/blob/main/frontend/src/components/Stage.tsx) (Camera stage), [`frontend/src/lib/api.ts`](https://github.com/aayansh54/isl/blob/main/frontend/src/lib/api.ts) (API client), [`frontend/src/App.tsx`](https://github.com/aayansh54/isl/blob/main/frontend/src/App.tsx) (App shell), [`frontend/src/lib/engine.ts`](https://github.com/aayansh54/isl/blob/main/frontend/src/lib/engine.ts) (Frame engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser application"]
  node_app["App shell<br/>[App.tsx]"]
  node_interpreter["Interpreter screen<br/>[Interpreter.tsx]"]
  node_stage["Camera stage<br/>[Stage.tsx]"]
  node_camera["Camera access<br/>[useCamera.ts]"]
end

subgraph group_recognition["Recognition pipeline"]
  node_tracker["Hand tracker<br/>[tracker.ts]"]
  node_engine["Frame engine<br/>[engine.ts]"]
  node_gate["Confidence gate<br/>[gate.ts]"]
  node_features["Feature preprocessing<br/>[features.py]"]
  node_classifier["Classifier and parity<br/>[inference.py]"]
  node_model["Trained model assets"]
  node_landmarker["Landmarker model"]
end

subgraph group_service["Backend service"]
  node_api["API client<br/>[api.ts]"]
  node_backend["HTTP API<br/>[main.py]"]
end

subgraph group_evaluation["Testing and results"]
  node_test["Guided live test<br/>[Test.tsx]"]
  node_results["Model and results<br/>[Results.tsx]"]
  node_database[("Live-test SQLite<br/>[db.py]")]
end

subgraph group_training["Training workflow"]
  node_desktop["Desktop webcam demo<br/>[live_clean.py]"]
  node_training_features["Training features<br/>[features.py]"]
end

node_user(("Interpreter user"))
node_webcam(("User webcam"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_interpreter
node_app -->|"routes to"| node_test
node_app -->|"routes to"| node_results
node_interpreter -->|"renders"| node_stage
node_stage -->|"uses"| node_camera
node_stage -->|"loads"| node_tracker
node_stage -->|"configures"| node_gate
node_stage -->|"runs"| node_engine
node_webcam -->|"provides video"| node_camera
node_tracker -->|"uses"| node_landmarker
node_engine -->|"detects landmarks"| node_tracker
node_engine -->|"sends landmarks"| node_api
node_engine -.->|"gates predictions"| node_gate
node_api -->|"requests predictions"| node_backend
node_backend -->|"classifies"| node_classifier
node_classifier -->|"builds features"| node_features
node_classifier -->|"loads weights"| node_model
node_interpreter -->|"loads vocabulary"| node_api
node_test -->|"saves test"| node_api
node_results -->|"loads test data"| node_api
node_results -->|"displays parity"| node_classifier
node_backend -->|"reads and writes"| node_database
node_desktop -->|"uses preprocessing"| node_training_features
node_training_features -->|"matches preprocessing"| node_features

click node_app "https://github.com/aayansh54/isl/blob/main/frontend/src/App.tsx"
click node_interpreter "https://github.com/aayansh54/isl/blob/main/frontend/src/pages/Interpreter.tsx"
click node_stage "https://github.com/aayansh54/isl/blob/main/frontend/src/components/Stage.tsx"
click node_camera "https://github.com/aayansh54/isl/blob/main/frontend/src/lib/useCamera.ts"
click node_tracker "https://github.com/aayansh54/isl/blob/main/frontend/src/lib/tracker.ts"
click node_engine "https://github.com/aayansh54/isl/blob/main/frontend/src/lib/engine.ts"
click node_gate "https://github.com/aayansh54/isl/blob/main/frontend/src/lib/gate.ts"
click node_api "https://github.com/aayansh54/isl/blob/main/frontend/src/lib/api.ts"
click node_backend "https://github.com/aayansh54/isl/blob/main/backend/app/main.py"
click node_features "https://github.com/aayansh54/isl/blob/main/backend/app/features.py"
click node_classifier "https://github.com/aayansh54/isl/blob/main/backend/app/inference.py"
click node_model "https://github.com/aayansh54/isl/tree/main/model_aug"
click node_landmarker "https://github.com/aayansh54/isl/blob/main/model/hand_landmarker.task"
click node_test "https://github.com/aayansh54/isl/blob/main/frontend/src/pages/Test.tsx"
click node_results "https://github.com/aayansh54/isl/blob/main/frontend/src/pages/Results.tsx"
click node_database "https://github.com/aayansh54/isl/blob/main/backend/app/db.py"
click node_desktop "https://github.com/aayansh54/isl/blob/main/training/live_clean.py"
click node_training_features "https://github.com/aayansh54/isl/blob/main/training/features.py"

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_interpreter,node_stage,node_camera,node_user,node_webcam toneBlue
class node_tracker,node_engine,node_gate,node_features,node_classifier,node_model,node_landmarker toneAmber
class node_api,node_backend toneMint
class node_test,node_results,node_database toneRose
class node_desktop,node_training_features toneIndigo
```

## Components

### Browser application

- [App shell](https://github.com/aayansh54/isl/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Interpreter screen](https://github.com/aayansh54/isl/blob/main/frontend/src/pages/Interpreter.tsx): `frontend/src/pages/Interpreter.tsx`
- [Camera stage](https://github.com/aayansh54/isl/blob/main/frontend/src/components/Stage.tsx): `frontend/src/components/Stage.tsx`
- [Camera access](https://github.com/aayansh54/isl/blob/main/frontend/src/lib/useCamera.ts): `frontend/src/lib/useCamera.ts`

### Recognition pipeline

- [Hand tracker](https://github.com/aayansh54/isl/blob/main/frontend/src/lib/tracker.ts): `frontend/src/lib/tracker.ts`
- [Frame engine](https://github.com/aayansh54/isl/blob/main/frontend/src/lib/engine.ts): `frontend/src/lib/engine.ts`
- [Confidence gate](https://github.com/aayansh54/isl/blob/main/frontend/src/lib/gate.ts): `frontend/src/lib/gate.ts`
- [Feature preprocessing](https://github.com/aayansh54/isl/blob/main/backend/app/features.py): `backend/app/features.py`
- [Classifier and parity](https://github.com/aayansh54/isl/blob/main/backend/app/inference.py): `backend/app/inference.py`
- [Trained model assets](https://github.com/aayansh54/isl/tree/main/model_aug): `model_aug`
- [Landmarker model](https://github.com/aayansh54/isl/blob/main/model/hand_landmarker.task): `model/hand_landmarker.task`

### Backend service

- [API client](https://github.com/aayansh54/isl/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [HTTP API](https://github.com/aayansh54/isl/blob/main/backend/app/main.py): `backend/app/main.py`

### Testing and results

- [Guided live test](https://github.com/aayansh54/isl/blob/main/frontend/src/pages/Test.tsx): `frontend/src/pages/Test.tsx`
- [Model and results](https://github.com/aayansh54/isl/blob/main/frontend/src/pages/Results.tsx): `frontend/src/pages/Results.tsx`
- [Live-test SQLite](https://github.com/aayansh54/isl/blob/main/backend/app/db.py): `backend/app/db.py`

### Training workflow

- [Desktop webcam demo](https://github.com/aayansh54/isl/blob/main/training/live_clean.py): `training/live_clean.py`
- [Training features](https://github.com/aayansh54/isl/blob/main/training/features.py): `training/features.py`

### Other components

- **Interpreter user**
- **User webcam**

## Connections

- Interpreter user → App shell: uses (evidence: `README.md`)
- App shell → Interpreter screen: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Guided live test: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Model and results: routes to (evidence: `frontend/src/App.tsx`)
- Interpreter screen → Camera stage: renders (evidence: `frontend/src/pages/Interpreter.tsx`)
- Camera stage → Camera access: uses (evidence: `frontend/src/components/Stage.tsx`)
- Camera stage → Hand tracker: loads (evidence: `frontend/src/components/Stage.tsx`)
- Camera stage → Confidence gate: configures (evidence: `frontend/src/components/Stage.tsx`)
- Camera stage → Frame engine: runs (evidence: `frontend/src/components/Stage.tsx`)
- User webcam → Camera access: provides video (evidence: `README.md`)
- Hand tracker → Landmarker model: uses (evidence: `README.md`)
- Frame engine → Hand tracker: detects landmarks (evidence: `frontend/src/lib/engine.ts`)
- Frame engine → API client: sends landmarks (evidence: `frontend/src/lib/engine.ts`)
- Frame engine → Confidence gate: gates predictions (evidence: `frontend/src/lib/engine.ts`)
- API client → HTTP API: requests predictions (evidence: `frontend/src/lib/api.ts`)
- HTTP API → Classifier and parity: classifies (evidence: `backend/app/main.py`)
- Classifier and parity → Feature preprocessing: builds features (evidence: `backend/app/inference.py`)
- Classifier and parity → Trained model assets: loads weights (evidence: `README.md`)
- Interpreter screen → API client: loads vocabulary (evidence: `frontend/src/pages/Interpreter.tsx`)
- Guided live test → API client: saves test (evidence: `frontend/src/lib/api.ts`)
- Model and results → API client: loads test data (evidence: `frontend/src/pages/Results.tsx`)
- Model and results → Classifier and parity: displays parity (evidence: `README.md`)
- HTTP API → Live-test SQLite: reads and writes (evidence: `backend/app/main.py`)
- Desktop webcam demo → Training features: uses preprocessing (evidence: `training/live_clean.py`)
- Training features → Feature preprocessing: matches preprocessing (evidence: `README.md`)
