# kawaakar1/noveltl architecture

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

- Interactive diagram: https://gitdiagram.com/kawaakar1/noveltl
- Repository: https://github.com/kawaakar1/noveltl

## Overview

NovelTL captures dialogue from a running visual novel, translates it, and displays it in an overlay; it also provides a game library, setup, Japanese-learning tools, and app controls. The graph combines explicit README capabilities with the sampled controller, UI, and translation code. Some subsystems are represented at their exact source paths but were not sampled, so their internal links are shown only where documented or directly evidenced.

Main entry points: [`noveltl-rs/noveltl/src/controller.rs`](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/controller.rs) (Session controller), [`noveltl-rs/noveltl-core/src/pipeline.rs`](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/pipeline.rs) (Translation pipeline), [`noveltl-rs/noveltl/src/ui/mod.rs`](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/mod.rs) (Application UI), [`noveltl-rs/noveltl-core/src/translators.rs`](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/translators.rs) (Translation engines)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and overlay"]
  node_controller["Session controller<br/>[controller.rs]"]
  node_hook["LunaHook source<br/>[lunahost.rs]"]
  node_ocr["Screen OCR<br/>[ocr.rs]"]
  node_clipboard["Clipboard source<br/>[clipboard.rs]"]
  node_overlay["Translation overlay<br/>[overlay.rs]"]
end

subgraph group_translation["Translation core"]
  node_pipeline["Translation pipeline<br/>[pipeline.rs]"]
  node_cleaner["Text cleanup<br/>[cleaner.rs]"]
  node_language["Language detection<br/>[langdetect.rs]"]
  node_translators["Translation engines<br/>[translators.rs]"]
  node_cache[("Translation cache<br/>[cache.rs]")]
  node_network["Network settings<br/>[net.rs]"]
end

subgraph group_library["Library and learning"]
  node_library_ui["Game library<br/>[main_window.rs]"]
  node_profiles[("Game profiles<br/>[profiles.rs]")]
  node_vndb["VNDB artwork<br/>[vndb.rs]"]
  node_glossary["Glossary<br/>[glossary.rs]"]
  node_dictionary["Japanese dictionary<br/>[dict.rs]"]
  node_anki["Anki export<br/>[anki.rs]"]
end

subgraph group_app["App interface"]
  node_app_ui["Application UI<br/>[mod.rs]"]
  node_settings["Settings window<br/>[settings.rs]"]
  node_wizard["Setup wizard<br/>[wizard.rs]"]
  node_hotkeys["Hotkeys<br/>[hotkeys.rs]"]
  node_tray["System tray<br/>[tray.rs]"]
  node_theme["Themes and style<br/>[theme.rs]"]
  node_updates["Update checks<br/>[updates.rs]"]
end

node_player(("Player"))
node_game["Running game"]
node_external_translators["Translation services"]

node_player -->|"plays"| node_game
node_game -.->|"provides dialogue"| node_hook
node_hook -->|"sends text events"| node_controller
node_ocr -->|"provides recognized text"| node_controller
node_clipboard -->|"provides copied text"| node_controller
node_controller -.->|"translates dialogue"| node_pipeline
node_controller -.->|"updates overlay"| node_overlay
node_pipeline -->|"cleans text"| node_cleaner
node_pipeline -->|"resolves language"| node_language
node_pipeline -->|"dispatches translation"| node_translators
node_pipeline -->|"uses cache"| node_cache
node_translators -->|"reads and writes"| node_cache
node_translators -.->|"requests translations"| node_external_translators
node_settings -.->|"configures access"| node_network
node_library_ui -.->|"manages games"| node_profiles
node_controller -.->|"loads game profile"| node_profiles
node_controller -->|"fetches artwork"| node_vndb
node_player -->|"edits terms"| node_glossary
node_glossary -.->|"supplies term rules"| node_pipeline
node_player -->|"looks up words"| node_dictionary
node_player -->|"adds dialogue"| node_anki
node_app_ui -->|"polls session"| node_controller
node_app_ui -->|"opens window"| node_settings
node_app_ui -->|"opens setup"| node_wizard
node_settings -->|"previews style"| node_theme
node_player -->|"uses shortcuts"| node_hotkeys
node_player -->|"uses tray controls"| node_tray
node_app_ui -.->|"shows notices"| node_updates

