Learn from a running application

KMP, without the toy project.

Trace one production-shaped Kotlin codebase across Android, desktop JVM, and iOS. Yokan makes source sets, shared Compose UI, platform services, networking, persistence, and state management concrete.

source-set mapcomposeApp
commonMain domain · data · services · Compose UI
androidMainAndroid SDK + OkHttp
desktopMainJVM + native window
iosMainKotlin/Native + Darwin

One shared product. Thin hosts. Explicit platform seams.

A deliberate route

Read the project in three passes.

Each chapter answers one question, points to the exact Yokan files, and leaves you with a small inspection exercise.

01 · ORIENT

Build one target

Set up JDK 21, understand the composite build, run desktop first, and learn what Gradle configures for every target.

Open get started →
02 · TRACE

Follow startup

Walk from each native host into the shared runtime, Room database, state container, and shared Compose application.

Open architecture →
03 · REUSE

Extract the patterns

Study expect/actual boundaries, target-specific engines, shared MVI, coroutine ownership, persistence, and tests.

Open patterns →
The mental model

Share intent. Isolate capability.

KMP is not “write every line once.” Yokan shares product behavior and UI, then implements capabilities where each operating system has the right API.

Shared product model

Manga, Chapter, repositories, state, navigation, readers, and most services live in common Kotlin.

composeApp/src/commonMain

Platform implementations

HTTP engines, databases, file pickers, sharing, native players, notifications, and system UI use target APIs.

androidMain · desktopMain · iosMain

Shared presentation

Compose Multiplatform renders the same YokanApp() from Android, a desktop window, and a SwiftUI host.

ui/App.kt

Portable infrastructure

Ktor, Room KMP, coroutines, serialization, Coil, and bundled SQLite carry most infrastructure across targets.

composeApp/build.gradle.kts
A real execution path

From native launch to shared screen.

Use this path whenever the project feels large. It crosses the important boundaries without touring every feature.

HostMainActivity, main(), or SwiftUI
BootstrapYokanRuntime.bootstrap()
CompositionYokanApp()
FeaturesShared state + screens
Keep the repository open while reading.

The guide links to exact files and symbols. Read the surrounding code: the trade-offs are clearer in context than in isolated snippets.

What you will learn

Enough theory to explain the code.

This is a project field guide, not a replacement for the Kotlin language or platform SDK documentation.

SOURCE SETS

Where code belongs

Learn how shared, intermediate, and platform source sets form a dependency tree—not a collection of folders.

BOUNDARIES

When to use expect/actual

Recognize small platform seams and avoid moving product logic into three divergent implementations.

DELIVERY

How targets become apps

See Android and desktop entry points alongside the static Kotlin framework embedded by the iOS SwiftUI host.