# Configurable Features using Kotlin Multiplatform

DevFeed: [Configurable Features using Kotlin Multiplatform](<https://devfeed.tech/articles/configurable-features-using-kotlin-multiplatform-24742.md>)

Original publisher: [Read original article](<https://medium.com/yazio-engineering/configurable-features-using-kotlin-multiplatform-12e7c1c57221?source=rss----65bd178b00af---4>)

Author: Artem Zasypalov

Published: 2023-09-01T06:55:38Z

Content type: tutorial

Language: en

Sources: [YAZIO Engineering - Medium](<https://devfeed.tech/sources/yazio-engineering-medium.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [client library](<https://devfeed.tech/topics/client-library.md>)

Tags: [business-logic](<https://devfeed.tech/tags/business-logic.md>), [compose](<https://devfeed.tech/tags/compose.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [development](<https://devfeed.tech/tags/development.md>), [feature-engineering](<https://devfeed.tech/tags/feature-engineering.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [library](<https://devfeed.tech/tags/library.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [product-development](<https://devfeed.tech/tags/product-development.md>), [software-development](<https://devfeed.tech/tags/software-development.md>)

## AI overview

YAZIO describes using Kotlin Multiplatform to make its onboarding feature configurable. A shared module provides configuration structures and validation for both the mobile app and a Compose Desktop Flow Configurator, allowing product teams to construct and experiment with screen flows without code changes for existing screen types.

## Source excerpt

At YAZIO we love working efficiently. All business logic of our app's new features is written using Kotlin Multiplatform, and we share its code up to the ViewModels. This approach reduces engineering effort, increases stability, and conserves resources. We are always on the lookout for the next step. Some screens and even entire features require swift reactions in changing situations to provide the highest level of experience to our users. The first candidate was Onboarding. Our creative Product Team strives for excellence in first user impressions, meaning that changes in this part of the app occur more frequently than in others. That's why our Development department decided to make this feature not just flexible for content changes, but fully configurable. This means that engineering effort will be reduced to zero for changes that involve only existing Screen Types. Here comes our first term. A Screen Type is a combination of layout and business logic used for the screen in a Flow. And a Flow is a sequence of screens presented to a user in the feature. Our goal was to provide the Product team with a way to construct Flows and use them in the app without code changes. We took advantage of Kotlin Multiplatform again. First, we decided to have a single source of truth for both the app and the Flow Configurator. Configuration data structures and their validations are in a separate multiplatform module. This module is shared between our KMM client library with business logic and the Compose Desktop Flow Configurator app. In the Configurator, we can use our Screen Types to create screen instances and connect them to construct a Flow, create branching to cover all user's questions and concerns, and experiment with content and screen sequences. The saved configuration is then exported and used in the YAZIO mobile app. By delegating responsibility for screen sequences and content, we didn't neglect the safety of our solution. Each flow undergoes a series of validations to