# kodjodevf/mangayomi architecture

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

- Interactive diagram: https://gitdiagram.com/kodjodevf/mangayomi
- Repository: https://github.com/kodjodevf/mangayomi

## Overview

Mangayomi is a cross-platform Flutter reader for manga, novels, anime, and related media. The README establishes the user workflow and capabilities, but the supplied tree contains no Flutter/Dart application sources, so the UI, library, reader, tracking, categories, and backup implementation cannot be mapped directly. The graph therefore focuses on visible native runtime pieces: the documented content workflow, native Aidoku source engine and HTTP API, EPUB support, and platform bridges. Links to unsampled product stages are documented at a high level; unverified implementation connections are omitted.

Main entry points: [`rust/src/api/aidoku_wasm.rs`](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/aidoku_wasm.rs) (Aidoku source API), [`rust/src/aidoku_wasm/host_html.rs`](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/host_html.rs) (HTML and selectors), [`rust/src/api/rhttp/client.rs`](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rhttp/client.rs) (HTTP client API), [`rust/src/frb_generated.rs`](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/frb_generated.rs) (Flutter-Rust bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Content experience"]
  node_discover["Find content"]
  node_open["Open media"]
  node_readwatch["Read or watch"]
  node_local["Local content"]
  node_readerconfig["Reader settings"]
  node_library["Library categories"]
  node_tracking["Media tracking"]
  node_backup["Backup and restore"]
end

subgraph group_engine["Source runtime"]
  node_aidokuapi["Aidoku source API<br/>[aidoku_wasm.rs]"]
  node_interpreter["WASM interpreter<br/>[interpreter.rs]"]
  node_hostjs["JavaScript host<br/>[host_js.rs]"]
  node_hostnet["Network host<br/>[host_net.rs]"]
  node_hosthtml["HTML and selectors<br/>[host_html.rs]"]
  node_store[("Source storage<br/>[store.rs]")]
  node_selector["Selector support<br/>[selector.rs]"]
end

subgraph group_native["Native services"]
  node_httpapi["HTTP client API<br/>[client.rs]"]
  node_httptransport["HTTP transport<br/>[http.rs]"]
  node_epub["EPUB parser<br/>[epub.rs]"]
  node_archive["RAR support<br/>[rar.rs]"]
  node_bridge["Flutter-Rust bridge<br/>[frb_generated.rs]"]
  node_image["Image decoding<br/>[image_decoder.cpp]"]
  node_torrent["Torrent server<br/>[server.go]"]
  node_platform["Platform app host<br/>[AppDelegate.swift]"]
  node_error["HTTP errors<br/>[error.rs]"]
end

node_user(("Reader"))

node_user -->|"seeks media"| node_discover
node_discover -->|"selects title"| node_open
node_open -->|"opens media"| node_readwatch
node_user -->|"chooses local"| node_local
node_user -->|"configures reader"| node_readerconfig
node_user -->|"organizes titles"| node_library
node_user -->|"tracks progress"| node_tracking
node_user -->|"backs up library"| node_backup
node_aidokuapi -->|"runs source"| node_interpreter
node_aidokuapi -->|"uses host API"| node_hostjs
node_aidokuapi -->|"uses host API"| node_hostnet
node_hosthtml -->|"reads and writes"| node_store
node_hosthtml -.->|"uses selectors"| node_selector
node_httpapi -->|"sends requests"| node_httptransport
node_httpapi -->|"returns errors"| node_error
node_bridge -->|"dispatches calls"| node_aidokuapi
node_bridge -->|"dispatches parse"| node_epub
node_readwatch -.->|"decodes images"| node_image
node_platform -.->|"integrates service"| node_torrent

click node_aidokuapi "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/aidoku_wasm.rs"
click node_interpreter "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/interpreter.rs"
click node_hostjs "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/host_js.rs"
click node_hostnet "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/host_net.rs"
click node_hosthtml "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/host_html.rs"
click node_store "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/store.rs"
click node_httpapi "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rhttp/client.rs"
click node_httptransport "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rhttp/http.rs"
click node_epub "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/epub.rs"
click node_archive "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rar.rs"
click node_bridge "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/frb_generated.rs"
click node_image "https://github.com/kodjodevf/mangayomi/blob/main/lib/ffi/image_decoder.cpp"
click node_torrent "https://github.com/kodjodevf/mangayomi/blob/main/go/server.go"
click node_platform "https://github.com/kodjodevf/mangayomi/blob/main/ios/Runner/AppDelegate.swift"
click node_selector "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/selector.rs"
click node_error "https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rhttp/error.rs"

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_discover,node_open,node_readwatch,node_local,node_readerconfig,node_library,node_tracking,node_backup toneBlue
class node_aidokuapi,node_interpreter,node_hostjs,node_hostnet,node_hosthtml,node_store,node_selector toneAmber
class node_httpapi,node_httptransport,node_epub,node_archive,node_bridge,node_image,node_torrent,node_platform,node_error toneMint
class node_user toneIndigo
```

## Components

### Content experience

- **Find content**
- **Open media**
- **Read or watch**
- **Local content**
- **Reader settings**
- **Library categories**
- **Media tracking**
- **Backup and restore**

### Source runtime

- [Aidoku source API](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/aidoku_wasm.rs): `rust/src/api/aidoku_wasm.rs`
- [WASM interpreter](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/interpreter.rs): `rust/src/aidoku_wasm/interpreter.rs`
- [JavaScript host](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/host_js.rs): `rust/src/aidoku_wasm/host_js.rs`
- [Network host](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/host_net.rs): `rust/src/aidoku_wasm/host_net.rs`
- [HTML and selectors](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/host_html.rs): `rust/src/aidoku_wasm/host_html.rs`
- [Source storage](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/store.rs): `rust/src/aidoku_wasm/store.rs`
- [Selector support](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/aidoku_wasm/selector.rs): `rust/src/aidoku_wasm/selector.rs`

### Native services

- [HTTP client API](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rhttp/client.rs): `rust/src/api/rhttp/client.rs`
- [HTTP transport](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rhttp/http.rs): `rust/src/api/rhttp/http.rs`
- [EPUB parser](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/epub.rs): `rust/src/api/epub.rs`
- [RAR support](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rar.rs): `rust/src/api/rar.rs`
- [Flutter-Rust bridge](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/frb_generated.rs): `rust/src/frb_generated.rs`
- [Image decoding](https://github.com/kodjodevf/mangayomi/blob/main/lib/ffi/image_decoder.cpp): `lib/ffi/image_decoder.cpp`
- [Torrent server](https://github.com/kodjodevf/mangayomi/blob/main/go/server.go): `go/server.go`
- [Platform app host](https://github.com/kodjodevf/mangayomi/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [HTTP errors](https://github.com/kodjodevf/mangayomi/blob/main/rust/src/api/rhttp/error.rs): `rust/src/api/rhttp/error.rs`

### Other components

- **Reader**

## Connections

- Reader → Find content: seeks media
- Find content → Open media: selects title
- Open media → Read or watch: opens media
- Reader → Local content: chooses local
- Reader → Reader settings: configures reader
- Reader → Library categories: organizes titles
- Reader → Media tracking: tracks progress
- Reader → Backup and restore: backs up library
- Aidoku source API → WASM interpreter: runs source (evidence: `rust/src/api/aidoku_wasm.rs`)
- Aidoku source API → JavaScript host: uses host API (evidence: `rust/src/api/aidoku_wasm.rs`)
- Aidoku source API → Network host: uses host API (evidence: `rust/src/api/aidoku_wasm.rs`)
- HTML and selectors → Source storage: reads and writes (evidence: `rust/src/aidoku_wasm/host_html.rs`)
- HTML and selectors → Selector support: uses selectors · Inferred; not shown in the code that was read. (evidence: `rust/src/aidoku_wasm/host_html.rs`)
- HTTP client API → HTTP transport: sends requests (evidence: `rust/src/api/rhttp/http.rs`)
- HTTP client API → HTTP errors: returns errors (evidence: `rust/src/api/rhttp/client.rs`)
- Flutter-Rust bridge → Aidoku source API: dispatches calls (evidence: `rust/src/frb_generated.rs`)
- Flutter-Rust bridge → EPUB parser: dispatches parse (evidence: `rust/src/frb_generated.rs`)
- Read or watch → Image decoding: decodes images · Inferred; not shown in the code that was read.
- Platform app host → Torrent server: integrates service · Inferred; not shown in the code that was read.
