# stuffanthings/qbit_manage architecture

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

- Interactive diagram: https://gitdiagram.com/stuffanthings/qbit_manage
- Repository: https://github.com/stuffanthings/qbit_manage

## Overview

qBit Manage is a qBittorrent maintenance and automation tool, with both command-line and web control surfaces. A configured run applies torrent and filesystem-management operations, then can report outcomes through notifications; the README documents tagging, categorization, rechecking, cleanup, share limits, and recycle-bin behavior. The web UI configures and monitors the service through its API. The graph preserves documented capabilities even where implementation details were not sampled; those relationships are cited to the README, and uncertain internal links are omitted.

Main entry points: [`qbit_manage.py`](https://github.com/stuffanthings/qbit_manage/blob/develop/qbit_manage.py) (CLI runner), [`web-ui/js/app.js`](https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/app.js) (Web interface), [`modules/config.py`](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/config.py) (Configuration), [`modules/core/share_limits.py`](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/share_limits.py) (Share limits)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Management runtime"]
  node_entry["CLI runner<br/>[qbit_manage.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_scheduler["Scheduler<br/>[scheduler.py]"]
  node_errors["API error handler"]
end

subgraph group_operations["Torrent operations"]
  node_category["Categories<br/>[category.py]"]
  node_tags["Tracker tags<br/>[tags.py]"]
  node_recheck["Torrent recheck<br/>[recheck.py]"]
  node_unregistered["Unregistered cleanup"]
  node_orphaned["Orphan cleanup<br/>[remove_orphaned.py]"]
  node_hardlinks["Hardlink tagging<br/>[tag_nohardlinks.py]"]
  node_sharelimits["Share limits<br/>[share_limits.py]"]
end

subgraph group_web["Web control"]
  node_webapi["Web API<br/>[web_api.py]"]
  node_webui["Web interface<br/>[app.js]"]
  node_apiclient["API client<br/>[api.js]"]
  node_settings["Config editor<br/>[config-form.js]"]
  node_commands["Command controls<br/>[command-panel.js]"]
  node_logs["Log viewer<br/>[log-viewer.js]"]
end

subgraph group_integrations["External services"]
  node_webhooks["Webhook notifications<br/>[webhooks.py]"]
  node_notifiarr["Notifiarr<br/>[notifiarr.py]"]
  node_apprise["Apprise<br/>[apprise.py]"]
  node_qbt[("qBittorrent")]
  node_filesystem[("Torrent files")]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_entry
node_entry -->|"initializes"| node_config
node_entry -->|"starts"| node_scheduler
node_entry -->|"dispatches"| node_category
node_entry -->|"dispatches"| node_tags
node_entry -->|"dispatches"| node_recheck
node_entry -->|"dispatches"| node_unregistered
node_entry -->|"dispatches"| node_orphaned
node_entry -->|"dispatches"| node_hardlinks
node_entry -->|"dispatches"| node_sharelimits
node_entry -->|"creates"| node_webapi
node_webui -->|"uses"| node_apiclient
node_webui -->|"initializes"| node_settings
node_webui -->|"initializes"| node_commands
node_webui -->|"initializes"| node_logs
node_apiclient -->|"requests"| node_webapi
node_webapi -->|"uses"| node_config
node_config -->|"configures"| node_webhooks
node_webhooks -->|"sends via"| node_apprise
node_config -->|"configures"| node_notifiarr
node_category -.->|"updates"| node_qbt
node_tags -.->|"tags torrents"| node_qbt
node_recheck -.->|"rechecks"| node_qbt
node_unregistered -.->|"removes torrents"| node_qbt
node_orphaned -.->|"removes files"| node_filesystem
node_hardlinks -.->|"checks links"| node_filesystem
node_sharelimits -.->|"enforces limits"| node_qbt
node_sharelimits -.->|"may delete data"| node_filesystem
node_errors -.->|"handles errors"| node_qbt
node_webhooks -.->|"notifies"| node_operator

click node_entry "https://github.com/stuffanthings/qbit_manage/blob/develop/qbit_manage.py"
click node_config "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/config.py"
click node_scheduler "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/scheduler.py"
click node_webapi "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/web_api.py"
click node_webui "https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/app.js"
click node_apiclient "https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/api.js"
click node_settings "https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/components/config-form.js"
click node_commands "https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/components/command-panel.js"
click node_logs "https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/components/log-viewer.js"
click node_category "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/category.py"
click node_tags "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/tags.py"
click node_recheck "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/recheck.py"
click node_unregistered "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/remove_unregistered.py"
click node_orphaned "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/remove_orphaned.py"
click node_hardlinks "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/tag_nohardlinks.py"
click node_sharelimits "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/share_limits.py"
click node_errors "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/qbit_error_handler.py"
click node_webhooks "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/webhooks.py"
click node_notifiarr "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/notifiarr.py"
click node_apprise "https://github.com/stuffanthings/qbit_manage/blob/develop/modules/apprise.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_config,node_scheduler,node_errors toneBlue
class node_category,node_tags,node_recheck,node_unregistered,node_orphaned,node_hardlinks,node_sharelimits toneAmber
class node_webapi,node_webui,node_apiclient,node_settings,node_commands,node_logs toneMint
class node_webhooks,node_notifiarr,node_apprise,node_qbt,node_filesystem toneRose
class node_operator toneIndigo
```

## Components

### Management runtime

- [CLI runner](https://github.com/stuffanthings/qbit_manage/blob/develop/qbit_manage.py): `qbit_manage.py`
- [Configuration](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/config.py): `modules/config.py`
- [Scheduler](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/scheduler.py): `modules/scheduler.py`
- [API error handler](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/qbit_error_handler.py): `modules/qbit_error_handler.py`

### Torrent operations

- [Categories](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/category.py): `modules/core/category.py`
- [Tracker tags](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/tags.py): `modules/core/tags.py`
- [Torrent recheck](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/recheck.py): `modules/core/recheck.py`
- [Unregistered cleanup](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/remove_unregistered.py): `modules/core/remove_unregistered.py`
- [Orphan cleanup](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/remove_orphaned.py): `modules/core/remove_orphaned.py`
- [Hardlink tagging](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/tag_nohardlinks.py): `modules/core/tag_nohardlinks.py`
- [Share limits](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/core/share_limits.py): `modules/core/share_limits.py`

### Web control

- [Web API](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/web_api.py): `modules/web_api.py`
- [Web interface](https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/app.js): `web-ui/js/app.js`
- [API client](https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/api.js): `web-ui/js/api.js`
- [Config editor](https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/components/config-form.js): `web-ui/js/components/config-form.js`
- [Command controls](https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/components/command-panel.js): `web-ui/js/components/command-panel.js`
- [Log viewer](https://github.com/stuffanthings/qbit_manage/blob/develop/web-ui/js/components/log-viewer.js): `web-ui/js/components/log-viewer.js`

### External services

- [Webhook notifications](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/webhooks.py): `modules/webhooks.py`
- [Notifiarr](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/notifiarr.py): `modules/notifiarr.py`
- [Apprise](https://github.com/stuffanthings/qbit_manage/blob/develop/modules/apprise.py): `modules/apprise.py`
- **qBittorrent**
- **Torrent files**

### Other components

- **Operator**

## Connections

- Operator → CLI runner: runs
- CLI runner → Configuration: initializes (evidence: `qbit_manage.py`)
- CLI runner → Scheduler: starts (evidence: `qbit_manage.py`)
- CLI runner → Categories: dispatches (evidence: `qbit_manage.py`)
- CLI runner → Tracker tags: dispatches (evidence: `qbit_manage.py`)
- CLI runner → Torrent recheck: dispatches (evidence: `qbit_manage.py`)
- CLI runner → Unregistered cleanup: dispatches (evidence: `qbit_manage.py`)
- CLI runner → Orphan cleanup: dispatches (evidence: `qbit_manage.py`)
- CLI runner → Hardlink tagging: dispatches (evidence: `qbit_manage.py`)
- CLI runner → Share limits: dispatches (evidence: `qbit_manage.py`)
- CLI runner → Web API: creates (evidence: `qbit_manage.py`)
- Web interface → API client: uses (evidence: `web-ui/js/app.js`)
- Web interface → Config editor: initializes (evidence: `web-ui/js/app.js`)
- Web interface → Command controls: initializes (evidence: `web-ui/js/app.js`)
- Web interface → Log viewer: initializes (evidence: `web-ui/js/app.js`)
- API client → Web API: requests (evidence: `web-ui/js/api.js`)
- Web API → Configuration: uses (evidence: `modules/web_api.py`)
- Configuration → Webhook notifications: configures (evidence: `modules/config.py`)
- Webhook notifications → Apprise: sends via (evidence: `modules/webhooks.py`)
- Configuration → Notifiarr: configures (evidence: `modules/config.py`)
- Categories → qBittorrent: updates
- Tracker tags → qBittorrent: tags torrents
- Torrent recheck → qBittorrent: rechecks
- Unregistered cleanup → qBittorrent: removes torrents
- Orphan cleanup → Torrent files: removes files
- Hardlink tagging → Torrent files: checks links
- Share limits → qBittorrent: enforces limits
- Share limits → Torrent files: may delete data
- API error handler → qBittorrent: handles errors
- Webhook notifications → Operator: notifies
