dbaroncelli / D-KMP-sample

D-KMP Architecture official sample: it uses a shared KMP ViewModel and Navigation for Compose and SwiftUI apps.
Apache License 2.0
793 stars 89 forks source link
android compose-desktop d-kmp declarative-ui ios jetpack-compose kmm kmp kmp-viewmodel kotlin kotlin-multiplatform kotlin-multiplatform-mobile ktor-client multiplatform-settings mvi sqldelight stateflow swiftui

D-KMP architecture - official sample

This is the official sample of the D-KMP architecture, presenting a simple master/detail app, for Android, iOS and Desktop.
(the Web version will be added at a later stage, when "Compose for Web" and "Kotlin/Wasm" become more mature)

Key features of the D-KMP architecture:

you can find more info on these articles:

Data sources used by this sample:

these are other data sources, not used by this sample, for which popular KMP libraries exist:

Instructions to write your own D-KMP app:

If you want to create your own app using the D-KMP Architecture, here are the instructions you need:

SHARED CODE:

View Model

Data Layer



PLATFORM-SPECIFIC CODE:

Android

Schermata 2021-06-26 alle 16 54 32

Schermata 2021-06-26 alle 17 03 13

iOS

ios-files

Desktop

Schermata 2021-06-26 alle 16 54 15

Schermata 2021-06-26 alle 17 03 13

Web (not yet implemented)