# aceofpsycho/hand-sign-website architecture

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

- Interactive diagram: https://gitdiagram.com/aceofpsycho/hand-sign-website
- Repository: https://github.com/aceofpsycho/hand-sign-website

## Overview

This browser app translates between ASL hand signs and speech. Its main workflow captures camera frames, detects hand landmarks, preprocesses them for local classifiers, and turns stable letter predictions into text; a separate speech mode recognizes spoken words and displays corresponding letter images. Speech synthesis reads text aloud, while ASL images and TFLite models are local assets. The runtime is concentrated in src/main.js; the excerpts show key calls and asset references, but not every initialization detail.

Main entry points: [`src/main.js`](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js) (Translator UI and orchestration), [`public/models`](https://github.com/aceofpsycho/hand-sign-website/tree/main/public/models) (Keypoint model), [`public/asl_images`](https://github.com/aceofpsycho/hand-sign-website/tree/main/public/asl_images) (ASL letter images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Browser runtime"]
  node_app["Translator UI and orchestration<br/>[main.js]"]
  node_camera["Camera capture<br/>[main.js]"]
end

subgraph group_sign["Sign translation"]
  node_hand_detector["Hand landmark detection<br/>[main.js]"]
  node_mediapipe["MediaPipe Hands"]
  node_preprocess["Landmark preprocessing<br/>[main.js]"]
  node_keypoint["Keypoint classification<br/>[main.js]"]
  node_history["Point-history classification<br/>[main.js]"]
  node_letter_text["Stable letter and text output<br/>[main.js]"]
  node_image_lookup["ASL letter image display<br/>[main.js]"]
end

subgraph group_speech["Speech features"]
  node_recognition["Speech recognition<br/>[main.js]"]
  node_speech_text["Speech text and image output<br/>[main.js]"]
  node_synthesis["Speech synthesis<br/>[main.js]"]
end

subgraph group_assets["Local assets"]
  node_keypoint_model["Keypoint model"]
  node_history_model["Point-history model"]
  node_asl_images["ASL letter images"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"starts and stops"| node_camera
node_camera -->|"sends frames"| node_hand_detector
node_hand_detector -->|"uses"| node_mediapipe
node_hand_detector -->|"provides landmarks"| node_preprocess
node_preprocess -->|"provides 42 values"| node_keypoint
node_keypoint -->|"loads model"| node_keypoint_model
node_hand_detector -->|"provides history"| node_history
node_history -->|"loads model"| node_history_model
node_keypoint -->|"returns letter"| node_letter_text
node_letter_text -->|"updates output"| node_app
node_app -->|"renders letters"| node_image_lookup
node_image_lookup -->|"loads images"| node_asl_images
node_app -->|"starts recognition"| node_recognition
node_recognition -->|"provides recognized text"| node_speech_text
node_speech_text -->|"shows letter images"| node_image_lookup
node_app -->|"speaks text"| node_synthesis

click node_app "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_camera "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_hand_detector "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_preprocess "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_keypoint "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_keypoint_model "https://github.com/aceofpsycho/hand-sign-website/tree/main/public/models"
click node_history "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_history_model "https://github.com/aceofpsycho/hand-sign-website/tree/main/public/models"
click node_letter_text "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_image_lookup "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_asl_images "https://github.com/aceofpsycho/hand-sign-website/tree/main/public/asl_images"
click node_recognition "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_speech_text "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"
click node_synthesis "https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js"

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_camera,node_user toneBlue
class node_hand_detector,node_mediapipe,node_preprocess,node_keypoint,node_history,node_letter_text,node_image_lookup toneAmber
class node_recognition,node_speech_text,node_synthesis toneMint
class node_keypoint_model,node_history_model,node_asl_images toneRose
```

## Components

### Browser runtime

- [Translator UI and orchestration](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`
- [Camera capture](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`

### Sign translation

- [Hand landmark detection](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`
- **MediaPipe Hands**
- [Landmark preprocessing](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`
- [Keypoint classification](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`
- [Point-history classification](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`
- [Stable letter and text output](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`
- [ASL letter image display](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`

### Speech features

- [Speech recognition](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`
- [Speech text and image output](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`
- [Speech synthesis](https://github.com/aceofpsycho/hand-sign-website/blob/main/src/main.js): `src/main.js`

### Local assets

- [Keypoint model](https://github.com/aceofpsycho/hand-sign-website/tree/main/public/models): `public/models`
- [Point-history model](https://github.com/aceofpsycho/hand-sign-website/tree/main/public/models): `public/models`
- [ASL letter images](https://github.com/aceofpsycho/hand-sign-website/tree/main/public/asl_images): `public/asl_images`

### Other components

- **User**

## Connections

- User → Translator UI and orchestration: uses (evidence: `README.md`)
- Translator UI and orchestration → Camera capture: starts and stops (evidence: `src/main.js`)
- Camera capture → Hand landmark detection: sends frames (evidence: `src/main.js`)
- Hand landmark detection → MediaPipe Hands: uses (evidence: `src/main.js`)
- Hand landmark detection → Landmark preprocessing: provides landmarks (evidence: `src/main.js`)
- Landmark preprocessing → Keypoint classification: provides 42 values (evidence: `src/main.js`)
- Keypoint classification → Keypoint model: loads model (evidence: `src/main.js`)
- Hand landmark detection → Point-history classification: provides history (evidence: `src/main.js`)
- Point-history classification → Point-history model: loads model (evidence: `src/main.js`)
- Keypoint classification → Stable letter and text output: returns letter (evidence: `src/main.js`)
- Stable letter and text output → Translator UI and orchestration: updates output (evidence: `src/main.js`)
- Translator UI and orchestration → ASL letter image display: renders letters (evidence: `src/main.js`)
- ASL letter image display → ASL letter images: loads images (evidence: `src/main.js`)
- Translator UI and orchestration → Speech recognition: starts recognition (evidence: `src/main.js`)
- Speech recognition → Speech text and image output: provides recognized text (evidence: `src/main.js`)
- Speech text and image output → ASL letter image display: shows letter images (evidence: `src/main.js`)
- Translator UI and orchestration → Speech synthesis: speaks text (evidence: `src/main.js`)
