# c0re100/qbittorrent-enhanced-edition architecture

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

- Interactive diagram: https://gitdiagram.com/c0re100/qbittorrent-enhanced-edition
- Repository: https://github.com/c0re100/qbittorrent-enhanced-edition

## Overview

qBittorrent Enhanced Edition is a Qt/libtorrent BitTorrent client with desktop and WebUI interfaces. The main workflow is adding a torrent, managing its transfer through a session, and exchanging data with peers; the README also highlights enhanced peer blocking and whitelist/blacklist controls. Search, RSS automation, torrent creation, and the Web API are additional product capabilities. Several subsystem links are based on README descriptions or module references rather than inspected call sites, so uncertain runtime relationships are omitted or marked dashed.

Main entry points: [`src/base/bittorrent/sessionimpl.cpp`](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/sessionimpl.cpp) (BitTorrent session), [`src/app/application.cpp`](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/app/application.cpp) (Application services), [`src/app/main.cpp`](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/app/main.cpp) (Application startup), [`src/gui/guiaddtorrentmanager.cpp`](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/gui/guiaddtorrentmanager.cpp) (Add torrents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_entry["Application startup<br/>[main.cpp]"]
  node_app["Application services<br/>[application.cpp]"]
  node_prefs["Preferences<br/>[preferences.h]"]
  node_profile["Profile storage<br/>[profile.h]"]
end

subgraph group_transfer["Torrent transfers"]
  node_add["Add torrents"]
  node_session["BitTorrent session<br/>[sessionimpl.cpp]"]
  node_torrent["Torrent state<br/>[torrentimpl.cpp]"]
  node_resume[("Resume storage")]
end

subgraph group_network["Network and peers"]
  node_swarm(("BitTorrent peers"))
  node_peerfilters["Peer filtering<br/>[peer_filter.hpp]"]
  node_geoip["Peer geolocation<br/>[geoipmanager.cpp]"]
end

subgraph group_features["Product features"]
  node_search["Torrent search"]
  node_rss["RSS automation<br/>[rss_session.cpp]"]
  node_creation["Torrent creation"]
end

subgraph group_interfaces["User interfaces"]
  node_gui["Desktop interface<br/>[mainwindow.cpp]"]
  node_webserver["Web server<br/>[server.cpp]"]
  node_webapp["Web application<br/>[webapplication.cpp]"]
  node_api["Web API<br/>[apicontroller.cpp]"]
  node_webclient["Web client<br/>[client.js]"]
end

node_user(("User"))

node_user -->|"starts"| node_entry
node_entry -->|"creates"| node_app
node_app -->|"configures"| node_session
node_app -->|"uses"| node_prefs
node_app -->|"uses"| node_profile
node_user -.->|"operates"| node_gui
node_gui -.->|"adds torrents"| node_add
node_add -->|"submits torrent"| node_session
node_session -.->|"manages"| node_torrent
node_session -.->|"persists state"| node_resume
node_session -.->|"transfers data"| node_swarm
node_session -.->|"filters peers"| node_peerfilters
node_session -.->|"resolves peers"| node_geoip
node_user -.->|"searches"| node_search
node_user -.->|"subscribes"| node_rss
node_user -.->|"creates torrent"| node_creation
node_user -.->|"uses"| node_webclient
node_webclient -.->|"requests"| node_webserver
node_webserver -.->|"dispatches"| node_webapp
node_webapp -.->|"routes API"| node_api
node_api -->|"controls transfers"| node_session

click node_entry "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/app/main.cpp"
click node_app "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/app/application.cpp"
click node_prefs "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/preferences.h"
click node_profile "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/profile.h"
click node_gui "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/gui/mainwindow.cpp"
click node_add "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/gui/guiaddtorrentmanager.cpp"
click node_session "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/sessionimpl.cpp"
click node_torrent "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/torrentimpl.cpp"
click node_resume "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/dbresumedatastorage.cpp"
click node_peerfilters "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/peer_filter.hpp"
click node_geoip "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/net/geoipmanager.cpp"
click node_search "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/search/searchpluginmanager.cpp"
click node_rss "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/rss/rss_session.cpp"
click node_creation "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/torrentcreationmanager.cpp"
click node_webserver "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/http/server.cpp"
click node_webapp "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/webui/webapplication.cpp"
click node_api "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/webui/api/apicontroller.cpp"
click node_webclient "https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/webui/www/private/scripts/client.js"

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_app,node_prefs,node_profile,node_user toneBlue
class node_add,node_session,node_torrent,node_resume toneAmber
class node_swarm,node_peerfilters,node_geoip toneMint
class node_search,node_rss,node_creation toneRose
class node_gui,node_webserver,node_webapp,node_api,node_webclient toneIndigo
```

## Components

### Application

- [Application startup](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/app/main.cpp): `src/app/main.cpp`
- [Application services](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/app/application.cpp): `src/app/application.cpp`
- [Preferences](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/preferences.h): `src/base/preferences.h`
- [Profile storage](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/profile.h): `src/base/profile.h`

### Torrent transfers

- [Add torrents](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/gui/guiaddtorrentmanager.cpp): `src/gui/guiaddtorrentmanager.cpp`
- [BitTorrent session](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/sessionimpl.cpp): `src/base/bittorrent/sessionimpl.cpp`
- [Torrent state](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/torrentimpl.cpp): `src/base/bittorrent/torrentimpl.cpp`
- [Resume storage](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/dbresumedatastorage.cpp): `src/base/bittorrent/dbresumedatastorage.cpp`

### Network and peers

- **BitTorrent peers**
- [Peer filtering](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/peer_filter.hpp): `src/base/bittorrent/peer_filter.hpp`
- [Peer geolocation](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/net/geoipmanager.cpp): `src/base/net/geoipmanager.cpp`

### Product features

- [Torrent search](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/search/searchpluginmanager.cpp): `src/base/search/searchpluginmanager.cpp`
- [RSS automation](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/rss/rss_session.cpp): `src/base/rss/rss_session.cpp`
- [Torrent creation](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/bittorrent/torrentcreationmanager.cpp): `src/base/bittorrent/torrentcreationmanager.cpp`

### User interfaces

- [Desktop interface](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/gui/mainwindow.cpp): `src/gui/mainwindow.cpp`
- [Web server](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/base/http/server.cpp): `src/base/http/server.cpp`
- [Web application](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/webui/webapplication.cpp): `src/webui/webapplication.cpp`
- [Web API](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/webui/api/apicontroller.cpp): `src/webui/api/apicontroller.cpp`
- [Web client](https://github.com/c0re100/qbittorrent-enhanced-edition/blob/v5_2_x/src/webui/www/private/scripts/client.js): `src/webui/www/private/scripts/client.js`

### Other components

- **User**

## Connections

- User → Application startup: starts (evidence: `src/app/main.cpp`)
- Application startup → Application services: creates (evidence: `src/app/main.cpp`)
- Application services → BitTorrent session: configures (evidence: `src/app/application.cpp`)
- Application services → Preferences: uses (evidence: `src/app/application.cpp`)
- Application services → Profile storage: uses (evidence: `src/app/application.cpp`)
- User → Desktop interface: operates
- Desktop interface → Add torrents: adds torrents
- Add torrents → BitTorrent session: submits torrent (evidence: `src/gui/guiaddtorrentmanager.cpp`)
- BitTorrent session → Torrent state: manages
- BitTorrent session → Resume storage: persists state
- BitTorrent session → BitTorrent peers: transfers data
- BitTorrent session → Peer filtering: filters peers
- BitTorrent session → Peer geolocation: resolves peers
- User → Torrent search: searches
- User → RSS automation: subscribes
- User → Torrent creation: creates torrent
- User → Web client: uses
- Web client → Web server: requests
- Web server → Web application: dispatches
- Web application → Web API: routes API
- Web API → BitTorrent session: controls transfers
