An clone of hn.premii.com implemented in Kotlin Multiplatform with shared Android/Desktop Compose UI, SwiftUI on iOS and React for Web
This example supports the following targets:
Android(Compose)Desktop/JVM(Compose)Web/JavaScript(React)iOS(SwiftUI)
Libraries used:
- Jetpack Compose - shared UI
- Decompose - navigation and lifecycle
- MVIKotlin - presentation and business logic
- SQLDelight - data storage
There are multiple modules:
:common:utils- just some useful helpers:common:database- SQLDelight database definition:common:main- displays top news:common:detail- displat comments for a news item:common:root- navigates betweenmainanddetailscreens:common:compose-ui- Shared Compose UI for Android and Desktop:android- Android application:desktop- Desktop application:web- Web browser application + React Web UIios- iOS Xcode project
The root module is integrated into Android, Desktop and iOS apps.
./gradlew :desktop:run
Open project in Intellij IDEA or Android Studio and run "android" configuration. or
./gradlew :android:installRunDebug
./gradlew :web:browserDevelopmentRun
Open and build the Xcode project located in ios folder.
or
./gradlew :ios:simulatorRunApp