# rhon-dev/kumpas architecture

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

- Interactive diagram: https://gitdiagram.com/rhon-dev/kumpas
- Repository: https://github.com/rhon-dev/kumpas

## Overview

KUMPAS is an offline Android Filipino Sign Language learning app. A learner practices a sign in the camera view; native frame processing extracts landmarks, classifies a sequence on-device, compares it with a gold standard, and emits corrective feedback. The app also provides learning screens and records practice history. The repository includes a separate model-development pipeline and benchmark tools. The graph reflects the documented product workflow and shown native call paths; unsampled Flutter wiring and training-stage handoffs are left unasserted where evidence is limited.

Main entry points: [`app/android/app/src/main/kotlin/com/kumpas/kumpas_app/MainActivity.kt`](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/MainActivity.kt) (Flutter host), [`app/android/app/src/main/kotlin/com/kumpas/kumpas_app/VisionEngine.kt`](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/VisionEngine.kt) (Vision inference), [`app/lib/ui`](https://github.com/rhon-dev/kumpas/tree/main/app/lib/ui) (Learning screens), [`app/android/app/src/main/kotlin/com/kumpas/kumpas_app/CameraPreviewView.kt`](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/CameraPreviewView.kt) (Camera preview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile learning"]
  node_flutter_ui["Learning screens"]
  node_native_host["Flutter host<br/>[MainActivity.kt]"]
end

subgraph group_recognition["On-device recognition"]
  node_camera["Camera preview"]
  node_vision["Vision inference<br/>[VisionEngine.kt]"]
  node_gold_assets["Gold standards"]
  node_feedback["Corrective feedback<br/>[FeedbackEngine.kt]"]
end

subgraph group_practice_data["Practice records"]
  node_session_log["Attempt log<br/>[SessionLog.kt]"]
  node_session_manager["Session manager<br/>[SessionManager.kt]"]
  node_session_db[("Practice database<br/>[SessionDatabase.kt]")]
end

subgraph group_model_work["Model development"]
  node_preprocessing["Dataset preprocessing"]
  node_augmentation["Landmark augmentation"]
  node_training["Model training<br/>[train_cnn_lstm.py]"]
  node_feedback_reference["Feedback reference<br/>[feedback_engine.py]"]
  node_export["TFLite export<br/>[export_tflite.py]"]
end

subgraph group_validation["Performance validation"]
  node_accuracy_bench["Accuracy benchmark"]
  node_device_bench["Device benchmarks"]
  node_benchmark_history["Benchmark history"]
end

node_learner(("Learner"))

node_learner -.->|"practices with"| node_flutter_ui
node_flutter_ui -.->|"uses native features"| node_native_host
node_native_host -->|"creates preview"| node_camera
node_camera -->|"submits frames"| node_vision
node_native_host -->|"routes controls"| node_vision
node_vision -->|"loads standards"| node_gold_assets
node_vision -->|"compares attempt"| node_feedback
node_native_host -->|"logs results"| node_session_log
node_session_manager -->|"reads and writes"| node_session_db
node_learner -.->|"provides sign data"| node_preprocessing
node_preprocessing -.->|"prepares landmarks"| node_augmentation
node_augmentation -.->|"augments examples"| node_training
node_training -.->|"exports model"| node_export
node_feedback_reference -.->|"guides parity"| node_feedback
node_export -.->|"evaluates model"| node_accuracy_bench
node_accuracy_bench -->|"records results"| node_benchmark_history
node_device_bench -.->|"records measurements"| node_benchmark_history

click node_flutter_ui "https://github.com/rhon-dev/kumpas/tree/main/app/lib/ui"
click node_native_host "https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/MainActivity.kt"
click node_camera "https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/CameraPreviewView.kt"
click node_vision "https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/VisionEngine.kt"
click node_gold_assets "https://github.com/rhon-dev/kumpas/tree/main/app/android/app/src/main/assets"
click node_feedback "https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/FeedbackEngine.kt"
click node_session_log "https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionLog.kt"
click node_session_manager "https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionManager.kt"
click node_session_db "https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionDatabase.kt"
click node_preprocessing "https://github.com/rhon-dev/kumpas/tree/main/training/preprocessing"
click node_augmentation "https://github.com/rhon-dev/kumpas/blob/main/training/augmentation/augment_landmarks.py"
click node_training "https://github.com/rhon-dev/kumpas/blob/main/training/models/train_cnn_lstm.py"
click node_feedback_reference "https://github.com/rhon-dev/kumpas/blob/main/training/feedback/feedback_engine.py"
click node_export "https://github.com/rhon-dev/kumpas/blob/main/training/tflite_export/export_tflite.py"
click node_accuracy_bench "https://github.com/rhon-dev/kumpas/blob/main/benchmarking/accuracy_benchmark.py"
click node_device_bench "https://github.com/rhon-dev/kumpas/tree/main/benchmarking"
click node_benchmark_history "https://github.com/rhon-dev/kumpas/blob/main/benchmarking/benchmark_history.json"

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_flutter_ui,node_native_host toneBlue
class node_camera,node_vision,node_gold_assets,node_feedback toneAmber
class node_session_log,node_session_manager,node_session_db toneMint
class node_preprocessing,node_augmentation,node_training,node_feedback_reference,node_export toneRose
class node_accuracy_bench,node_device_bench,node_benchmark_history,node_learner toneIndigo
```

## Components

### Mobile learning

- [Learning screens](https://github.com/rhon-dev/kumpas/tree/main/app/lib/ui): `app/lib/ui`
- [Flutter host](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/MainActivity.kt): `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/MainActivity.kt`

### On-device recognition

- [Camera preview](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/CameraPreviewView.kt): `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/CameraPreviewView.kt`
- [Vision inference](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/VisionEngine.kt): `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/VisionEngine.kt`
- [Gold standards](https://github.com/rhon-dev/kumpas/tree/main/app/android/app/src/main/assets): `app/android/app/src/main/assets`
- [Corrective feedback](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/FeedbackEngine.kt): `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/FeedbackEngine.kt`

### Practice records

- [Attempt log](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionLog.kt): `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionLog.kt`
- [Session manager](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionManager.kt): `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionManager.kt`
- [Practice database](https://github.com/rhon-dev/kumpas/blob/main/app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionDatabase.kt): `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionDatabase.kt`

### Model development

- [Dataset preprocessing](https://github.com/rhon-dev/kumpas/tree/main/training/preprocessing): `training/preprocessing`
- [Landmark augmentation](https://github.com/rhon-dev/kumpas/blob/main/training/augmentation/augment_landmarks.py): `training/augmentation/augment_landmarks.py`
- [Model training](https://github.com/rhon-dev/kumpas/blob/main/training/models/train_cnn_lstm.py): `training/models/train_cnn_lstm.py`
- [Feedback reference](https://github.com/rhon-dev/kumpas/blob/main/training/feedback/feedback_engine.py): `training/feedback/feedback_engine.py`
- [TFLite export](https://github.com/rhon-dev/kumpas/blob/main/training/tflite_export/export_tflite.py): `training/tflite_export/export_tflite.py`

### Performance validation

- [Accuracy benchmark](https://github.com/rhon-dev/kumpas/blob/main/benchmarking/accuracy_benchmark.py): `benchmarking/accuracy_benchmark.py`
- [Device benchmarks](https://github.com/rhon-dev/kumpas/tree/main/benchmarking): `benchmarking`
- [Benchmark history](https://github.com/rhon-dev/kumpas/blob/main/benchmarking/benchmark_history.json): `benchmarking/benchmark_history.json`

### Other components

- **Learner**

## Connections

- Learner → Learning screens: practices with (evidence: `README.md`)
- Learning screens → Flutter host: uses native features
- Flutter host → Camera preview: creates preview (evidence: `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/MainActivity.kt`)
- Camera preview → Vision inference: submits frames (evidence: `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/CameraPreviewView.kt`)
- Flutter host → Vision inference: routes controls (evidence: `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/MainActivity.kt`)
- Vision inference → Gold standards: loads standards (evidence: `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/VisionEngine.kt`)
- Vision inference → Corrective feedback: compares attempt (evidence: `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/VisionEngine.kt`)
- Flutter host → Attempt log: logs results (evidence: `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/MainActivity.kt`)
- Session manager → Practice database: reads and writes (evidence: `app/android/app/src/main/kotlin/com/kumpas/kumpas_app/SessionManager.kt`)
- Learner → Dataset preprocessing: provides sign data (evidence: `README.md`)
- Dataset preprocessing → Landmark augmentation: prepares landmarks (evidence: `README.md`)
- Landmark augmentation → Model training: augments examples (evidence: `README.md`)
- Model training → TFLite export: exports model (evidence: `README.md`)
- Feedback reference → Corrective feedback: guides parity (evidence: `training/feedback/feedback_engine.py`)
- TFLite export → Accuracy benchmark: evaluates model (evidence: `README.md`)
- Accuracy benchmark → Benchmark history: records results (evidence: `benchmarking/accuracy_benchmark.py`)
- Device benchmarks → Benchmark history: records measurements (evidence: `benchmarking/collect_latency.py`)
