# tonquer/jmcomic-qt architecture

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

- Interactive diagram: https://gitdiagram.com/tonquer/jmcomic-qt
- Repository: https://github.com/tonquer/jmcomic-qt

## Overview

JMComic-qt is a cross-platform Qt desktop client for browsing, reading, and downloading comics from 禁漫天堂. The principal workflow is user search or navigation, remote catalog retrieval, selecting a comic, then viewing or downloading its pages. The tree also identifies account, favorites, comments, history, local-library, NAS, and image-enhancement capabilities. Sampled code confirms search requests pass through asynchronous task handling and a server handler; most other feature wiring is inferred only at subsystem level from names and README, so uncertain connections are omitted.

Main entry points: [`src/server/server.py`](https://github.com/tonquer/jmcomic-qt/blob/main/src/server/server.py) (Request dispatch), [`src/view/read/read_view.py`](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/read/read_view.py) (Comic reader), [`src/view/main/main_view.py`](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/main/main_view.py) (Main window), [`src/view/search/search_view.py`](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/search/search_view.py) (Comic search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_entry["Application entry<br/>[start.py]"]
  node_main["Main window<br/>[main_view.py]"]
  node_owner["Navigation coordinator<br/>[qt_owner.py]"]
  node_settings["Configuration<br/>[config.py]"]
end

subgraph group_catalog["Catalog and accounts"]
  node_search["Comic search<br/>[search_view.py]"]
  node_index["Index and weekly<br/>[index_view.py]"]
  node_category["Categories<br/>[category_view.py]"]
  node_comicinfo["Comic details<br/>[book_info_view.py]"]
  node_account["Account access<br/>[login_new_view.py]"]
  node_request["HTTP task layer<br/>[task_http.py]"]
  node_server["Request dispatch<br/>[server.py]"]
  node_handlers["Response handlers<br/>[user_handler.py]"]
end

subgraph group_reader["Reading and library"]
  node_reader["Comic reader<br/>[read_view.py]"]
  node_graphics["Page rendering<br/>[read_graphics.py]"]
  node_local["Local library<br/>[local_read_view.py]"]
  node_localtasks["Local page tasks<br/>[task_local.py]"]
end

subgraph group_transfer["Downloads and storage"]
  node_downloads["Download manager<br/>[download_view.py]"]
  node_downloadtasks["Download tasks<br/>[task_download.py]"]
  node_nas["NAS library<br/>[nas_view.py]"]
  node_upload["Storage uploads<br/>[task_upload.py]"]
end

subgraph group_community["User features and tools"]
  node_community["Favorites and comments<br/>[favorite_view.py]"]
  node_history["Reading history<br/>[history_view.py]"]
  node_tools["Image enhancement"]
end

node_user(("Desktop user"))
node_remote["Comic service"]
node_storage["Remote storage"]

node_user -->|"launches"| node_entry
node_entry -->|"starts"| node_main
node_main -->|"coordinates"| node_owner
node_user -->|"searches"| node_search
node_owner -->|"opens"| node_search
node_search -->|"queues query"| node_request
node_request -->|"dispatches"| node_server
node_server -->|"sends request"| node_remote
node_remote -->|"returns response"| node_server
node_server -->|"dispatches response"| node_handlers
node_user -->|"browses"| node_index
node_user -->|"filters by category"| node_category
node_user -->|"authenticates"| node_account
node_user -->|"selects comic"| node_comicinfo
node_comicinfo -->|"opens comic"| node_reader
node_reader -->|"renders pages"| node_graphics
node_reader -->|"loads local pages"| node_localtasks
node_user -->|"downloads comic"| node_downloads
node_downloads -->|"queues downloads"| node_downloadtasks
node_user -->|"opens local library"| node_local
node_user -->|"manages NAS"| node_nas
node_nas -.->|"uploads content"| node_upload
node_upload -.->|"writes files"| node_storage
node_user -->|"manages favorites"| node_community
node_user -->|"views history"| node_history
node_user -->|"enhances images"| node_tools
node_settings -->|"configures"| node_main

click node_entry "https://github.com/tonquer/jmcomic-qt/blob/main/src/start.py"
click node_main "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/main/main_view.py"
click node_owner "https://github.com/tonquer/jmcomic-qt/blob/main/src/qt_owner.py"
click node_settings "https://github.com/tonquer/jmcomic-qt/blob/main/src/config/config.py"
click node_search "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/search/search_view.py"
click node_index "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/index/index_view.py"
click node_category "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/category/category_view.py"
click node_comicinfo "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/info/book_info_view.py"
click node_account "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/user/login_new_view.py"
click node_request "https://github.com/tonquer/jmcomic-qt/blob/main/src/task/task_http.py"
click node_server "https://github.com/tonquer/jmcomic-qt/blob/main/src/server/server.py"
click node_handlers "https://github.com/tonquer/jmcomic-qt/blob/main/src/server/user_handler.py"
click node_reader "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/read/read_view.py"
click node_graphics "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/read/read_graphics.py"
click node_local "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/tool/local_read_view.py"
click node_localtasks "https://github.com/tonquer/jmcomic-qt/blob/main/src/task/task_local.py"
click node_downloads "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/download/download_view.py"
click node_downloadtasks "https://github.com/tonquer/jmcomic-qt/blob/main/src/task/task_download.py"
click node_nas "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/nas/nas_view.py"
click node_upload "https://github.com/tonquer/jmcomic-qt/blob/main/src/task/task_upload.py"
click node_community "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/user/favorite_view.py"
click node_history "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/history/history_view.py"
click node_tools "https://github.com/tonquer/jmcomic-qt/blob/main/src/view/tool/waifu2x_tool_view.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_main,node_owner,node_settings,node_user toneBlue
class node_search,node_index,node_category,node_comicinfo,node_account,node_request,node_server,node_handlers,node_storage toneAmber
class node_reader,node_graphics,node_local,node_localtasks toneMint
class node_downloads,node_downloadtasks,node_nas,node_upload toneRose
class node_community,node_history,node_tools,node_remote toneIndigo
```

## Components

### Desktop app

- [Application entry](https://github.com/tonquer/jmcomic-qt/blob/main/src/start.py): `src/start.py`
- [Main window](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/main/main_view.py): `src/view/main/main_view.py`
- [Navigation coordinator](https://github.com/tonquer/jmcomic-qt/blob/main/src/qt_owner.py): `src/qt_owner.py`
- [Configuration](https://github.com/tonquer/jmcomic-qt/blob/main/src/config/config.py): `src/config/config.py`

### Catalog and accounts

- [Comic search](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/search/search_view.py): `src/view/search/search_view.py`
- [Index and weekly](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/index/index_view.py): `src/view/index/index_view.py`
- [Categories](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/category/category_view.py): `src/view/category/category_view.py`
- [Comic details](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/info/book_info_view.py): `src/view/info/book_info_view.py`
- [Account access](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/user/login_new_view.py): `src/view/user/login_new_view.py`
- [HTTP task layer](https://github.com/tonquer/jmcomic-qt/blob/main/src/task/task_http.py): `src/task/task_http.py`
- [Request dispatch](https://github.com/tonquer/jmcomic-qt/blob/main/src/server/server.py): `src/server/server.py`
- [Response handlers](https://github.com/tonquer/jmcomic-qt/blob/main/src/server/user_handler.py): `src/server/user_handler.py`

### Reading and library

- [Comic reader](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/read/read_view.py): `src/view/read/read_view.py`
- [Page rendering](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/read/read_graphics.py): `src/view/read/read_graphics.py`
- [Local library](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/tool/local_read_view.py): `src/view/tool/local_read_view.py`
- [Local page tasks](https://github.com/tonquer/jmcomic-qt/blob/main/src/task/task_local.py): `src/task/task_local.py`

### Downloads and storage

- [Download manager](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/download/download_view.py): `src/view/download/download_view.py`
- [Download tasks](https://github.com/tonquer/jmcomic-qt/blob/main/src/task/task_download.py): `src/task/task_download.py`
- [NAS library](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/nas/nas_view.py): `src/view/nas/nas_view.py`
- [Storage uploads](https://github.com/tonquer/jmcomic-qt/blob/main/src/task/task_upload.py): `src/task/task_upload.py`

### User features and tools

- [Favorites and comments](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/user/favorite_view.py): `src/view/user/favorite_view.py`
- [Reading history](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/history/history_view.py): `src/view/history/history_view.py`
- [Image enhancement](https://github.com/tonquer/jmcomic-qt/blob/main/src/view/tool/waifu2x_tool_view.py): `src/view/tool/waifu2x_tool_view.py`

### Other components

- **Desktop user**
- **Comic service**
- **Remote storage**

## Connections

- Desktop user → Application entry: launches
- Application entry → Main window: starts
- Main window → Navigation coordinator: coordinates
- Desktop user → Comic search: searches
- Navigation coordinator → Comic search: opens
- Comic search → HTTP task layer: queues query
- HTTP task layer → Request dispatch: dispatches
- Request dispatch → Comic service: sends request
- Comic service → Request dispatch: returns response
- Request dispatch → Response handlers: dispatches response
- Desktop user → Index and weekly: browses
- Desktop user → Categories: filters by category
- Desktop user → Account access: authenticates
- Desktop user → Comic details: selects comic
- Comic details → Comic reader: opens comic
- Comic reader → Page rendering: renders pages
- Comic reader → Local page tasks: loads local pages
- Desktop user → Download manager: downloads comic
- Download manager → Download tasks: queues downloads
- Desktop user → Local library: opens local library
- Desktop user → NAS library: manages NAS
- NAS library → Storage uploads: uploads content
- Storage uploads → Remote storage: writes files
- Desktop user → Favorites and comments: manages favorites
- Desktop user → Reading history: views history
- Desktop user → Image enhancement: enhances images
- Configuration → Main window: configures
