Hello and welcome! This is our approach to implement a kotlin multiplatform Architecture. This repo is still Work-In-Progess but for sure you can just take a look!
The project is based on only 3 main "folders" but lots of modules. The folders are:
androidApp
: This includes the activities/fragments needed to paint the UI
iosApp
: This includes the SwiftUI
views
shared
: Includes all the shared
submodules.
A feature involves at least 5 modules. For example, the Poi list screen
contains:
androidApp
/iosApp
:MainActivity
andContentView
shared:feature:poi:poiui
:PoiUI
shared:feature:poi:poirepository
:PoiRepository
shared:data:remote
:PoiRemote
shared:data:local
:PoiLocal
shared:core
:core
data classes
Take a look at this diagram, just to have a picture of the project:
Coroutines
: https://kotlinlang.org/docs/coroutines-overview.htmlStateFlow
: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/SQLDelight
: https://cashapp.github.io/sqldelight/multiplatform_sqlite/Ktor
: https://ktor.io/docs/client.htmlKoin
: https://insert-koin.io/
WIP