Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Project structure · Mobile

Kotlin Multiplatform project structure

Opens with credits

For students who want one Kotlin codebase for Android and iOS. The tree follows the current KMP wizard layout: a shared module with commonMain, androidMain and iosMain, a thin androidApp module, and an iosApp Xcode project, with Compose Multiplatform for shared UI. It grows into feature folders with Ktor, Room and Koin, adds tests that run on both platforms, signing and store releases, and for large teams, convention plugins and more modules.

Curated by Tauseef FayyazIntermediate138 files and foldersKotlin 2.4, Compose Multiplatform 1.12, AGP 9.4Checked October 2026
Explore the filesPick any file to see what it is, why it exists and when you add it.

How it grows

Each stage opens the explorer there

  1. 1Day 1What the scaffold and your first hour give you53 files and folders
  2. 2GrowingWhat a real app with features and tests adds+38 files and folders
  3. ProductionWhat running it for real users adds+25 files and foldersOpens with credits
  4. ExpertWhat a team needs to keep it healthy for years+22 files and foldersOpens with credits

How it is organised

  • Share as much as is useful, not everything: business logic, networking, storage and usually UI go in commonMain; platform-only APIs stay in androidMain and iosMain behind small interfaces or expect/actual.
  • Prefer interfaces injected with Koin over expect/actual for anything bigger than a function. Interfaces can be faked in tests; expect declarations cannot.
  • Group commonMain by feature (orders, auth), with shared data and ui folders used by many features. A feature never imports another feature.
  • The androidApp module and the iosApp Xcode project stay thin: entry points, icons, permissions and signing. If logic is creeping in there, it belongs in shared.
  • Use multiplatform libraries for shared code: Ktor, kotlinx.serialization, kotlinx-coroutines, Room or SQLDelight, Koin, the JetBrains builds of ViewModel and Navigation.
  • All versions live in gradle/libs.versions.toml. Kotlin, KSP and Compose Multiplatform move together.
  • Write most tests in commonTest so they run on JVM, Android and iOS. CI must build and test both platforms on every pull request.
  • Nothing secret is compiled into either app; tokens go to the Keychain on iOS and encrypted storage on Android.

At the top of the project

Open one in the explorer for the full story

Learn more on Sefism

Roadmaps, cheat sheets and projects that go with Kotlin Multiplatform.

See 6 more
Checked against 18 official sources, October 2026. If something has changed, the docs win.Show sources

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com