# Introducing Kotlin Multiplatform in an existing project

DevFeed: [Introducing Kotlin Multiplatform in an existing project](<https://devfeed.tech/articles/introducing-kotlin-multiplatform-in-an-existing-project-25556.md>)

Original publisher: [Read original article](<https://www.marcogomiero.com/posts/2021/kmp-existing-project/>)

Author: Marco Gomiero

Published: 2021-02-25T00:00:00Z

Content type: article

Language: en

Sources: [Posts on Marco Gomiero](<https://devfeed.tech/sources/posts-on-marco-gomiero.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>)

Tags: [analytics](<https://devfeed.tech/tags/analytics.md>), [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [backend](<https://devfeed.tech/tags/backend.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [data](<https://devfeed.tech/tags/data.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [example](<https://devfeed.tech/tags/example.md>), [existing](<https://devfeed.tech/tags/existing.md>), [feature](<https://devfeed.tech/tags/feature.md>), [features](<https://devfeed.tech/tags/features.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [mono-repo](<https://devfeed.tech/tags/mono-repo.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [project](<https://devfeed.tech/tags/project.md>), [repo](<https://devfeed.tech/tags/repo.md>), [structure](<https://devfeed.tech/tags/structure.md>), [technology](<https://devfeed.tech/tags/technology.md>)

## AI overview

The excerpt recommends introducing Kotlin Multiplatform into an existing project by extracting small, gradually separable pieces of shared code and serving them to existing projects as a library. Boilerplate such as constants, data models, and DTOs, or shared utilities and analytics helpers, are suggested starting points. Small extractions take less time to validate and leave room to build the library architecture; beginning with an entire network layer risks wasted work if KMP proves unsuitable. The author says Uniwhere started with some DTOs, then migrated the rest after validating the process. The excerpt begins describing a separate-repository setup for the KMP library, backend, and platform apps, but cuts off before completing that structure.

## Source excerpt

After discovering a new interesting technology or framework, you will probably start asking yourself how to integrate it into an existing project. That's because, the possibility to start with a blank canvas is rare (not impossible, but rare). This is also the case for Kotlin Multiplatform (I'll call it KMP in the rest of the article). When starting a new blank KMP project it is easier to have a mono-repo structure like this: