# jhazewindus/auto-maplev2 architecture

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

- Interactive diagram: https://gitdiagram.com/jhazewindus/auto-maplev2
- Repository: https://github.com/jhazewindus/auto-maplev2

## Overview

Auto Maple is a desktop bot that automates MapleStory play. The user loads a class-specific command book and a map routine; the bot interprets routine components, tracks the player from captured game frames, navigates between points, and issues simulated inputs. Separate capabilities include rune solving and a GUI for monitoring, editing routines, changing settings, and loading resources. The README documents these features, while several implementation links—especially capture and rune-inference internals—are not shown in the excerpts, so those relationships are omitted or marked unverified.

Main entry points: [`src/modules/bot.py`](https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/bot.py) (Bot Interpreter), [`src/routine/components.py`](https://github.com/jhazewindus/auto-maplev2/blob/main/src/routine/components.py) (Routine Components), [`main.py`](https://github.com/jhazewindus/auto-maplev2/blob/main/main.py) (Application Entry), [`src/gui`](https://github.com/jhazewindus/auto-maplev2/tree/main/src/gui) (GUI Tabs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot Runtime"]
  node_entry["Application Entry<br/>[main.py]"]
  node_bot["Bot Interpreter<br/>[bot.py]"]
  node_capture["Frame Capture<br/>[capture.py]"]
  node_listener["Keyboard Listener<br/>[listener.py]"]
  node_notifier["Notifier<br/>[notifier.py]"]
end

subgraph group_domain["Play Logic"]
  node_detection["Vision Detection<br/>[detection.py]"]
  node_routine["Routine Compiler<br/>[routine.py]"]
  node_components["Routine Components<br/>[components.py]"]
  node_layout["Minimap Layout<br/>[layout.py]"]
  node_commandbook["Command Books<br/>[command_book.py]"]
end

subgraph group_interface["Desktop Interface"]
  node_guihost["GUI Host<br/>[gui.py]"]
  node_gui["GUI Tabs"]
  node_editor["Routine Editor<br/>[main.py]"]
  node_menus["Resource Menus"]
  node_settingsui["Settings Panel<br/>[main.py]"]
  node_viewer["Routine Viewer<br/>[main.py]"]
end

subgraph group_shared["Shared Services"]
  node_keys["Simulated Inputs<br/>[vkeys.py]"]
  node_config["Shared Runtime State<br/>[config.py]"]
  node_settings["Runtime Settings<br/>[settings.py]"]
end

node_player(("Player"))
node_game["MapleStory"]

node_player -.->|"starts app"| node_entry
node_entry -->|"starts"| node_bot
node_entry -->|"starts"| node_capture
node_entry -->|"starts"| node_listener
node_entry -->|"starts"| node_notifier
node_entry -->|"starts"| node_guihost
node_guihost -->|"creates"| node_gui
node_gui -->|"creates"| node_menus
node_gui -->|"creates"| node_viewer
node_gui -->|"creates"| node_editor
node_gui -->|"creates"| node_settingsui
node_bot -->|"loads"| node_routine
node_bot -->|"loads"| node_commandbook
node_bot -->|"uses"| node_detection
node_routine -->|"builds"| node_components
node_routine -->|"uses"| node_layout
node_bot -->|"executes"| node_components
node_components -->|"simulates keys"| node_keys
node_bot -->|"presses keys"| node_keys
node_components -->|"plans movement"| node_layout
node_capture -.->|"supplies frames"| node_detection
node_detection -.->|"reports position"| node_bot
node_bot -->|"controls"| node_game
node_game -.->|"provides frames"| node_capture
node_bot -->|"updates state"| node_config
node_components -->|"reads settings"| node_settings
node_editor -->|"edits components"| node_components
node_menus -.->|"loads resources"| node_commandbook
node_menus -.->|"loads routines"| node_routine
node_settingsui -->|"edits bindings"| node_config
node_viewer -->|"displays routine"| node_components
node_notifier -.->|"observes events"| node_components

click node_entry "https://github.com/jhazewindus/auto-maplev2/blob/main/main.py"
click node_bot "https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/bot.py"
click node_capture "https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/capture.py"
click node_listener "https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/listener.py"
click node_notifier "https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/notifier.py"
click node_detection "https://github.com/jhazewindus/auto-maplev2/blob/main/src/detection/detection.py"
click node_routine "https://github.com/jhazewindus/auto-maplev2/blob/main/src/routine/routine.py"
click node_components "https://github.com/jhazewindus/auto-maplev2/blob/main/src/routine/components.py"
click node_layout "https://github.com/jhazewindus/auto-maplev2/blob/main/src/routine/layout.py"
click node_commandbook "https://github.com/jhazewindus/auto-maplev2/blob/main/src/command_book/command_book.py"
click node_keys "https://github.com/jhazewindus/auto-maplev2/blob/main/src/common/vkeys.py"
click node_config "https://github.com/jhazewindus/auto-maplev2/blob/main/src/common/config.py"
click node_settings "https://github.com/jhazewindus/auto-maplev2/blob/main/src/common/settings.py"
click node_guihost "https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/gui.py"
click node_gui "https://github.com/jhazewindus/auto-maplev2/tree/main/src/gui"
click node_editor "https://github.com/jhazewindus/auto-maplev2/blob/main/src/gui/edit/main.py"
click node_menus "https://github.com/jhazewindus/auto-maplev2/tree/main/src/gui/menu"
click node_settingsui "https://github.com/jhazewindus/auto-maplev2/blob/main/src/gui/settings/main.py"
click node_viewer "https://github.com/jhazewindus/auto-maplev2/blob/main/src/gui/view/main.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_entry,node_bot,node_capture,node_listener,node_notifier toneBlue
class node_detection,node_routine,node_components,node_layout,node_commandbook toneAmber
class node_guihost,node_gui,node_editor,node_menus,node_settingsui,node_viewer toneMint
class node_keys,node_config,node_settings toneRose
class node_player,node_game toneIndigo
```

## Components

### Bot Runtime

- [Application Entry](https://github.com/jhazewindus/auto-maplev2/blob/main/main.py): `main.py`
- [Bot Interpreter](https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/bot.py): `src/modules/bot.py`
- [Frame Capture](https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/capture.py): `src/modules/capture.py`
- [Keyboard Listener](https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/listener.py): `src/modules/listener.py`
- [Notifier](https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/notifier.py): `src/modules/notifier.py`

### Play Logic

- [Vision Detection](https://github.com/jhazewindus/auto-maplev2/blob/main/src/detection/detection.py): `src/detection/detection.py`
- [Routine Compiler](https://github.com/jhazewindus/auto-maplev2/blob/main/src/routine/routine.py): `src/routine/routine.py`
- [Routine Components](https://github.com/jhazewindus/auto-maplev2/blob/main/src/routine/components.py): `src/routine/components.py`
- [Minimap Layout](https://github.com/jhazewindus/auto-maplev2/blob/main/src/routine/layout.py): `src/routine/layout.py`
- [Command Books](https://github.com/jhazewindus/auto-maplev2/blob/main/src/command_book/command_book.py): `src/command_book/command_book.py`

### Desktop Interface

- [GUI Host](https://github.com/jhazewindus/auto-maplev2/blob/main/src/modules/gui.py): `src/modules/gui.py`
- [GUI Tabs](https://github.com/jhazewindus/auto-maplev2/tree/main/src/gui): `src/gui`
- [Routine Editor](https://github.com/jhazewindus/auto-maplev2/blob/main/src/gui/edit/main.py): `src/gui/edit/main.py`
- [Resource Menus](https://github.com/jhazewindus/auto-maplev2/tree/main/src/gui/menu): `src/gui/menu`
- [Settings Panel](https://github.com/jhazewindus/auto-maplev2/blob/main/src/gui/settings/main.py): `src/gui/settings/main.py`
- [Routine Viewer](https://github.com/jhazewindus/auto-maplev2/blob/main/src/gui/view/main.py): `src/gui/view/main.py`

### Shared Services

- [Simulated Inputs](https://github.com/jhazewindus/auto-maplev2/blob/main/src/common/vkeys.py): `src/common/vkeys.py`
- [Shared Runtime State](https://github.com/jhazewindus/auto-maplev2/blob/main/src/common/config.py): `src/common/config.py`
- [Runtime Settings](https://github.com/jhazewindus/auto-maplev2/blob/main/src/common/settings.py): `src/common/settings.py`

### Other components

- **Player**
- **MapleStory**

## Connections

- Player → Application Entry: starts app
- Application Entry → Bot Interpreter: starts (evidence: `main.py`)
- Application Entry → Frame Capture: starts (evidence: `main.py`)
- Application Entry → Keyboard Listener: starts (evidence: `main.py`)
- Application Entry → Notifier: starts (evidence: `main.py`)
- Application Entry → GUI Host: starts (evidence: `main.py`)
- GUI Host → GUI Tabs: creates (evidence: `src/modules/gui.py`)
- GUI Tabs → Resource Menus: creates (evidence: `src/gui/menu/main.py`)
- GUI Tabs → Routine Viewer: creates (evidence: `src/gui/view/main.py`)
- GUI Tabs → Routine Editor: creates (evidence: `src/gui/edit/main.py`)
- GUI Tabs → Settings Panel: creates (evidence: `src/gui/settings/main.py`)
- Bot Interpreter → Routine Compiler: loads (evidence: `src/modules/bot.py`)
- Bot Interpreter → Command Books: loads (evidence: `src/modules/bot.py`)
- Bot Interpreter → Vision Detection: uses (evidence: `src/modules/bot.py`)
- Routine Compiler → Routine Components: builds (evidence: `README.md`)
- Routine Compiler → Minimap Layout: uses (evidence: `src/routine/routine.py`)
- Bot Interpreter → Routine Components: executes (evidence: `src/modules/bot.py`)
- Routine Components → Simulated Inputs: simulates keys (evidence: `src/routine/components.py`)
- Bot Interpreter → Simulated Inputs: presses keys (evidence: `src/modules/bot.py`)
- Routine Components → Minimap Layout: plans movement (evidence: `src/routine/components.py`)
- Frame Capture → Vision Detection: supplies frames
- Vision Detection → Bot Interpreter: reports position (evidence: `src/modules/bot.py`)
- Bot Interpreter → MapleStory: controls (evidence: `README.md`)
- MapleStory → Frame Capture: provides frames
- Bot Interpreter → Shared Runtime State: updates state (evidence: `src/modules/bot.py`)
- Routine Components → Runtime Settings: reads settings (evidence: `src/routine/components.py`)
- Routine Editor → Routine Components: edits components (evidence: `src/gui/edit/main.py`)
- Resource Menus → Command Books: loads resources
- Resource Menus → Routine Compiler: loads routines
- Settings Panel → Shared Runtime State: edits bindings (evidence: `src/gui/settings/main.py`)
- Routine Viewer → Routine Components: displays routine (evidence: `src/gui/view/main.py`)
- Notifier → Routine Components: observes events (evidence: `src/modules/notifier.py`)
