# rajashekarrj/human-typer architecture

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

- Interactive diagram: https://gitdiagram.com/rajashekarrj/human-typer
- Repository: https://github.com/rajashekarrj/human-typer

## Overview

Human Typer is a Windows desktop app for composing text and delivering it to another application with human-like keystroke timing. Users edit text and configure a profile in the WebView UI; the controller coordinates a run, which schedules key events and sends them through either background window messaging or real focused-window input. The README also documents global shortcuts, profile persistence, LDPlayer support, tray controls and desktop progress/completion feedback. Some relationships are documented or indexed rather than visible in the partial excerpts, so uncertain links are omitted.

Main entry points: [`humantyper/app.py`](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/app.py) (Session controller), [`humantyper/__main__.py`](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/__main__.py) (App startup), [`humantyper/targeting.py`](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/targeting.py) (Window targeting), [`humantyper/ldplayer.py`](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/ldplayer.py) (LDPlayer delivery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and shell"]
  node_launch["App startup<br/>[__main__.py]"]
  node_instance["Single instance<br/>[single_instance.py]"]
end

subgraph group_workspace["Typing workspace"]
  node_ui["Typing UI<br/>[index.html]"]
  node_controller["Session controller<br/>[app.py]"]
  node_profiles[("Profiles and settings<br/>[profiles.py]")]
end

subgraph group_delivery["Typing and delivery"]
  node_engine["Timing engine<br/>[engine.py]"]
  node_runner["Typing session<br/>[runner.py]"]
  node_targeting["Window targeting<br/>[targeting.py]"]
  node_keyboard["Real key input<br/>[keyboard.py]"]
  node_ldplayer["LDPlayer delivery<br/>[ldplayer.py]"]
end

subgraph group_windows["Windows integration"]
  node_hotkeys["Global shortcuts<br/>[hotkeys.py]"]
  node_tray["System tray<br/>[tray.py]"]
  node_feedback["Desktop feedback<br/>[desktop.py]"]
  node_icons["Window icons<br/>[winicons.py]"]
  node_logo["App icon artwork<br/>[logo.py]"]
end

node_user(("User"))
node_target["Destination window"]

node_user -->|"launches"| node_launch
node_launch -->|"checks instance"| node_instance
node_launch -->|"starts app"| node_controller
node_user -->|"edits text"| node_ui
node_ui -->|"sends UI actions"| node_controller
node_controller -->|"loads settings"| node_profiles
node_controller -->|"estimates timing"| node_engine
node_controller -->|"starts session"| node_runner
node_runner -->|"plans keystrokes"| node_engine
node_controller -->|"selects background target"| node_targeting
node_controller -->|"sets up real input"| node_keyboard
node_controller -->|"selects emulator route"| node_ldplayer
node_targeting -->|"sends background text"| node_target
node_keyboard -->|"sends real keys"| node_target
node_ldplayer -->|"routes emulator input"| node_target
node_controller -->|"configures shortcuts"| node_hotkeys
node_controller -->|"controls visibility"| node_tray
node_controller -->|"updates progress"| node_feedback
node_targeting -->|"loads window icons"| node_icons
node_ldplayer -->|"resolves process path"| node_icons
node_tray -->|"renders tray icon"| node_logo
node_feedback -->|"uses app artwork"| node_logo

click node_launch "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/__main__.py"
click node_instance "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/single_instance.py"
click node_ui "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/web/index.html"
click node_controller "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/app.py"
click node_profiles "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/profiles.py"
click node_engine "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/engine.py"
click node_runner "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/runner.py"
click node_targeting "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/targeting.py"
click node_keyboard "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/keyboard.py"
click node_ldplayer "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/ldplayer.py"
click node_hotkeys "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/hotkeys.py"
click node_tray "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/tray.py"
click node_feedback "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/desktop.py"
click node_icons "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/winicons.py"
click node_logo "https://github.com/rajashekarrj/human-typer/blob/master/humantyper/logo.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_launch,node_instance,node_user toneBlue
class node_ui,node_controller,node_profiles toneAmber
class node_engine,node_runner,node_targeting,node_keyboard,node_ldplayer toneMint
class node_hotkeys,node_tray,node_feedback,node_icons,node_logo toneRose
class node_target toneIndigo
```

## Components

### Startup and shell

- [App startup](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/__main__.py): `humantyper/__main__.py`
- [Single instance](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/single_instance.py): `humantyper/single_instance.py`

### Typing workspace

- [Typing UI](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/web/index.html): `humantyper/web/index.html`
- [Session controller](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/app.py): `humantyper/app.py`
- [Profiles and settings](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/profiles.py): `humantyper/profiles.py`

### Typing and delivery

- [Timing engine](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/engine.py): `humantyper/engine.py`
- [Typing session](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/runner.py): `humantyper/runner.py`
- [Window targeting](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/targeting.py): `humantyper/targeting.py`
- [Real key input](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/keyboard.py): `humantyper/keyboard.py`
- [LDPlayer delivery](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/ldplayer.py): `humantyper/ldplayer.py`

### Windows integration

- [Global shortcuts](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/hotkeys.py): `humantyper/hotkeys.py`
- [System tray](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/tray.py): `humantyper/tray.py`
- [Desktop feedback](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/desktop.py): `humantyper/desktop.py`
- [Window icons](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/winicons.py): `humantyper/winicons.py`
- [App icon artwork](https://github.com/rajashekarrj/human-typer/blob/master/humantyper/logo.py): `humantyper/logo.py`

### Other components

- **User**
- **Destination window**

## Connections

- User → App startup: launches (evidence: `README.md`)
- App startup → Single instance: checks instance (evidence: `humantyper/__main__.py`)
- App startup → Session controller: starts app (evidence: `humantyper/__main__.py`)
- User → Typing UI: edits text (evidence: `README.md`)
- Typing UI → Session controller: sends UI actions (evidence: `humantyper/app.py`)
- Session controller → Profiles and settings: loads settings (evidence: `humantyper/app.py`)
- Session controller → Timing engine: estimates timing (evidence: `humantyper/app.py`)
- Session controller → Typing session: starts session (evidence: `humantyper/app.py`)
- Typing session → Timing engine: plans keystrokes (evidence: `humantyper/runner.py`)
- Session controller → Window targeting: selects background target (evidence: `humantyper/app.py`)
- Session controller → Real key input: sets up real input (evidence: `humantyper/app.py`)
- Session controller → LDPlayer delivery: selects emulator route (evidence: `humantyper/app.py`)
- Window targeting → Destination window: sends background text (evidence: `README.md`)
- Real key input → Destination window: sends real keys (evidence: `README.md`)
- LDPlayer delivery → Destination window: routes emulator input (evidence: `README.md`)
- Session controller → Global shortcuts: configures shortcuts (evidence: `humantyper/app.py`)
- Session controller → System tray: controls visibility (evidence: `humantyper/app.py`)
- Session controller → Desktop feedback: updates progress (evidence: `humantyper/app.py`)
- Window targeting → Window icons: loads window icons (evidence: `humantyper/targeting.py`)
- LDPlayer delivery → Window icons: resolves process path (evidence: `humantyper/ldplayer.py`)
- System tray → App icon artwork: renders tray icon (evidence: `humantyper/tray.py`)
- Desktop feedback → App icon artwork: uses app artwork (evidence: `humantyper/desktop.py`)
