# ahmadreza-log/simple-auto-clicker architecture

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

- Interactive diagram: https://gitdiagram.com/ahmadreza-log/simple-auto-clicker
- Repository: https://github.com/ahmadreza-log/simple-auto-clicker

## Overview

Simple Auto Clicker is a single-script keyboard-controlled mouse automation tool. The user presses configured hotkeys; the keyboard listener dispatches start, pause, quit, button-toggle, and speed-adjustment actions to a background clicker thread, which clicks through pynput’s mouse controller using the selected buttons and delay. The implementation is contained in main.py; the README documents the controls and minimum-delay protection. No separate domain modules or storage are present.

Main entry points: [`main.py`](https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py) (Clicker Thread)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_controls["Keyboard Controls"]
  node_hotkeys["Hotkey Handler<br/>[main.py]"]
  node_key_listener["Keyboard Listener<br/>[main.py]"]
  node_options["Click Options<br/>[main.py]"]
end

subgraph group_clicking["Click Execution"]
  node_clicker["Clicker Thread<br/>[main.py]"]
  node_mouse["Mouse Controller<br/>[main.py]"]
end

node_user(("User"))
node_pynput["pynput"]

node_user -->|"presses keys"| node_key_listener
node_key_listener -->|"dispatches presses"| node_hotkeys
node_hotkeys -->|"checks mappings"| node_options
node_hotkeys -->|"controls clicking"| node_clicker
node_clicker -->|"issues clicks"| node_mouse
node_clicker -->|"uses mouse API"| node_pynput
node_key_listener -->|"listens for keys"| node_pynput
node_options -->|"configures thread"| node_clicker

click node_hotkeys "https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py"
click node_key_listener "https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py"
click node_options "https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py"
click node_clicker "https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py"
click node_mouse "https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/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_hotkeys,node_key_listener,node_options,node_user toneBlue
class node_clicker,node_mouse toneAmber
class node_pynput toneIndigo
```

## Components

### Keyboard Controls

- [Hotkey Handler](https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py): `main.py`
- [Keyboard Listener](https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py): `main.py`
- [Click Options](https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py): `main.py`

### Click Execution

- [Clicker Thread](https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py): `main.py`
- [Mouse Controller](https://github.com/ahmadreza-log/simple-auto-clicker/blob/master/main.py): `main.py`

### Other components

- **User**
- **pynput**

## Connections

- User → Keyboard Listener: presses keys (evidence: `README.md`)
- Keyboard Listener → Hotkey Handler: dispatches presses (evidence: `main.py`)
- Hotkey Handler → Click Options: checks mappings (evidence: `main.py`)
- Hotkey Handler → Clicker Thread: controls clicking (evidence: `main.py`)
- Clicker Thread → Mouse Controller: issues clicks (evidence: `main.py`)
- Clicker Thread → pynput: uses mouse API (evidence: `main.py`)
- Keyboard Listener → pynput: listens for keys (evidence: `main.py`)
- Click Options → Clicker Thread: configures thread (evidence: `main.py`)
