# chiranat/jubjeeb architecture

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

- Interactive diagram: https://gitdiagram.com/chiranat/jubjeeb
- Repository: https://github.com/chiranat/jubjeeb

## Overview

Jubjeeb is a Windows hand-gesture and Thai voice control application. Its primary workflow captures webcam frames, detects and smooths hand landmarks, recognizes gestures, then translates them into mouse, keyboard, media, and desktop actions. A separate GUI manages camera and microphone controls and settings; voice recognition can also open or close the camera. The README documents dataset collection and model training as preparation for gesture inference. Several UI and training relationships are documented or indexed rather than shown in full source excerpts, so uncertain runtime links are omitted.

Main entry points: [`src/gui/app.py`](https://github.com/chiranat/jubjeeb/blob/main/src/gui/app.py) (GUI application), [`src/gui/system.py`](https://github.com/chiranat/jubjeeb/blob/main/src/gui/system.py) (GUI system controller), [`src/hand_tracking.py`](https://github.com/chiranat/jubjeeb/blob/main/src/hand_tracking.py) (Hand tracking), [`src/main.py`](https://github.com/chiranat/jubjeeb/blob/main/src/main.py) (CLI application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Control runtime"]
  node_main["CLI application<br/>[main.py]"]
  node_mouse["Mouse and actions"]
  node_config["Runtime configuration<br/>[config.py]"]
end

subgraph group_gesture["Gesture processing"]
  node_tracking["Hand tracking<br/>[hand_tracking.py]"]
  node_smoothing["Landmark smoothing<br/>[kalman_filter.py]"]
  node_recognition["Gesture recognition"]
end

subgraph group_gui["Desktop interface"]
  node_gui_app["GUI application<br/>[app.py]"]
  node_gui_system["GUI system controller<br/>[system.py]"]
  node_camera["Camera handling<br/>[camera.py]"]
  node_camera_utils["Camera utilities<br/>[camera_utils.py]"]
  node_settings_window["Settings window<br/>[settings.py]"]
  node_manual_window["Gesture manual<br/>[manual.py]"]
  node_settings_manager["Settings manager"]
  node_settings_file[("User settings file")]
end

subgraph group_voice["Voice commands"]
  node_voice["Voice controller"]
end

subgraph group_mlprep["Model preparation"]
  node_collection["Gesture data collection<br/>[data_collection.py]"]
  node_training["Model training<br/>[train_model.py]"]
end

node_user(("User"))
node_webcam(("Webcam"))
node_microphone(("Microphone"))
node_windows(("Windows controls"))
node_speech_service(("Google speech recognition"))

node_user -->|"starts"| node_main
node_webcam -->|"provides frames"| node_main
node_main -->|"processes frames"| node_tracking
node_tracking -->|"smooths landmarks"| node_smoothing
node_tracking -->|"supplies landmarks"| node_recognition
node_recognition -->|"executes actions"| node_mouse
node_mouse -->|"controls"| node_windows
node_main -->|"reads settings"| node_config
node_user -->|"uses"| node_gui_app
node_gui_app -->|"initializes"| node_gui_system
node_gui_system -->|"creates"| node_tracking
node_gui_system -->|"creates"| node_mouse
node_gui_system -->|"creates"| node_recognition
node_gui_system -->|"creates"| node_voice
node_gui_app -->|"imports"| node_camera
node_gui_app -->|"opens"| node_settings_window
node_gui_app -->|"opens"| node_manual_window
node_settings_window -->|"uses"| node_camera_utils
node_settings_window -->|"reads and writes"| node_settings_manager
node_gui_app -->|"loads settings"| node_settings_manager
node_settings_manager -->|"reads and writes"| node_settings_file
node_manual_window -->|"displays gestures"| node_config
node_microphone -->|"provides audio"| node_voice
node_voice -->|"recognizes speech"| node_speech_service
node_voice -->|"requests camera action"| node_gui_app
node_user -->|"records gestures"| node_collection
node_collection -->|"collects landmarks"| node_tracking
node_user -->|"trains model"| node_training
node_training -->|"produces inference model"| node_recognition

click node_main "https://github.com/chiranat/jubjeeb/blob/main/src/main.py"
click node_tracking "https://github.com/chiranat/jubjeeb/blob/main/src/hand_tracking.py"
click node_smoothing "https://github.com/chiranat/jubjeeb/blob/main/src/kalman_filter.py"
click node_recognition "https://github.com/chiranat/jubjeeb/blob/main/src/gesture_recognizer.py"
click node_mouse "https://github.com/chiranat/jubjeeb/blob/main/src/mouse_controller.py"
click node_config "https://github.com/chiranat/jubjeeb/blob/main/config.py"
click node_gui_app "https://github.com/chiranat/jubjeeb/blob/main/src/gui/app.py"
click node_gui_system "https://github.com/chiranat/jubjeeb/blob/main/src/gui/system.py"
click node_camera "https://github.com/chiranat/jubjeeb/blob/main/src/gui/camera.py"
click node_camera_utils "https://github.com/chiranat/jubjeeb/blob/main/src/gui/camera_utils.py"
click node_settings_window "https://github.com/chiranat/jubjeeb/blob/main/src/gui/windows/settings.py"
click node_manual_window "https://github.com/chiranat/jubjeeb/blob/main/src/gui/windows/manual.py"
click node_settings_manager "https://github.com/chiranat/jubjeeb/blob/main/src/gui/settings_manager.py"
click node_voice "https://github.com/chiranat/jubjeeb/blob/main/src/voice_controller.py"
click node_collection "https://github.com/chiranat/jubjeeb/blob/main/utils/data_collection.py"
click node_training "https://github.com/chiranat/jubjeeb/blob/main/utils/train_model.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_main,node_mouse,node_config,node_user toneBlue
class node_tracking,node_smoothing,node_recognition toneAmber
class node_gui_app,node_gui_system,node_camera,node_camera_utils,node_settings_window,node_manual_window,node_settings_manager,node_settings_file toneMint
class node_voice toneRose
class node_collection,node_training,node_webcam,node_microphone,node_windows,node_speech_service toneIndigo
```

## Components

### Control runtime

- [CLI application](https://github.com/chiranat/jubjeeb/blob/main/src/main.py): `src/main.py`
- [Mouse and actions](https://github.com/chiranat/jubjeeb/blob/main/src/mouse_controller.py): `src/mouse_controller.py`
- [Runtime configuration](https://github.com/chiranat/jubjeeb/blob/main/config.py): `config.py`

### Gesture processing

- [Hand tracking](https://github.com/chiranat/jubjeeb/blob/main/src/hand_tracking.py): `src/hand_tracking.py`
- [Landmark smoothing](https://github.com/chiranat/jubjeeb/blob/main/src/kalman_filter.py): `src/kalman_filter.py`
- [Gesture recognition](https://github.com/chiranat/jubjeeb/blob/main/src/gesture_recognizer.py): `src/gesture_recognizer.py`

### Desktop interface

- [GUI application](https://github.com/chiranat/jubjeeb/blob/main/src/gui/app.py): `src/gui/app.py`
- [GUI system controller](https://github.com/chiranat/jubjeeb/blob/main/src/gui/system.py): `src/gui/system.py`
- [Camera handling](https://github.com/chiranat/jubjeeb/blob/main/src/gui/camera.py): `src/gui/camera.py`
- [Camera utilities](https://github.com/chiranat/jubjeeb/blob/main/src/gui/camera_utils.py): `src/gui/camera_utils.py`
- [Settings window](https://github.com/chiranat/jubjeeb/blob/main/src/gui/windows/settings.py): `src/gui/windows/settings.py`
- [Gesture manual](https://github.com/chiranat/jubjeeb/blob/main/src/gui/windows/manual.py): `src/gui/windows/manual.py`
- [Settings manager](https://github.com/chiranat/jubjeeb/blob/main/src/gui/settings_manager.py): `src/gui/settings_manager.py`
- **User settings file**

### Voice commands

- [Voice controller](https://github.com/chiranat/jubjeeb/blob/main/src/voice_controller.py): `src/voice_controller.py`

### Model preparation

- [Gesture data collection](https://github.com/chiranat/jubjeeb/blob/main/utils/data_collection.py): `utils/data_collection.py`
- [Model training](https://github.com/chiranat/jubjeeb/blob/main/utils/train_model.py): `utils/train_model.py`

### Other components

- **User**
- **Webcam**
- **Microphone**
- **Windows controls**
- **Google speech recognition**

## Connections

- User → CLI application: starts (evidence: `README.md`)
- Webcam → CLI application: provides frames (evidence: `README.md`)
- CLI application → Hand tracking: processes frames (evidence: `README.md`)
- Hand tracking → Landmark smoothing: smooths landmarks (evidence: `README.md`)
- Hand tracking → Gesture recognition: supplies landmarks (evidence: `README.md`)
- Gesture recognition → Mouse and actions: executes actions (evidence: `README.md`)
- Mouse and actions → Windows controls: controls (evidence: `src/mouse_controller.py`)
- CLI application → Runtime configuration: reads settings (evidence: `src/main.py`)
- User → GUI application: uses (evidence: `src/gui/app.py`)
- GUI application → GUI system controller: initializes (evidence: `src/gui/app.py`)
- GUI system controller → Hand tracking: creates (evidence: `src/gui/system.py`)
- GUI system controller → Mouse and actions: creates (evidence: `src/gui/system.py`)
- GUI system controller → Gesture recognition: creates (evidence: `src/gui/system.py`)
- GUI system controller → Voice controller: creates (evidence: `src/gui/system.py`)
- GUI application → Camera handling: imports (evidence: `src/gui/app.py`)
- GUI application → Settings window: opens (evidence: `src/gui/app.py`)
- GUI application → Gesture manual: opens (evidence: `src/gui/app.py`)
- Settings window → Camera utilities: uses (evidence: `src/gui/windows/settings.py`)
- Settings window → Settings manager: reads and writes (evidence: `src/gui/windows/settings.py`)
- GUI application → Settings manager: loads settings (evidence: `src/gui/app.py`)
- Settings manager → User settings file: reads and writes (evidence: `src/gui/settings_manager.py`)
- Gesture manual → Runtime configuration: displays gestures (evidence: `src/gui/windows/manual.py`)
- Microphone → Voice controller: provides audio (evidence: `README.md`)
- Voice controller → Google speech recognition: recognizes speech (evidence: `src/voice_controller.py`)
- Voice controller → GUI application: requests camera action (evidence: `src/voice_controller.py`)
- User → Gesture data collection: records gestures (evidence: `README.md`)
- Gesture data collection → Hand tracking: collects landmarks (evidence: `utils/data_collection.py`)
- User → Model training: trains model (evidence: `README.md`)
- Model training → Gesture recognition: produces inference model (evidence: `README.md`)
