mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-05-16 00:01:23 +00:00
An example of Kotlin Multiplatform todo app with shared Jetpack Compose UI.
Supported targets: Android and JVM.
Libraries used:
- Jetpack Compose - shared UI
- Decompose - navigation and lifecycle
- MVIKotlin - presentation and business logic
- Reaktive - background processing and data transformation
- SQLDelight - data storage
There are multiple common modules:
utils- just some useful helpersdatabase- SQLDelight database definitionmain- displays a list of todo items and a text fieldedit- accepts an item id and allows editingroot- navigates betweenmainandeditscreens
The root module is integrated into both Android and Desktop apps.
Features:
- 99% of the code is shared: data, business logic, presentation, navigation and UI
- View state is preserved when navigating between screens, Android configuration change, etc.
- Model-View-Intent (aka MVI) architectural pattern
To run the desktop application execute the following command: ./gradlew desktop:run.
To run the Android application you will need to open the project in Intellij IDEA or Android Studio and run "android" configuration.