How null2264/yokai works
Project type and purpose
• This is an Android client application (a fork of Tachiyomi called “Yōkai”), built with Kotlin Multiplatform modules.
• Purpose: a free, open‑source manga reader that integrates local file reading, online catalogue sources, trackers (MyAnimeList, AniList, etc.), backups, and extensions.
File structure
Top‑level modules:
• app – Android application module (UI entry point, Gradle config, manifests)
• core – shared utilities (network, storage, preferences), Kermit logging, Kotlin MPP bridges
• data – repository implementations, SQLDelight database layer, migrations
• domain – business‑logic layer (use‑cases/interactors, repository interfaces)
• presentation – shared Compose UI components and widgets
• source – source‑API definitions for online manga sources
• i18n – multilanguage resources via moko‑resources
• buildSrc, gradle, settings – build logic, version catalogs
Key insights from README
• Highlights Clean Architecture (separation of UI, domain, data)
• Supports multiple trackers and online sources via plugin‑like extension APIs
• Uses Kotlin Coroutines, SQLDelight, OkHttp, Coil, Glance (app widgets)
Main components
a. Android App (app module)
b. Presentation layer (UI/ViewModels in app + presentation modules)
c. Domain layer (interactors/use‑cases in domain module)
d. Data layer (repositories, SQLDelight adapters, network clients in data module)
e. Core utilities (network helper, storage provider, preferences in core module)
f. Source API (source module)
g. i18n engine (moko‑resources in i18n module)
h. External services:
– Online catalogue sources (MangaDex, Cubari, MangaPlus, etc.)
– Trackers (MyAnimeList, AniList, Kitsu, Bangumi, Shikimori, MangaUpdates)
– GitHub Releases (app updates)
i. Local persistence: SQLite via SQLDelight, file system for backups, local extensions
Relationships and interactions
• UI/Activity/Compose screens → Presentation ViewModels → Domain interactors → Data repositories → Core helpers → External/DB
• Source module defines interfaces; data layer binds concrete online‑source implementations as plugins
• Domain layer defines repository interfaces; data layer implements them using SQLDelight or network
• Backup/restore flows: Data → Core storage → file system → local backup files
• App update flow: Presentation triggers an update check → data.updater component calls GitHubRelease API → Core installer
Architectural patterns and technologies
• Clean Architecture layered approach (UI → Domain → Data → Core)
• MVVM / Model–View–Presenter in UI controllers
• Kotlin Multiplatform (commonMain, androidMain, iosMain in core module)
• SQLDelight for type‑safe DB, coroutine dispatchers for async
• OkHttp + Retrofit‑style interceptors for network, Coil for image loading
• Glance (app widget) and Moko‑resources (i18n)