# aravindraj0007/mudra-identification architecture

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

- Interactive diagram: https://gitdiagram.com/aravindraj0007/mudra-identification
- Repository: https://github.com/aravindraj0007/mudra-identification

## Overview

Mudra Academy is a Bharatanatyam learning app with reference material, practice games, live hand detection, and an AI chat guide. Users can explore mudras or practice them through detection; Electron also runs a separate Python/YOLO inference service. The excerpts show the Electron IPC-to-Python path and the JavaScript detector’s use of its single-hand inference module. The README is empty, and page markup was not sampled, so links from individual pages to features are not asserted.

Main entry points: [`electron/main.js`](https://github.com/aravindraj0007/mudra-identification/blob/main/electron/main.js) (Electron IPC host), [`js/chat-widget.js`](https://github.com/aravindraj0007/mudra-identification/blob/main/js/chat-widget.js) (Natya Guru chat), [`ml/mudra_inference.py`](https://github.com/aravindraj0007/mudra-identification/blob/main/ml/mudra_inference.py) (YOLO inference), [`index.html`](https://github.com/aravindraj0007/mudra-identification/blob/main/index.html) (Home experience)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Learning experience"]
  node_home["Home experience<br/>[index.html]"]
  node_library["Mudra library<br/>[library.html]"]
  node_detection_modes["Detection modes"]
  node_live_detection["Live detection"]
  node_double_detection["Two-hand detection"]
  node_ghost_mode["Ghost mode<br/>[ghost-mode.html]"]
  node_flashcards["Flashcards<br/>[flashcard.html]"]
  node_quiz["Quiz game<br/>[quiz.html]"]
  node_sequence["Sequence game<br/>[sequence.html]"]
  node_chat["Natya Guru chat<br/>[chat-widget.js]"]
end

subgraph group_detection["Mudra detection"]
  node_web_detection["Rule-based detector<br/>[mudra-detection.js]"]
  node_single_inference["Single-hand inference<br/>[mudra-inference.js]"]
  node_mudra_names["Name normalization<br/>[mudra-constants.js]"]
end

subgraph group_desktop["Desktop inference"]
  node_electron_main["Electron IPC host<br/>[main.js]"]
  node_preload["Renderer bridge<br/>[preload.js]"]
  node_python_inference["YOLO inference<br/>[mudra_inference.py]"]
  node_yolo_model[("YOLO model<br/>[final.pt]")]
end

node_learner(("Learner"))
node_gemini{{"Gemini API"}}

node_learner -.->|"opens"| node_home
node_learner -.->|"browses"| node_library
node_learner -.->|"selects"| node_detection_modes
node_learner -.->|"practices"| node_live_detection
node_learner -.->|"practices"| node_double_detection
node_learner -.->|"practices"| node_ghost_mode
node_learner -.->|"practices"| node_flashcards
node_learner -.->|"plays"| node_quiz
node_learner -.->|"practices"| node_sequence
node_learner -.->|"asks"| node_chat
node_chat -->|"requests responses"| node_gemini
node_web_detection -->|"runs ML prediction"| node_single_inference
node_learner -.->|"launches app"| node_electron_main
node_electron_main -->|"loads window"| node_home
node_preload -->|"invokes detection IPC"| node_electron_main
node_electron_main -->|"spawns process"| node_python_inference
node_python_inference -->|"loads model"| node_yolo_model

click node_home "https://github.com/aravindraj0007/mudra-identification/blob/main/index.html"
click node_library "https://github.com/aravindraj0007/mudra-identification/blob/main/pages/library.html"
click node_detection_modes "https://github.com/aravindraj0007/mudra-identification/blob/main/pages/detection-mode.html"
click node_live_detection "https://github.com/aravindraj0007/mudra-identification/blob/main/pages/live-detection.html"
click node_double_detection "https://github.com/aravindraj0007/mudra-identification/blob/main/pages/double-hand-detection.html"
click node_ghost_mode "https://github.com/aravindraj0007/mudra-identification/blob/main/pages/ghost-mode.html"
click node_flashcards "https://github.com/aravindraj0007/mudra-identification/blob/main/pages/games/flashcard.html"
click node_quiz "https://github.com/aravindraj0007/mudra-identification/blob/main/pages/games/quiz.html"
click node_sequence "https://github.com/aravindraj0007/mudra-identification/blob/main/pages/games/sequence.html"
click node_chat "https://github.com/aravindraj0007/mudra-identification/blob/main/js/chat-widget.js"
click node_web_detection "https://github.com/aravindraj0007/mudra-identification/blob/main/js/mudra-detection.js"
click node_single_inference "https://github.com/aravindraj0007/mudra-identification/blob/main/js/mudra-inference.js"
click node_mudra_names "https://github.com/aravindraj0007/mudra-identification/blob/main/js/mudra-constants.js"
click node_electron_main "https://github.com/aravindraj0007/mudra-identification/blob/main/electron/main.js"
click node_preload "https://github.com/aravindraj0007/mudra-identification/blob/main/electron/preload.js"
click node_python_inference "https://github.com/aravindraj0007/mudra-identification/blob/main/ml/mudra_inference.py"
click node_yolo_model "https://github.com/aravindraj0007/mudra-identification/blob/main/ml/models/final.pt"

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_home,node_library,node_detection_modes,node_live_detection,node_double_detection,node_ghost_mode,node_flashcards,node_quiz,node_sequence,node_chat toneBlue
class node_web_detection,node_single_inference,node_mudra_names toneAmber
class node_electron_main,node_preload,node_python_inference,node_yolo_model,node_gemini toneMint
class node_learner toneIndigo
```

## Components

### Learning experience

- [Home experience](https://github.com/aravindraj0007/mudra-identification/blob/main/index.html): `index.html`
- [Mudra library](https://github.com/aravindraj0007/mudra-identification/blob/main/pages/library.html): `pages/library.html`
- [Detection modes](https://github.com/aravindraj0007/mudra-identification/blob/main/pages/detection-mode.html): `pages/detection-mode.html`
- [Live detection](https://github.com/aravindraj0007/mudra-identification/blob/main/pages/live-detection.html): `pages/live-detection.html`
- [Two-hand detection](https://github.com/aravindraj0007/mudra-identification/blob/main/pages/double-hand-detection.html): `pages/double-hand-detection.html`
- [Ghost mode](https://github.com/aravindraj0007/mudra-identification/blob/main/pages/ghost-mode.html): `pages/ghost-mode.html`
- [Flashcards](https://github.com/aravindraj0007/mudra-identification/blob/main/pages/games/flashcard.html): `pages/games/flashcard.html`
- [Quiz game](https://github.com/aravindraj0007/mudra-identification/blob/main/pages/games/quiz.html): `pages/games/quiz.html`
- [Sequence game](https://github.com/aravindraj0007/mudra-identification/blob/main/pages/games/sequence.html): `pages/games/sequence.html`
- [Natya Guru chat](https://github.com/aravindraj0007/mudra-identification/blob/main/js/chat-widget.js): `js/chat-widget.js`

### Mudra detection

- [Rule-based detector](https://github.com/aravindraj0007/mudra-identification/blob/main/js/mudra-detection.js): `js/mudra-detection.js`
- [Single-hand inference](https://github.com/aravindraj0007/mudra-identification/blob/main/js/mudra-inference.js): `js/mudra-inference.js`
- [Name normalization](https://github.com/aravindraj0007/mudra-identification/blob/main/js/mudra-constants.js): `js/mudra-constants.js`

### Desktop inference

- [Electron IPC host](https://github.com/aravindraj0007/mudra-identification/blob/main/electron/main.js): `electron/main.js`
- [Renderer bridge](https://github.com/aravindraj0007/mudra-identification/blob/main/electron/preload.js): `electron/preload.js`
- [YOLO inference](https://github.com/aravindraj0007/mudra-identification/blob/main/ml/mudra_inference.py): `ml/mudra_inference.py`
- [YOLO model](https://github.com/aravindraj0007/mudra-identification/blob/main/ml/models/final.pt): `ml/models/final.pt`

### Other components

- **Learner**
- **Gemini API**

## Connections

- Learner → Home experience: opens
- Learner → Mudra library: browses
- Learner → Detection modes: selects
- Learner → Live detection: practices
- Learner → Two-hand detection: practices
- Learner → Ghost mode: practices
- Learner → Flashcards: practices
- Learner → Quiz game: plays
- Learner → Sequence game: practices
- Learner → Natya Guru chat: asks
- Natya Guru chat → Gemini API: requests responses (evidence: `js/chat-widget.js`)
- Rule-based detector → Single-hand inference: runs ML prediction (evidence: `js/mudra-detection.js`)
- Learner → Electron IPC host: launches app
- Electron IPC host → Home experience: loads window (evidence: `electron/main.js`)
- Renderer bridge → Electron IPC host: invokes detection IPC (evidence: `electron/preload.js`)
- Electron IPC host → YOLO inference: spawns process (evidence: `electron/main.js`)
- YOLO inference → YOLO model: loads model (evidence: `ml/mudra_inference.py`)
