A Kotlin Multiplatform app for browsing Rick and Morty episodes across Android, iOS, and Desktop — built with Compose Multiplatform for a fully shared UI and a clean layered architecture separating data, domain, presentation, and UI concerns.
| Android Episodes | Android Episode Details |
|---|---|
![]() |
![]() |
| iOS Episodes | iOS Episode Details |
|---|---|
![]() |
![]() |
| Desktop Episodes | Desktop Episode Details |
|---|---|
![]() |
![]() |
- Shared Kotlin and Compose UI across Android, iOS, and Desktop/JVM from a single codebase
- Clean layered architecture — data, domain, presentation, and UI responsibilities fully separated
- REST API integration with Ktor Client, kotlinx.serialization, and DTO-to-domain mapping
- Dependency injection with Koin across all platforms
- ViewModel-driven UI state with Kotlin Coroutines and StateFlow
- Type-safe Compose Multiplatform navigation
- Episodes grouped by season with detail screen showing character grid, species, gender, origin, and status
- Pull-to-refresh, loading, error, empty, and retry UI states
- Image loading with Coil 3
- Shared Material 3 theme across all targets
| Area | Tools |
|---|---|
| Language | Kotlin |
| Multiplatform | Kotlin Multiplatform |
| UI | Compose Multiplatform, Material 3 |
| Navigation | JetBrains Compose Navigation |
| Async | Kotlin Coroutines, StateFlow |
| Networking | Ktor Client |
| Serialization | kotlinx.serialization |
| Dependency Injection | Koin |
| Images | Coil 3 |
| Targets | Android, iOS, Desktop/JVM |
The app follows a layered structure inside composeApp/src/commonMain/kotlin/com/example/rickmortykmp.
data/
remote/ Ktor API client and DTOs
mapper/ DTO-to-domain mapping
repository/ Repository implementations
domain/
model/ App domain models
repository/ Repository contracts
usecase/ Business use cases
presentation/
model/ UI state models
viewmodel/ Screen ViewModels
ui/
component/ Reusable Compose UI states
navigation/ Type-safe app navigation
screen/ Episode list and detail screens
theme/ Shared app theme
The Android, iOS, and Desktop entry points live in platform-specific source sets, while all application logic is shared through commonMain.
Uses the public Rick and Morty API — fetching all episodes across multiple pages, episode detail, and single or batch character loading.
./gradlew :composeApp:assembleDebug./gradlew :composeApp:runopen iosApp/iosApp.xcodeproj




