# easternnova/handlex architecture

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

- Interactive diagram: https://gitdiagram.com/easternnova/handlex
- Repository: https://github.com/easternnova/handlex

## Overview

HandLex combines a React learning and information website with a separately developed Python sign-recognition pipeline. The intended recognition workflow runs from video or webcam input through hand-landmark detection and feature construction to model prediction; the sampled code supports preprocessing and webcam inference components, but does not show a frontend-to-backend connection. The website also provides learning, dictionary, practice, progress, and informational pages. Backend links below rely on the source index or README where noted; unsampled implementation details are not inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/easternnova/handlex/blob/master/frontend/src/App.jsx) (Route Application), [`frontend/src/pages/Home.jsx`](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Home.jsx) (Home), [`backend/modelA/train.py`](https://github.com/easternnova/handlex/blob/master/backend/modelA/train.py) (Model Training), [`backend/modelA/prepare_data_v6.py`](https://github.com/easternnova/handlex/blob/master/backend/modelA/prepare_data_v6.py) (Dataset Preparation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website"]
  node_app["Route Application<br/>[App.jsx]"]
  node_home["Home<br/>[Home.jsx]"]
  node_translate["Translate Page<br/>[Translate.jsx]"]
  node_practice["Practice Page<br/>[Practice.jsx]"]
  node_dictionary["Sign Dictionary<br/>[Dictionary.jsx]"]
  node_about["About Page<br/>[About.jsx]"]
end

subgraph group_learning["Learning Content"]
  node_learn["Learning Hub<br/>[Learn.jsx]"]
  node_alphabet["Alphabet<br/>[Alphabet.jsx]"]
  node_words["Word Lessons<br/>[Words.jsx]"]
  node_phrases["Phrase Lessons<br/>[Phrases.jsx]"]
  node_progress["Learning Progress<br/>[Progress.jsx]"]
end

subgraph group_recognition["Recognition Pipeline"]
  node_dataset["Dataset Preparation<br/>[prepare_data_v6.py]"]
  node_landmarker["Hand Landmark Detection<br/>[landmarker.py]"]
  node_features["Feature Construction<br/>[features.py]"]
  node_webcam["Webcam Inference<br/>[webcam.py]"]
end

subgraph group_ml["Model Development"]
  node_training["Model Training<br/>[train.py]"]
  node_model["Model Definition<br/>[model.py]"]
  node_analysis["Model Analysis<br/>[analyze_v6.py]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens website"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_translate
node_app -->|"routes to"| node_practice
node_app -->|"routes to"| node_dictionary
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_learn
node_app -->|"routes to"| node_alphabet
node_app -->|"routes to"| node_words
node_app -->|"routes to"| node_phrases
node_app -->|"routes to"| node_progress
node_home -->|"links to"| node_translate
node_home -->|"links to"| node_learn
node_home -->|"links to"| node_practice
node_home -->|"links to"| node_dictionary
node_dataset -->|"detects landmarks"| node_landmarker
node_dataset -->|"builds features"| node_features
node_webcam -->|"builds features"| node_features
node_dataset -.->|"prepares training data"| node_training
node_training -.->|"trains model"| node_model
node_webcam -.->|"loads trained model"| node_training
node_training -.->|"evaluates model"| node_analysis
node_translate -.->|"planned integration"| node_webcam

click node_app "https://github.com/easternnova/handlex/blob/master/frontend/src/App.jsx"
click node_home "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Home.jsx"
click node_translate "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Translate.jsx"
click node_practice "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Practice.jsx"
click node_dictionary "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Dictionary.jsx"
click node_about "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/About.jsx"
click node_learn "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Learn.jsx"
click node_alphabet "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Alphabet.jsx"
click node_words "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Words.jsx"
click node_phrases "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Phrases.jsx"
click node_progress "https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Progress.jsx"
click node_dataset "https://github.com/easternnova/handlex/blob/master/backend/modelA/prepare_data_v6.py"
click node_landmarker "https://github.com/easternnova/handlex/blob/master/backend/modelA/landmarker.py"
click node_features "https://github.com/easternnova/handlex/blob/master/backend/modelA/features.py"
click node_webcam "https://github.com/easternnova/handlex/blob/master/backend/modelA/webcam.py"
click node_training "https://github.com/easternnova/handlex/blob/master/backend/modelA/train.py"
click node_model "https://github.com/easternnova/handlex/blob/master/backend/modelA/model.py"
click node_analysis "https://github.com/easternnova/handlex/blob/master/backend/modelA/analyze_v6.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_home,node_translate,node_practice,node_dictionary,node_about toneBlue
class node_learn,node_alphabet,node_words,node_phrases,node_progress toneAmber
class node_dataset,node_landmarker,node_features,node_webcam toneMint
class node_training,node_model,node_analysis toneRose
class node_visitor toneIndigo
```

## Components

### Website

- [Route Application](https://github.com/easternnova/handlex/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Home](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Translate Page](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Translate.jsx): `frontend/src/pages/Translate.jsx`
- [Practice Page](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Practice.jsx): `frontend/src/pages/Practice.jsx`
- [Sign Dictionary](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/Dictionary.jsx): `frontend/src/pages/Dictionary.jsx`
- [About Page](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/About.jsx): `frontend/src/pages/About.jsx`

### Learning Content

- [Learning Hub](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Learn.jsx): `frontend/src/pages/learn/Learn.jsx`
- [Alphabet](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Alphabet.jsx): `frontend/src/pages/learn/Alphabet.jsx`
- [Word Lessons](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Words.jsx): `frontend/src/pages/learn/Words.jsx`
- [Phrase Lessons](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Phrases.jsx): `frontend/src/pages/learn/Phrases.jsx`
- [Learning Progress](https://github.com/easternnova/handlex/blob/master/frontend/src/pages/learn/Progress.jsx): `frontend/src/pages/learn/Progress.jsx`

### Recognition Pipeline

- [Dataset Preparation](https://github.com/easternnova/handlex/blob/master/backend/modelA/prepare_data_v6.py): `backend/modelA/prepare_data_v6.py`
- [Hand Landmark Detection](https://github.com/easternnova/handlex/blob/master/backend/modelA/landmarker.py): `backend/modelA/landmarker.py`
- [Feature Construction](https://github.com/easternnova/handlex/blob/master/backend/modelA/features.py): `backend/modelA/features.py`
- [Webcam Inference](https://github.com/easternnova/handlex/blob/master/backend/modelA/webcam.py): `backend/modelA/webcam.py`

### Model Development

- [Model Training](https://github.com/easternnova/handlex/blob/master/backend/modelA/train.py): `backend/modelA/train.py`
- [Model Definition](https://github.com/easternnova/handlex/blob/master/backend/modelA/model.py): `backend/modelA/model.py`
- [Model Analysis](https://github.com/easternnova/handlex/blob/master/backend/modelA/analyze_v6.py): `backend/modelA/analyze_v6.py`

### Other components

- **Visitor**

## Connections

- Visitor → Route Application: opens website
- Route Application → Home: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → Translate Page: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → Practice Page: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → Sign Dictionary: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → About Page: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → Learning Hub: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → Alphabet: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → Word Lessons: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → Phrase Lessons: routes to (evidence: `frontend/src/App.jsx`)
- Route Application → Learning Progress: routes to (evidence: `frontend/src/App.jsx`)
- Home → Translate Page: links to (evidence: `frontend/src/pages/Home.jsx`)
- Home → Learning Hub: links to (evidence: `frontend/src/pages/Home.jsx`)
- Home → Practice Page: links to (evidence: `frontend/src/pages/Home.jsx`)
- Home → Sign Dictionary: links to (evidence: `frontend/src/pages/Home.jsx`)
- Dataset Preparation → Hand Landmark Detection: detects landmarks (evidence: `backend/modelA/prepare_data_v6.py`)
- Dataset Preparation → Feature Construction: builds features (evidence: `backend/modelA/prepare_data_v6.py`)
- Webcam Inference → Feature Construction: builds features (evidence: `backend/modelA/webcam.py`)
- Dataset Preparation → Model Training: prepares training data
- Model Training → Model Definition: trains model
- Webcam Inference → Model Training: loads trained model
- Model Training → Model Analysis: evaluates model
- Translate Page → Webcam Inference: planned integration
