# ledccn/iyuuplus architecture

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

- Interactive diagram: https://gitdiagram.com/ledccn/iyuuplus
- Repository: https://github.com/ledccn/iyuuplus

## Overview

IYUUPlus is a resident PHP service and web UI for configuring and scheduling private-tracker automation. The principal workflow gathers torrent hashes from configured downloaders, submits them to the IYUU service, and sends returned torrent links to downloaders for checking and seeding. Separate capabilities include RSS-based torrent acquisition, site-specific scraping, torrent migration, and notifications. Several engines and controllers are unsampled; those subsystem links are shown as unverified where appropriate.

Main entry points: [`src/Reseed/AutoReseed.php`](https://github.com/ledccn/iyuuplus/blob/master/src/Reseed/AutoReseed.php) (Auto reseed), [`src/Spiders/SitesBase.php`](https://github.com/ledccn/iyuuplus/blob/master/src/Spiders/SitesBase.php) (Site scraping), [`app/domain/Config.php`](https://github.com/ledccn/iyuuplus/blob/master/app/domain/Config.php) (Config management), [`app/domain/ConfigParser`](https://github.com/ledccn/iyuuplus/tree/master/app/domain/ConfigParser) (Job config parsers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and configuration"]
  node_webui["Web UI"]
  node_controllers["API controllers"]
  node_users["User and login<br/>[Users.php]"]
  node_configapi["Config management<br/>[Config.php]"]
  node_configstore[("Config files<br/>[Config.php]")]
end

subgraph group_jobs["Scheduled jobs"]
  node_parser["Job config parsers"]
  node_scheduler["Crontab scheduler<br/>[Crontab.php]"]
  node_commands["Job commands"]
end

subgraph group_torrent["Torrent workflows"]
  node_reseed["Auto reseed<br/>[AutoReseed.php]"]
  node_rss["RSS acquisition<br/>[AbstractRss.php]"]
  node_spiders["Site scraping<br/>[SitesBase.php]"]
  node_move["Torrent migration<br/>[MoveTorrent.php]"]
  node_selector["HTML selector<br/>[Selector.php]"]
  node_table["Torrent table utilities<br/>[Table.php]"]
  node_eventlisteners["Reseed listeners"]
end

subgraph group_integrations["External services"]
  node_rpc["Downloader RPC<br/>[Rpc.php]"]
  node_iyuu["IYUU API"]
  node_downloaders["Downloaders"]
  node_trackers["PT trackers"]
  node_notify["Notifications<br/>[NotifyFactory.php]"]
end

node_user(("Operator"))

node_user -->|"configures"| node_webui
node_webui -.->|"sends requests"| node_controllers
node_controllers -->|"checks login"| node_users
node_controllers -.->|"manages settings"| node_configapi
node_configapi -->|"reads and writes"| node_configstore
node_configapi -->|"updates schedules"| node_scheduler
node_scheduler -->|"dispatches jobs"| node_commands
node_commands -.->|"loads job settings"| node_parser
node_parser -->|"resolves settings"| node_configapi
node_parser -->|"reads config"| node_configstore
node_reseed -.->|"submits hashes"| node_iyuu
node_reseed -.->|"uses downloader RPC"| node_rpc
node_rpc -->|"calls API"| node_downloaders
node_downloaders -.->|"provides hashes"| node_reseed
node_iyuu -.->|"returns torrent links"| node_reseed
node_rss -->|"pushes torrents"| node_rpc
node_spiders -->|"pushes torrents"| node_rpc
node_spiders -->|"parses pages"| node_selector
node_trackers -.->|"serves feeds"| node_rss
node_trackers -.->|"serves pages"| node_spiders
node_move -.->|"moves torrents"| node_downloaders
node_reseed -.->|"emits events"| node_eventlisteners
node_eventlisteners -->|"uses settings"| node_parser
node_notify -.->|"sends notices"| node_iyuu
node_spiders -->|"uses utilities"| node_table

click node_webui "https://github.com/ledccn/iyuuplus/tree/master/public"
click node_controllers "https://github.com/ledccn/iyuuplus/tree/master/app/controller"
click node_users "https://github.com/ledccn/iyuuplus/blob/master/app/domain/Users.php"
click node_configapi "https://github.com/ledccn/iyuuplus/blob/master/app/domain/Config.php"
click node_configstore "https://github.com/ledccn/iyuuplus/blob/master/app/common/Config.php"
click node_parser "https://github.com/ledccn/iyuuplus/tree/master/app/domain/ConfigParser"
click node_scheduler "https://github.com/ledccn/iyuuplus/blob/master/app/domain/Crontab.php"
click node_commands "https://github.com/ledccn/iyuuplus/tree/master/app/domain/Command"
click node_reseed "https://github.com/ledccn/iyuuplus/blob/master/src/Reseed/AutoReseed.php"
click node_rss "https://github.com/ledccn/iyuuplus/blob/master/src/Rss/AbstractRss.php"
click node_spiders "https://github.com/ledccn/iyuuplus/blob/master/src/Spiders/SitesBase.php"
click node_move "https://github.com/ledccn/iyuuplus/blob/master/src/Reseed/MoveTorrent.php"
click node_rpc "https://github.com/ledccn/iyuuplus/blob/master/src/Library/Rpc.php"
click node_notify "https://github.com/ledccn/iyuuplus/blob/master/src/Notify/NotifyFactory.php"
click node_selector "https://github.com/ledccn/iyuuplus/blob/master/src/Library/Selector.php"
click node_table "https://github.com/ledccn/iyuuplus/blob/master/src/Library/Table.php"
click node_eventlisteners "https://github.com/ledccn/iyuuplus/tree/master/src/Reseed/Listener"

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_webui,node_controllers,node_users,node_configapi,node_configstore toneBlue
class node_parser,node_scheduler,node_commands toneAmber
class node_reseed,node_rss,node_spiders,node_move,node_selector,node_table,node_eventlisteners toneMint
class node_rpc,node_iyuu,node_downloaders,node_trackers,node_notify toneRose
class node_user toneIndigo
```

## Components

### Web and configuration

- [Web UI](https://github.com/ledccn/iyuuplus/tree/master/public): `public`
- [API controllers](https://github.com/ledccn/iyuuplus/tree/master/app/controller): `app/controller`
- [User and login](https://github.com/ledccn/iyuuplus/blob/master/app/domain/Users.php): `app/domain/Users.php`
- [Config management](https://github.com/ledccn/iyuuplus/blob/master/app/domain/Config.php): `app/domain/Config.php`
- [Config files](https://github.com/ledccn/iyuuplus/blob/master/app/common/Config.php): `app/common/Config.php`

### Scheduled jobs

- [Job config parsers](https://github.com/ledccn/iyuuplus/tree/master/app/domain/ConfigParser): `app/domain/ConfigParser`
- [Crontab scheduler](https://github.com/ledccn/iyuuplus/blob/master/app/domain/Crontab.php): `app/domain/Crontab.php`
- [Job commands](https://github.com/ledccn/iyuuplus/tree/master/app/domain/Command): `app/domain/Command`

### Torrent workflows

- [Auto reseed](https://github.com/ledccn/iyuuplus/blob/master/src/Reseed/AutoReseed.php): `src/Reseed/AutoReseed.php`
- [RSS acquisition](https://github.com/ledccn/iyuuplus/blob/master/src/Rss/AbstractRss.php): `src/Rss/AbstractRss.php`
- [Site scraping](https://github.com/ledccn/iyuuplus/blob/master/src/Spiders/SitesBase.php): `src/Spiders/SitesBase.php`
- [Torrent migration](https://github.com/ledccn/iyuuplus/blob/master/src/Reseed/MoveTorrent.php): `src/Reseed/MoveTorrent.php`
- [HTML selector](https://github.com/ledccn/iyuuplus/blob/master/src/Library/Selector.php): `src/Library/Selector.php`
- [Torrent table utilities](https://github.com/ledccn/iyuuplus/blob/master/src/Library/Table.php): `src/Library/Table.php`
- [Reseed listeners](https://github.com/ledccn/iyuuplus/tree/master/src/Reseed/Listener): `src/Reseed/Listener`

### External services

- [Downloader RPC](https://github.com/ledccn/iyuuplus/blob/master/src/Library/Rpc.php): `src/Library/Rpc.php`
- **IYUU API**
- **Downloaders**
- **PT trackers**
- [Notifications](https://github.com/ledccn/iyuuplus/blob/master/src/Notify/NotifyFactory.php): `src/Notify/NotifyFactory.php`

### Other components

- **Operator**

## Connections

- Operator → Web UI: configures
- Web UI → API controllers: sends requests
- API controllers → User and login: checks login (evidence: `app/controller/BaseController.php`)
- API controllers → Config management: manages settings
- Config management → Config files: reads and writes (evidence: `app/domain/Config.php`)
- Config management → Crontab scheduler: updates schedules (evidence: `app/domain/Config.php`)
- Crontab scheduler → Job commands: dispatches jobs (evidence: `app/domain/Crontab.php`)
- Job commands → Job config parsers: loads job settings
- Job config parsers → Config management: resolves settings (evidence: `app/domain/ConfigParser/Reseed.php`)
- Job config parsers → Config files: reads config
- Auto reseed → IYUU API: submits hashes
- Auto reseed → Downloader RPC: uses downloader RPC
- Downloader RPC → Downloaders: calls API
- Downloaders → Auto reseed: provides hashes
- IYUU API → Auto reseed: returns torrent links
- RSS acquisition → Downloader RPC: pushes torrents (evidence: `src/Rss/AbstractRss.php`)
- Site scraping → Downloader RPC: pushes torrents (evidence: `src/Spiders/SitesBase.php`)
- Site scraping → HTML selector: parses pages (evidence: `src/Spiders/SitesBase.php`)
- PT trackers → RSS acquisition: serves feeds
- PT trackers → Site scraping: serves pages
- Torrent migration → Downloaders: moves torrents
- Auto reseed → Reseed listeners: emits events
- Reseed listeners → Job config parsers: uses settings (evidence: `src/Reseed/Listener/ClientHashSuccessListener.php`)
- Notifications → IYUU API: sends notices
- Site scraping → Torrent table utilities: uses utilities (evidence: `src/helper.php`)
