How xdwil/komikku works
Project type and purpose
• Komikku is a feature‑rich Android manga reader app based on TachiyomiSY & Mihon.
• It uses a multi‑module, Clean‑Architecture style setup: UI (app), Presentation libraries, Domain, Data, Core utilities, plus feature‑specific modules (sources, i18n, flags, widgets).
Main components
• Presentation/UI Layer (app module + presentation‑core + presentation‑widget)
– Jetpack Compose screens, ViewModels, navigation
• Domain Layer (domain module)
– Use‑case Interactors, Domain models, Repository interfaces
• Data Layer (data module + source‑api + source‑local)
– Repository implementations, mappers, data sources (SQLDelight, SharedPreferences/DataStore, HTTP via OkHttp/Retrofit)
• Core Libraries (core/common, core/archive, core‑metadata)
– Utilities: networking interceptors, archive readers, metadata parsers
• Feature modules
– flagkit (SVG country flags), i18n‑* (multi‑language resources), macrobenchmark, CI scripts
• External services and systems
– Content sources (E‑Hentai, MangaDex, etc.), Trackers (AniList, MAL, Kitsu, …), Cloud backup (Google Drive, YomiSync)
• Persistence & caching
Relationships and interactions
1. UI → ViewModel → Domain Use Case (Interactor)
2. Use Case → Repository interface (defined in Domain)
3. Repository impl (in Data Layer) dispatches to:
a. Local data source (SQLDelight DB or DataStore)
b. Remote data source (HTTP APIs via OkHttp/Retrofit)
4. Results → Domain models → mapped to UI models (via Presentation‑Core) → UI
5. Background jobs (WorkManager) trigger Interactors for sync, updates, backup
6. External API calls (sources, trackers, backup) happen via dedicated Service classes
Architectural patterns and design principles
• Clean Architecture / Hexagonal: inner Domain surrounded by Data adapters and outer UI.
• Module layering: each Gradle module represents a layer or feature.
• Dependency inversion: Domain defines interfaces, Data & Presentation depend on Domain, not vice versa.
• Single Responsibility & Separation of Concerns at module level.
• DI: DI modules under tachiyomi/di (e.g. AppModule, PreferenceModule).
Details
• Multi‑module structure (app, data, domain, core, source‑api, source‑local, presentation‑core, presentation‑widget, flagkit, i18n, macrobenchmark).
• Don’t just list components—show how calls flow between UI, Domain, Data, and External.
• Clean Architecture boundaries and ports/adapters.