click node_controller "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/controller.rs"
click node_hook "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/lunahost.rs"
click node_ocr "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ocr.rs"
click node_clipboard "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/clipboard.rs"
click node_overlay "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/overlay.rs"
click node_pipeline "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/pipeline.rs"
click node_cleaner "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/cleaner.rs"
click node_language "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/langdetect.rs"
click node_translators "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/translators.rs"
click node_cache "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/cache.rs"
click node_network "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/net.rs"
click node_library_ui "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/main_window.rs"
click node_profiles "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/profiles.rs"
click node_vndb "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/vndb.rs"
click node_glossary "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/glossary.rs"
click node_dictionary "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/dict.rs"
click node_anki "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/anki.rs"
click node_app_ui "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/mod.rs"
click node_settings "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/settings.rs"
click node_wizard "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/wizard.rs"
click node_hotkeys "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/hotkeys.rs"
click node_tray "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/tray.rs"
click node_theme "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/theme.rs"
click node_updates "https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/updates.rs"

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_controller,node_hook,node_ocr,node_clipboard,node_overlay toneBlue
class node_pipeline,node_cleaner,node_language,node_translators,node_cache,node_network toneAmber
class node_library_ui,node_profiles,node_vndb,node_glossary,node_dictionary,node_anki toneMint
class node_app_ui,node_settings,node_wizard,node_hotkeys,node_tray,node_theme,node_updates toneRose
class node_player,node_game,node_external_translators toneIndigo
```

## Components

### Capture and overlay

- [Session controller](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/controller.rs): `noveltl-rs/noveltl/src/controller.rs`
- [LunaHook source](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/lunahost.rs): `noveltl-rs/noveltl/src/lunahost.rs`
- [Screen OCR](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ocr.rs): `noveltl-rs/noveltl/src/ocr.rs`
- [Clipboard source](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/clipboard.rs): `noveltl-rs/noveltl/src/clipboard.rs`
- [Translation overlay](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/overlay.rs): `noveltl-rs/noveltl/src/overlay.rs`

### Translation core

- [Translation pipeline](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/pipeline.rs): `noveltl-rs/noveltl-core/src/pipeline.rs`
- [Text cleanup](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/cleaner.rs): `noveltl-rs/noveltl-core/src/cleaner.rs`
- [Language detection](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/langdetect.rs): `noveltl-rs/noveltl-core/src/langdetect.rs`
- [Translation engines](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/translators.rs): `noveltl-rs/noveltl-core/src/translators.rs`
- [Translation cache](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/cache.rs): `noveltl-rs/noveltl-core/src/cache.rs`
- [Network settings](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/net.rs): `noveltl-rs/noveltl-core/src/net.rs`

### Library and learning

- [Game library](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/main_window.rs): `noveltl-rs/noveltl/src/ui/main_window.rs`
- [Game profiles](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/profiles.rs): `noveltl-rs/noveltl-core/src/profiles.rs`
- [VNDB artwork](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/vndb.rs): `noveltl-rs/noveltl-core/src/vndb.rs`
- [Glossary](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/glossary.rs): `noveltl-rs/noveltl/src/ui/glossary.rs`
- [Japanese dictionary](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/dict.rs): `noveltl-rs/noveltl-core/src/dict.rs`
- [Anki export](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/anki.rs): `noveltl-rs/noveltl-core/src/anki.rs`

### App interface

- [Application UI](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/mod.rs): `noveltl-rs/noveltl/src/ui/mod.rs`
- [Settings window](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/settings.rs): `noveltl-rs/noveltl/src/ui/settings.rs`
- [Setup wizard](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/wizard.rs): `noveltl-rs/noveltl/src/ui/wizard.rs`
- [Hotkeys](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/hotkeys.rs): `noveltl-rs/noveltl/src/hotkeys.rs`
- [System tray](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/tray.rs): `noveltl-rs/noveltl/src/tray.rs`
- [Themes and style](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl/src/ui/theme.rs): `noveltl-rs/noveltl/src/ui/theme.rs`
- [Update checks](https://github.com/kawaakar1/noveltl/blob/main/noveltl-rs/noveltl-core/src/updates.rs): `noveltl-rs/noveltl-core/src/updates.rs`

### Other components

- **Player**
- **Running game**
- **Translation services**

## Connections

- Player → Running game: plays
- Running game → LunaHook source: provides dialogue
- LunaHook source → Session controller: sends text events (evidence: `noveltl-rs/noveltl/src/controller.rs`)
- Screen OCR → Session controller: provides recognized text (evidence: `noveltl-rs/noveltl/src/controller.rs`)
- Clipboard source → Session controller: provides copied text (evidence: `noveltl-rs/noveltl/src/controller.rs`)
- Session controller → Translation pipeline: translates dialogue
- Session controller → Translation overlay: updates overlay (evidence: `noveltl-rs/noveltl/src/controller.rs`)
- Translation pipeline → Text cleanup: cleans text (evidence: `noveltl-rs/noveltl-core/src/pipeline.rs`)
- Translation pipeline → Language detection: resolves language (evidence: `noveltl-rs/noveltl-core/src/pipeline.rs`)
- Translation pipeline → Translation engines: dispatches translation (evidence: `noveltl-rs/noveltl-core/src/pipeline.rs`)
- Translation pipeline → Translation cache: uses cache (evidence: `noveltl-rs/noveltl-core/src/pipeline.rs`)
- Translation engines → Translation cache: reads and writes (evidence: `noveltl-rs/noveltl-core/src/translators.rs`)
- Translation engines → Translation services: requests translations
- Settings window → Network settings: configures access
- Game library → Game profiles: manages games
- Session controller → Game profiles: loads game profile
- Session controller → VNDB artwork: fetches artwork (evidence: `noveltl-rs/noveltl/src/controller.rs`)
- Player → Glossary: edits terms
- Glossary → Translation pipeline: supplies term rules
- Player → Japanese dictionary: looks up words
- Player → Anki export: adds dialogue
- Application UI → Session controller: polls session (evidence: `noveltl-rs/noveltl/src/ui/mod.rs`)
- Application UI → Settings window: opens window (evidence: `noveltl-rs/noveltl/src/ui/mod.rs`)
- Application UI → Setup wizard: opens setup (evidence: `noveltl-rs/noveltl/src/ui/mod.rs`)
- Settings window → Themes and style: previews style (evidence: `noveltl-rs/noveltl/src/ui/settings.rs`)
- Player → Hotkeys: uses shortcuts
- Player → System tray: uses tray controls
- Application UI → Update checks: shows notices
