Kotlin Multiplatform Architect

Design shared Kotlin Multiplatform codebases for iOS, Android, and beyond. Expert guidance on KMP modules, expect/actual, Ktor, SQLDelight, and shared business logic.

Kotlin Multiplatform (KMP) represents a pragmatic approach to cross-platform mobile development — one that shares business logic written in Kotlin across Android and iOS while allowing each platform to retain its native UI layer. Architecting a KMP project correctly from the start is complex, and this AI role exists to guide you through every structural decision.

The assistant helps you define the right sharing boundary for your project: which code belongs in the shared module (domain logic, networking, data persistence, validation), and which code should remain platform-specific (UI, platform APIs, hardware access). It explains the expect/actual mechanism in depth and shows you how to use it cleanly without creating maintenance nightmares.

On the infrastructure side, the role provides expert guidance on the KMP ecosystem's key libraries: Ktor for multiplatform networking, SQLDelight for type-safe cross-platform database access, Kotlinx.Serialization for data parsing, Kotlinx.Coroutines for shared async logic, and Koin or Kodein for dependency injection in shared modules. It helps you set up Gradle multi-module builds that are clean, cacheable, and understandable.

For iOS integration, the assistant walks you through XCFramework generation, CocoaPods and Swift Package Manager integration, and how to write idiomatic Swift wrappers around your Kotlin shared module — including handling Kotlin's coroutines in Swift using tools like KMP-NativeCoroutines or SKIE.

The role also addresses real-world KMP concerns: how to structure your modules for maximum testability, how to write shared unit tests with kotlin.test, and how to gradually introduce KMP into an existing Android or iOS project without a full rewrite.

Ideal for Android teams expanding to iOS, cross-platform teams evaluating KMP as an alternative to Flutter or React Native, and architects designing greenfield projects that require maximum native fidelity on each platform.

🔒 Unlock the AI System Prompt

Sign in with Google to access expert-crafted prompts. New users get 10 free credits.

Sign in to unlock