Dextension is a Kotlin library that extends Decompose functionality for building multiplatform applications with better developer experience and single architecture.
- 📦 Enhanced Components – Simplified building blocks for UI logic
- 🛠 Improved API – Extension functions and utilities for Decompose
- 🌐 Multiplatform – Full support for all Decompose target platforms
- 🔄 Reactive Models – Streamlined state and event management
Here you can find example of constructing architecture around Dextension for Authenticate Feature Module.
In summary, with Dextension library you building a Screens tree like this:
Core module providing you main components of Dextension Architecture:
- Navigation Component - Contains and holding configuration navigation stack.
- ScreenComponent - The main component, used for single feature module. In MVI architecture it is ViewModel.
- EventComponent - Inherited from ScreenComponent, but without state.
- StateComponent - Inherited from ScreenComponent, but without events.
- ScreenWithEffectComponent - Expand ScreenComponent and provides side effects for communication with UI.
For navigation you can find BaseNavigator, which is abstraction with navigation stack.
You can find samples for Navigation and Screen components in sample directory.
Add the dependency to your build.gradle.kts:
sourceSets {
commonMain {
dependencies {
implementation("io.github.y19th:dextension-core:<version>")
}
}
}Compose module providing you ability to use Dextension components with Jetpack Compose(and Compose Multiplatform).
The main component of this module is abstraction of Screen. It must be the only one thing what you can share between feature modules. Also this module provides some extensions for better usage experience like SubscribedEffect or collectAsImmediateState.
Add the dependency to your build.gradle.kts:
sourceSets {
commonMain {
dependencies {
implementation("io.github.y19th:dextension-compose:<version>")
}
}
}Extensions module providing features, that cant be in core or compose modules.
It providing Scheduler interface and it's base implementation Coroutine Scheduler, that may help you to schedule some code and repeat it with delay.
It also providing useful coroutine extensions, that allow you to manipulate with CoroutineDispatcher. For example onLimitedDefault function, which is taking CoroutineScope as receiver and starting coroutine on Dispatcher.Default with applied limitedParallelism(1).
Add the dependency to your build.gradle.kts:
sourceSets {
commonMain {
dependencies {
implementation("io.github.y19th:dextension-extensions:<version>")
}
}
}Directly providing koin support for all Dextension components. In this module you have Koin + base name of component or screen, which providing KoinComponent.
Also here you have useful extensions for providing component or screen directly from koin. For example getComponent function, that inject component dependency without boilerplate code.
Add the dependency to your build.gradle.kts:
sourceSets {
commonMain {
dependencies {
implementation("io.github.y19th:dextension-koin:<version>")
}
}
}If you want to integrate this library into your project, you should install Dextension Template Plugin, which improving Dextension usage experience and allows you to write components much faster and easier.
You can find in sample module.



