# lajiovo/perseusautoscript architecture

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

- Interactive diagram: https://gitdiagram.com/lajiovo/perseusautoscript
- Repository: https://github.com/lajiovo/perseusautoscript

## Overview

Perseus AutoTools is a Windows-oriented automation suite whose main service receives game push events, monitors and repairs AzurPilot/MuMu, and exposes management features; separate products provide QBot messaging and novel acquisition/export. The graph preserves the README’s documented capability branches. Calls among the unsampled web, novel, and utility modules are shown only where the SOURCE INDEX or README supports them; those documents do not establish every runtime route.

Main entry points: [`main/zOnepush.py`](https://github.com/lajiovo/perseusautoscript/blob/main/main/zOnepush.py) (Service Entry), [`QBot/main.py`](https://github.com/lajiovo/perseusautoscript/blob/main/QBot/main.py) (Bot Runtime), [`main/zMainHandler.py`](https://github.com/lajiovo/perseusautoscript/blob/main/main/zMainHandler.py) (Push Handler), [`main/zAlas.py`](https://github.com/lajiovo/perseusautoscript/blob/main/main/zAlas.py) (AzurPilot Control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Main Automation"]
  node_onepush["Service Entry<br/>[zOnepush.py]"]
  node_push["Push Handler<br/>[zMainHandler.py]"]
  node_alas["AzurPilot Control<br/>[zAlas.py]"]
  node_mumu["MuMu Control<br/>[zMumu.py]"]
  node_browser["WebUI Automation<br/>[zPlaywrightNew.py]"]
  node_pushnotify["Push Notifications<br/>[zBarkCustom.py]"]
  node_config["Configuration<br/>[zConfig.py]"]
end

subgraph group_web["Web Management"]
  node_webui["Management WebUI<br/>[zOnepush.py]"]
  node_logapi["Log API<br/>[zLogApi.py]"]
  node_watchapi["Watch API<br/>[zWatchApi.py]"]
  node_watchserver["Watch Server<br/>[zWatchServer.py]"]
  node_codeapi["Code Status API<br/>[zCodeStatusApi.py]"]
  node_clipboard["Online Clipboard<br/>[zOnepush.py]"]
end

subgraph group_novels["Novel Tools"]
  node_lk["Light Novel Crawler<br/>[zLK.py]"]
  node_lkbro["Novel Browser Crawler<br/>[zLKbro.py]"]
  node_lkapi["Novel API<br/>[zLKapi.py]"]
  node_lkserver["Novel Web Backend<br/>[zLKserver.py]"]
  node_inovel["iNovel Exporter<br/>[ziNovel.py]"]
  node_inovelserver["iNovel Web Backend<br/>[zInovelServer.py]"]
end

subgraph group_bot["QBot"]
  node_qbot["Bot Runtime<br/>[main.py]"]
  node_botcommands["Bot Commands<br/>[opcmd.py]"]
  node_botgames["Bot Games<br/>[game.py]"]
  node_botdata[("Bot Data Manager<br/>[config.py]")]
  node_botweb["Bot Web Backend<br/>[server.py]"]
  node_yunzai["Yunzai Adapter<br/>[yz.py]"]
end

subgraph group_utilities["Utilities"]
  node_music["MusicDL Control<br/>[zMusicDL.py]"]
  node_ffmpeg["Audio Processing<br/>[zFfmpeg.py]"]
  node_cpolar["Tunnel Control<br/>[zCpolar.py]"]
  node_pgrjz["Pgrjz Check-in<br/>[zPGRJZ.py]"]
  node_logger["Logging<br/>[zPerseusLogger.py]"]
end

node_operator(("Operator"))

node_operator -->|"starts service"| node_onepush
node_onepush -->|"dispatches events"| node_push
node_push -->|"manages process"| node_alas
node_push -->|"manages emulator"| node_mumu
node_push -->|"controls web UI"| node_browser
node_push -->|"sends alerts"| node_pushnotify
node_alas -->|"reads settings"| node_config
node_pushnotify -->|"reads settings"| node_config
node_onepush -->|"serves management"| node_webui
node_webui -->|"exposes logs"| node_logapi
node_webui -->|"exposes watch data"| node_watchapi
node_onepush -->|"starts server"| node_watchserver
node_onepush -->|"registers API"| node_codeapi
node_webui -->|"serves clipboard"| node_clipboard
node_onepush -->|"starts controller"| node_music
node_onepush -->|"uses processing"| node_ffmpeg
node_onepush -->|"starts tunnel"| node_cpolar
node_onepush -->|"runs check-in"| node_pgrjz
node_onepush -->|"initializes logging"| node_logger
node_operator -->|"downloads novels"| node_lk
node_operator -->|"exports feed"| node_inovel
node_lkserver -->|"routes requests"| node_lkapi
node_lkapi -->|"delegates crawling"| node_lkbro
node_inovelserver -->|"serves exporter"| node_inovel
node_operator -->|"messages bot"| node_qbot
node_qbot -->|"dispatches commands"| node_botcommands
node_qbot -->|"dispatches games"| node_botgames
node_qbot -->|"reads and writes"| node_botdata
node_qbot -->|"starts web backend"| node_botweb
node_qbot -->|"uses adapter"| node_yunzai
node_operator -->|"manages bot"| node_botweb

click node_onepush "https://github.com/lajiovo/perseusautoscript/blob/main/main/zOnepush.py"
click node_push "https://github.com/lajiovo/perseusautoscript/blob/main/main/zMainHandler.py"
click node_alas "https://github.com/lajiovo/perseusautoscript/blob/main/main/zAlas.py"
click node_mumu "https://github.com/lajiovo/perseusautoscript/blob/main/main/zMumu.py"
click node_browser "https://github.com/lajiovo/perseusautoscript/blob/main/main/zPlaywrightNew.py"
click node_pushnotify "https://github.com/lajiovo/perseusautoscript/blob/main/main/zBarkCustom.py"
click node_config "https://github.com/lajiovo/perseusautoscript/blob/main/main/zConfig.py"
click node_webui "https://github.com/lajiovo/perseusautoscript/blob/main/main/zOnepush.py"
click node_logapi "https://github.com/lajiovo/perseusautoscript/blob/main/main/zLogApi.py"
click node_watchapi "https://github.com/lajiovo/perseusautoscript/blob/main/main/zWatchApi.py"
click node_watchserver "https://github.com/lajiovo/perseusautoscript/blob/main/main/zWatchServer.py"
click node_codeapi "https://github.com/lajiovo/perseusautoscript/blob/main/main/zCodeStatusApi.py"
click node_clipboard "https://github.com/lajiovo/perseusautoscript/blob/main/main/zOnepush.py"
click node_music "https://github.com/lajiovo/perseusautoscript/blob/main/main/zMusicDL.py"
click node_ffmpeg "https://github.com/lajiovo/perseusautoscript/blob/main/main/zFfmpeg.py"
click node_cpolar "https://github.com/lajiovo/perseusautoscript/blob/main/main/zCpolar.py"
click node_pgrjz "https://github.com/lajiovo/perseusautoscript/blob/main/main/zPGRJZ.py"
click node_logger "https://github.com/lajiovo/perseusautoscript/blob/main/main/zPerseusLogger.py"
click node_lk "https://github.com/lajiovo/perseusautoscript/blob/main/main/zLK.py"
click node_lkbro "https://github.com/lajiovo/perseusautoscript/blob/main/main/zLKbro.py"
click node_lkapi "https://github.com/lajiovo/perseusautoscript/blob/main/main/zLKapi.py"
click node_lkserver "https://github.com/lajiovo/perseusautoscript/blob/main/main/zLKserver.py"
click node_inovel "https://github.com/lajiovo/perseusautoscript/blob/main/main/ziNovel.py"
click node_inovelserver "https://github.com/lajiovo/perseusautoscript/blob/main/main/zInovelServer.py"
click node_qbot "https://github.com/lajiovo/perseusautoscript/blob/main/QBot/main.py"
click node_botcommands "https://github.com/lajiovo/perseusautoscript/blob/main/QBot/opcmd.py"
click node_botgames "https://github.com/lajiovo/perseusautoscript/blob/main/QBot/game.py"
click node_botdata "https://github.com/lajiovo/perseusautoscript/blob/main/QBot/config.py"
click node_botweb "https://github.com/lajiovo/perseusautoscript/blob/main/QBot/server.py"
click node_yunzai "https://github.com/lajiovo/perseusautoscript/blob/main/QBot/yz.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_onepush,node_push,node_alas,node_mumu,node_browser,node_pushnotify,node_config toneBlue
class node_webui,node_logapi,node_watchapi,node_watchserver,node_codeapi,node_clipboard toneAmber
class node_lk,node_lkbro,node_lkapi,node_lkserver,node_inovel,node_inovelserver toneMint
class node_qbot,node_botcommands,node_botgames,node_botdata,node_botweb,node_yunzai toneRose
class node_music,node_ffmpeg,node_cpolar,node_pgrjz,node_logger,node_operator toneIndigo
```

## Components

### Main Automation

- [Service Entry](https://github.com/lajiovo/perseusautoscript/blob/main/main/zOnepush.py): `main/zOnepush.py`
- [Push Handler](https://github.com/lajiovo/perseusautoscript/blob/main/main/zMainHandler.py): `main/zMainHandler.py`
- [AzurPilot Control](https://github.com/lajiovo/perseusautoscript/blob/main/main/zAlas.py): `main/zAlas.py`
- [MuMu Control](https://github.com/lajiovo/perseusautoscript/blob/main/main/zMumu.py): `main/zMumu.py`
- [WebUI Automation](https://github.com/lajiovo/perseusautoscript/blob/main/main/zPlaywrightNew.py): `main/zPlaywrightNew.py`
- [Push Notifications](https://github.com/lajiovo/perseusautoscript/blob/main/main/zBarkCustom.py): `main/zBarkCustom.py`
- [Configuration](https://github.com/lajiovo/perseusautoscript/blob/main/main/zConfig.py): `main/zConfig.py`

### Web Management

- [Management WebUI](https://github.com/lajiovo/perseusautoscript/blob/main/main/zOnepush.py): `main/zOnepush.py`
- [Log API](https://github.com/lajiovo/perseusautoscript/blob/main/main/zLogApi.py): `main/zLogApi.py`
- [Watch API](https://github.com/lajiovo/perseusautoscript/blob/main/main/zWatchApi.py): `main/zWatchApi.py`
- [Watch Server](https://github.com/lajiovo/perseusautoscript/blob/main/main/zWatchServer.py): `main/zWatchServer.py`
- [Code Status API](https://github.com/lajiovo/perseusautoscript/blob/main/main/zCodeStatusApi.py): `main/zCodeStatusApi.py`
- [Online Clipboard](https://github.com/lajiovo/perseusautoscript/blob/main/main/zOnepush.py): `main/zOnepush.py`

### Novel Tools

- [Light Novel Crawler](https://github.com/lajiovo/perseusautoscript/blob/main/main/zLK.py): `main/zLK.py`
- [Novel Browser Crawler](https://github.com/lajiovo/perseusautoscript/blob/main/main/zLKbro.py): `main/zLKbro.py`
- [Novel API](https://github.com/lajiovo/perseusautoscript/blob/main/main/zLKapi.py): `main/zLKapi.py`
- [Novel Web Backend](https://github.com/lajiovo/perseusautoscript/blob/main/main/zLKserver.py): `main/zLKserver.py`
- [iNovel Exporter](https://github.com/lajiovo/perseusautoscript/blob/main/main/ziNovel.py): `main/ziNovel.py`
- [iNovel Web Backend](https://github.com/lajiovo/perseusautoscript/blob/main/main/zInovelServer.py): `main/zInovelServer.py`

### QBot

- [Bot Runtime](https://github.com/lajiovo/perseusautoscript/blob/main/QBot/main.py): `QBot/main.py`
- [Bot Commands](https://github.com/lajiovo/perseusautoscript/blob/main/QBot/opcmd.py): `QBot/opcmd.py`
- [Bot Games](https://github.com/lajiovo/perseusautoscript/blob/main/QBot/game.py): `QBot/game.py`
- [Bot Data Manager](https://github.com/lajiovo/perseusautoscript/blob/main/QBot/config.py): `QBot/config.py`
- [Bot Web Backend](https://github.com/lajiovo/perseusautoscript/blob/main/QBot/server.py): `QBot/server.py`
- [Yunzai Adapter](https://github.com/lajiovo/perseusautoscript/blob/main/QBot/yz.py): `QBot/yz.py`

### Utilities

- [MusicDL Control](https://github.com/lajiovo/perseusautoscript/blob/main/main/zMusicDL.py): `main/zMusicDL.py`
- [Audio Processing](https://github.com/lajiovo/perseusautoscript/blob/main/main/zFfmpeg.py): `main/zFfmpeg.py`
- [Tunnel Control](https://github.com/lajiovo/perseusautoscript/blob/main/main/zCpolar.py): `main/zCpolar.py`
- [Pgrjz Check-in](https://github.com/lajiovo/perseusautoscript/blob/main/main/zPGRJZ.py): `main/zPGRJZ.py`
- [Logging](https://github.com/lajiovo/perseusautoscript/blob/main/main/zPerseusLogger.py): `main/zPerseusLogger.py`

### Other components

- **Operator**

## Connections

- Operator → Service Entry: starts service
- Service Entry → Push Handler: dispatches events (evidence: `main/zOnepush.py`)
- Push Handler → AzurPilot Control: manages process (evidence: `main/zMainHandler.py`)
- Push Handler → MuMu Control: manages emulator (evidence: `main/zMainHandler.py`)
- Push Handler → WebUI Automation: controls web UI (evidence: `main/zMainHandler.py`)
- Push Handler → Push Notifications: sends alerts (evidence: `main/zMainHandler.py`)
- AzurPilot Control → Configuration: reads settings (evidence: `main/zAlas.py`)
- Push Notifications → Configuration: reads settings (evidence: `main/zBarkCustom.py`)
- Service Entry → Management WebUI: serves management (evidence: `main/zOnepush.py`)
- Management WebUI → Log API: exposes logs (evidence: `main/zOnepush.py`)
- Management WebUI → Watch API: exposes watch data (evidence: `main/zOnepush.py`)
- Service Entry → Watch Server: starts server (evidence: `main/zOnepush.py`)
- Service Entry → Code Status API: registers API (evidence: `main/zOnepush.py`)
- Management WebUI → Online Clipboard: serves clipboard (evidence: `main/zOnepush.py`)
- Service Entry → MusicDL Control: starts controller (evidence: `main/zOnepush.py`)
- Service Entry → Audio Processing: uses processing (evidence: `main/zOnepush.py`)
- Service Entry → Tunnel Control: starts tunnel (evidence: `main/zOnepush.py`)
- Service Entry → Pgrjz Check-in: runs check-in (evidence: `main/zOnepush.py`)
- Service Entry → Logging: initializes logging (evidence: `main/zOnepush.py`)
- Operator → Light Novel Crawler: downloads novels
- Operator → iNovel Exporter: exports feed
- Novel Web Backend → Novel API: routes requests (evidence: `main/zLKserver.py`)
- Novel API → Novel Browser Crawler: delegates crawling
- iNovel Web Backend → iNovel Exporter: serves exporter (evidence: `main/zInovelServer.py`)
- Operator → Bot Runtime: messages bot
- Bot Runtime → Bot Commands: dispatches commands (evidence: `QBot/main.py`)
- Bot Runtime → Bot Games: dispatches games (evidence: `QBot/main.py`)
- Bot Runtime → Bot Data Manager: reads and writes (evidence: `QBot/main.py`)
- Bot Runtime → Bot Web Backend: starts web backend (evidence: `QBot/main.py`)
- Bot Runtime → Yunzai Adapter: uses adapter (evidence: `QBot/main.py`)
- Operator → Bot Web Backend: manages bot
