This project is a Kotlin Multiplatform Mobile(KMM) demo that uses Compose to write a fully shared code between Android and Ios including UI.
This app will show a list of characters (Name and Image) of the television show Rick and Morty.
- Pagination by page number
- Pull to refresh.
- Loading item inside the list during the api request.
- Error item inside the list if api request failed that include a retry button.
- VersionCatalog to manage dependencies.
- Multiplatform resources.
- ViewModel with Koin DI.
- Type-safe compose navigation.
- Shimmer Animation.
- Shared-elements transition.
- Offline cache by database (Room)
- Memory & Disk image caching (Coil)
Before you run this project, use the KDoctor tool to ensure that your development environment is configured correctly:
-
Install KDoctor with Homebrew:
brew install kdoctor
-
Run KDoctor in your terminal:
kdoctor
If everything is set up correctly, you'll see valid output:
Environment diagnose (to see all details, use -v option): [✓] Operation System [✓] Java [✓] Android Studio [✓] Xcode [✓] Cocoapods Conclusion: ✓ Your system is ready for Kotlin Multiplatform Mobile development!
Otherwise, KDoctor will highlight which parts of your setup still need to be configured and will suggest a way to fix them.
- Jetpack Compose: for UI.
- Coroutine: to request data from server on thread other than UI thread.
- Ktor: to make api calls.
- Kotlinx-Serialization: to deserialize api response.
- Compose ImageLoader: to load images from url.
- Koin: to inject dependencies (DI).
- Lifecycle to have Google's implementation of ViewModel.
- Compose Navigation to have JetBrains implementation of Compose Navigation
- Room to have offline cache.
- Coil loading & caching images.
- Project configurations are based on this template
- Kindly note that Compose Multiplatform is still in alpha, so it is subject to change and may require a manual migration process when it is released.
If you have any questions or suggestions please contact me at malbdour92@gmail.com
Find me on LinkedIn: https://www.linkedin.com/in/mobidroid92/