# sidharth-prabhu/autotypex architecture

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

- Interactive diagram: https://gitdiagram.com/sidharth-prabhu/autotypex
- Repository: https://github.com/sidharth-prabhu/autotypex

## Overview

AutoTypeX is a desktop auto-typing tool with both a text-file command-line workflow and a Tkinter GUI. The main workflow loads or prepares text, waits for the user to focus a target application, then types with simulated typos and corrections. The GUI also offers Gemini code generation and help/update actions. The README documents keystroke delivery through PyAutoGUI; GUI excerpts are partial, so links for unsampled behavior are omitted.

Main entry points: [`typexgui.py`](https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py) (GUI App), [`autotypex.py`](https://github.com/sidharth-prabhu/autotypex/blob/main/autotypex.py) (File Runner), [`content.txt`](https://github.com/sidharth-prabhu/autotypex/blob/main/content.txt) (Input Text)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_file_typing["File Typing"]
  node_content_file["Input Text<br/>[content.txt]"]
  node_file_runner["File Runner<br/>[autotypex.py]"]
  node_file_reader["File Reader<br/>[autotypex.py]"]
  node_file_typer["Typer<br/>[autotypex.py]"]
end

subgraph group_gui_typing["GUI Typing"]
  node_gui_app["GUI App<br/>[typexgui.py]"]
  node_gui_editor["Text Editor<br/>[typexgui.py]"]
  node_typing_thread["Typing Worker<br/>[typexgui.py]"]
  node_gui_typer["Typer<br/>[typexgui.py]"]
end

subgraph group_gui_services["GUI Services"]
  node_code_generation["Code Generation<br/>[typexgui.py]"]
  node_update_check["Update Check<br/>[typexgui.py]"]
  node_help_actions["Help Actions<br/>[typexgui.py]"]
end

node_user(("User"))
node_target_app["Focused App"]
node_pyautogui["PyAutoGUI"]
node_gemini["Gemini API"]
node_github["GitHub Releases"]
node_browser["Web Browser"]

node_user -->|"prepares text"| node_content_file
node_content_file -->|"read by"| node_file_reader
node_file_runner -->|"calls"| node_file_reader
node_file_runner -->|"calls"| node_file_typer
node_file_typer -->|"sends keystrokes"| node_pyautogui
node_pyautogui -->|"types into"| node_target_app
node_user -->|"starts and operates"| node_gui_app
node_gui_app -->|"provides input"| node_gui_editor
node_gui_editor -->|"text read by"| node_typing_thread
node_typing_thread -->|"calls"| node_gui_typer
node_gui_typer -->|"sends keystrokes"| node_pyautogui
node_code_generation -->|"requests code"| node_gemini
node_code_generation -->|"fills with code"| node_gui_editor
node_gui_app -->|"offers action"| node_code_generation
node_gui_app -->|"offers action"| node_update_check
node_update_check -->|"checks releases"| node_github
node_update_check -->|"opens release page"| node_browser
node_gui_app -->|"offers actions"| node_help_actions
node_help_actions -->|"opens Firefox site"| node_browser

click node_content_file "https://github.com/sidharth-prabhu/autotypex/blob/main/content.txt"
click node_file_runner "https://github.com/sidharth-prabhu/autotypex/blob/main/autotypex.py"
click node_file_reader "https://github.com/sidharth-prabhu/autotypex/blob/main/autotypex.py"
click node_file_typer "https://github.com/sidharth-prabhu/autotypex/blob/main/autotypex.py"
click node_gui_app "https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py"
click node_gui_editor "https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py"
click node_typing_thread "https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py"
click node_gui_typer "https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py"
click node_code_generation "https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py"
click node_update_check "https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py"
click node_help_actions "https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.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_content_file,node_file_runner,node_file_reader,node_file_typer,node_user,node_pyautogui,node_browser toneBlue
class node_gui_app,node_gui_editor,node_typing_thread,node_gui_typer toneAmber
class node_code_generation,node_update_check,node_help_actions,node_gemini toneMint
class node_target_app,node_github toneIndigo
```

## Components

### File Typing

- [Input Text](https://github.com/sidharth-prabhu/autotypex/blob/main/content.txt): `content.txt`
- [File Runner](https://github.com/sidharth-prabhu/autotypex/blob/main/autotypex.py): `autotypex.py`
- [File Reader](https://github.com/sidharth-prabhu/autotypex/blob/main/autotypex.py): `autotypex.py`
- [Typer](https://github.com/sidharth-prabhu/autotypex/blob/main/autotypex.py): `autotypex.py`

### GUI Typing

- [GUI App](https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py): `typexgui.py`
- [Text Editor](https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py): `typexgui.py`
- [Typing Worker](https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py): `typexgui.py`
- [Typer](https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py): `typexgui.py`

### GUI Services

- [Code Generation](https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py): `typexgui.py`
- [Update Check](https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py): `typexgui.py`
- [Help Actions](https://github.com/sidharth-prabhu/autotypex/blob/main/typexgui.py): `typexgui.py`

### Other components

- **User**
- **Focused App**
- **PyAutoGUI**
- **Gemini API**
- **GitHub Releases**
- **Web Browser**

## Connections

- User → Input Text: prepares text (evidence: `README.md`)
- Input Text → File Reader: read by (evidence: `autotypex.py`)
- File Runner → File Reader: calls (evidence: `autotypex.py`)
- File Runner → Typer: calls (evidence: `autotypex.py`)
- Typer → PyAutoGUI: sends keystrokes (evidence: `README.md`)
- PyAutoGUI → Focused App: types into (evidence: `README.md`)
- User → GUI App: starts and operates (evidence: `README.md`)
- GUI App → Text Editor: provides input (evidence: `typexgui.py`)
- Text Editor → Typing Worker: text read by (evidence: `typexgui.py`)
- Typing Worker → Typer: calls (evidence: `typexgui.py`)
- Typer → PyAutoGUI: sends keystrokes (evidence: `README.md`)
- Code Generation → Gemini API: requests code (evidence: `typexgui.py`)
- Code Generation → Text Editor: fills with code (evidence: `typexgui.py`)
- GUI App → Code Generation: offers action (evidence: `typexgui.py`)
- GUI App → Update Check: offers action (evidence: `typexgui.py`)
- Update Check → GitHub Releases: checks releases (evidence: `typexgui.py`)
- Update Check → Web Browser: opens release page (evidence: `typexgui.py`)
- GUI App → Help Actions: offers actions (evidence: `typexgui.py`)
- Help Actions → Web Browser: opens Firefox site (evidence: `typexgui.py`)
