# mrcreepson/clicker-rust architecture

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

- Interactive diagram: https://gitdiagram.com/mrcreepson/clicker-rust
- Repository: https://github.com/mrcreepson/clicker-rust

## Overview

clicker-rust is a Linux autoclicker with a Qt/QML interface. The user configures click and hotkey inputs, selects input devices, and starts or stops repeated key events; the app emits those events through a virtual input device. The graph separates UI, control and input/output responsibilities. Main-source excerpts show worker creation and device event handling; the QML file was not sampled, so its specific bindings to the backend are left unverified.

Main entry points: [`src/main.rs`](https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs) (QML backend), [`src/qml/Main.qml`](https://github.com/mrcreepson/clicker-rust/blob/main/src/qml/Main.qml) (QML interface), [`src/clicker/virtual_device.rs`](https://github.com/mrcreepson/clicker-rust/blob/main/src/clicker/virtual_device.rs) (Virtual mouse), [`src/clicker/autoclicker.rs`](https://github.com/mrcreepson/clicker-rust/blob/main/src/clicker/autoclicker.rs) (Click worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_qml["QML interface<br/>[Main.qml]"]
  node_app["Qt app entry<br/>[main.rs]"]
end

subgraph group_control["Clicker control"]
  node_backend["QML backend<br/>[main.rs]"]
  node_device_select["Device selection<br/>[main.rs]"]
  node_key_capture["Key capture<br/>[main.rs]"]
  node_hotkey_monitor["Hotkey monitor<br/>[main.rs]"]
  node_click_worker["Click worker<br/>[autoclicker.rs]"]
end

subgraph group_io["Input and output"]
  node_virtual_mouse["Virtual mouse<br/>[virtual_device.rs]"]
  node_physical_inputs["Physical input devices"]
  node_input_system["Linux input system"]
end

node_user(("User"))

node_user -->|"operates"| node_qml
node_app -->|"registers"| node_backend
node_app -->|"loads"| node_qml
node_qml -.->|"uses"| node_backend
node_backend -->|"provides"| node_device_select
node_backend -->|"arms"| node_key_capture
node_backend -->|"starts"| node_hotkey_monitor
node_backend -->|"starts"| node_click_worker
node_backend -->|"creates"| node_virtual_mouse
node_physical_inputs -->|"enumerated by"| node_device_select
node_physical_inputs -->|"read by"| node_key_capture
node_physical_inputs -->|"read by"| node_hotkey_monitor
node_click_worker -->|"emits events"| node_virtual_mouse
node_virtual_mouse -->|"creates device on"| node_input_system

click node_qml "https://github.com/mrcreepson/clicker-rust/blob/main/src/qml/Main.qml"
click node_app "https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs"
click node_backend "https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs"
click node_device_select "https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs"
click node_key_capture "https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs"
click node_hotkey_monitor "https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs"
click node_click_worker "https://github.com/mrcreepson/clicker-rust/blob/main/src/clicker/autoclicker.rs"
click node_virtual_mouse "https://github.com/mrcreepson/clicker-rust/blob/main/src/clicker/virtual_device.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_qml,node_app,node_user toneBlue
class node_backend,node_device_select,node_key_capture,node_hotkey_monitor,node_click_worker toneAmber
class node_virtual_mouse,node_physical_inputs,node_input_system toneMint
```

## Components

### User interface

- [QML interface](https://github.com/mrcreepson/clicker-rust/blob/main/src/qml/Main.qml): `src/qml/Main.qml`
- [Qt app entry](https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs): `src/main.rs`

### Clicker control

- [QML backend](https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs): `src/main.rs`
- [Device selection](https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs): `src/main.rs`
- [Key capture](https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs): `src/main.rs`
- [Hotkey monitor](https://github.com/mrcreepson/clicker-rust/blob/main/src/main.rs): `src/main.rs`
- [Click worker](https://github.com/mrcreepson/clicker-rust/blob/main/src/clicker/autoclicker.rs): `src/clicker/autoclicker.rs`

### Input and output

- [Virtual mouse](https://github.com/mrcreepson/clicker-rust/blob/main/src/clicker/virtual_device.rs): `src/clicker/virtual_device.rs`
- **Physical input devices**
- **Linux input system**

### Other components

- **User**

## Connections

- User → QML interface: operates (evidence: `README.md`)
- Qt app entry → QML backend: registers (evidence: `src/main.rs`)
- Qt app entry → QML interface: loads (evidence: `src/main.rs`)
- QML interface → QML backend: uses
- QML backend → Device selection: provides (evidence: `src/main.rs`)
- QML backend → Key capture: arms (evidence: `src/main.rs`)
- QML backend → Hotkey monitor: starts (evidence: `src/main.rs`)
- QML backend → Click worker: starts (evidence: `src/main.rs`)
- QML backend → Virtual mouse: creates (evidence: `src/main.rs`)
- Physical input devices → Device selection: enumerated by (evidence: `src/main.rs`)
- Physical input devices → Key capture: read by (evidence: `src/main.rs`)
- Physical input devices → Hotkey monitor: read by (evidence: `src/main.rs`)
- Click worker → Virtual mouse: emits events (evidence: `src/clicker/autoclicker.rs`)
- Virtual mouse → Linux input system: creates device on (evidence: `README.md`)
