https://github.com/vladleesi/factastic
Useless facts every day! Here's an example of a multiplatform app with shared UI and network logic built with Kotlin Multiplatform and Compose Multiplatform for Android, iOS and Desktop.
https://github.com/vladleesi/factastic
android compose-multiplatform desktop desktop-app desktop-application ios kotlin kotlin-android kotlin-coroutines kotlin-flow kotlin-ios kotlin-multiplatform kotlin-multiplatform-mobile kotlin-serialization ktor ktor-client macos-app
Last synced: 19 days ago
JSON representation
Useless facts every day! Here's an example of a multiplatform app with shared UI and network logic built with Kotlin Multiplatform and Compose Multiplatform for Android, iOS and Desktop.
- Host: GitHub
- URL: https://github.com/vladleesi/factastic
- Owner: vladleesi
- License: mit
- Created: 2023-06-08T02:06:55.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-06T23:11:35.000Z (over 1 year ago)
- Last Synced: 2025-03-25T11:52:26.014Z (about 1 month ago)
- Topics: android, compose-multiplatform, desktop, desktop-app, desktop-application, ios, kotlin, kotlin-android, kotlin-coroutines, kotlin-flow, kotlin-ios, kotlin-multiplatform, kotlin-multiplatform-mobile, kotlin-serialization, ktor, ktor-client, macos-app
- Language: Kotlin
- Homepage: https://dev.to/vladleesi/write-once-run-everywhere-building-with-kmm-and-compose-multiplatform-3kh9
- Size: 95.7 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Factastic
Useless facts every day!
Here's an example of a multiplatform app with shared UI and network logic built with [Kotlin Multiplatform Mobile](https://kotlinlang.org/docs/multiplatform-mobile-getting-started.html) and [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/) for Android, iOS and Desktop.
| Android (Dark theme) | iOS (Light theme) |
| ----------- | ----------- |
|  |  || Desktop |
| ------- |
|  |### Stack
- [Kotlin Multiplatform Mobile](https://kotlinlang.org/docs/multiplatform-mobile-getting-started.html)
- [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/)
- [Kotlin Coroutines](https://kotlinlang.org/docs/coroutines-overview.html)
- [Kotlin Serialization](https://kotlinlang.org/docs/serialization.html)
- [Ktor](https://ktor.io/docs/getting-started-ktor-client.html)
- [Napier](https://github.com/AAkira/Napier)### Project Structure
The project follows the Kotlin Multiplatform structure, allowing code sharing between Android and iOS platforms. Here's a brief overview of the project structure:- `shared`: Contains shared Kotlin code that is used by both Android and iOS.
- `androidApp`: Contains the Android-specific code, including activities, UI components, and Android-specific dependencies.
- `iosApp`: Contains the iOS-specific code, including view controllers, SwiftUI views, and iOS-specific dependencies.
- `desktop`: Contains the desktop-specific code for the Kotlin Multiplatform project, targeting desktop platforms such as Windows, macOS, and Linux.### Build
#### Android:
1. Open `androidApp` folder from [Android Studio](https://developer.android.com/studio)
2. Click Run#### iOS:
1. Open `iosApp/iosApp.xcodeproj` folder from [Xcode](https://developer.apple.com/xcode/resources/)
2. Click Run#### Desktop:
1. Open the project from [Android Studio](https://developer.android.com/studio)
2. Execute the command `./gradle :desktop:run` to run the desktop module.
> Since [IntelliJ IDEA](https://www.jetbrains.com/idea/) currently does not support Gradle versions above 7.4.0, follow these steps to address the issue:
> 1. In the gradle.properties file, temporarily change the Gradle plugin version to 7.4.0.
> 2. In the settings.gradle.kts file, disable the inclusion of (":androidApp").### Licence
This project is licensed under the [MIT License](LICENSE).