A simple Android application built with Kotlin and Jetpack Compose to explore characters from the Rick and Morty universe using the Rick and Morty API.
- Browse Characters: View a paginated list of characters from the show.
- Character Details: Tap on a character to see more detailed information (implementation dependent).
- Pagination: Loads characters page by page as you scroll.
- Modern UI: Built entirely with Jetpack Compose, featuring an edge-to-edge display.
- Image Loading: Asynchronously loads character images.
This project utilizes several modern development stack:
- Language: Kotlin
- Platform: Kotlin MultiPlatform
- UI Toolkit: Compose MultiPlatform for declarative UI.
- Architecture: MVVM (Model-View-ViewModel)
- ViewModel:
androidx.lifecycle.ViewModelto hold and manage UI-related data. - Repository: To abstract data sources (network, local database).
- ViewModel:
- Asynchronous Programming: Kotlin Coroutines and Flow for managing background tasks and data streams.
- Networking: Ktor Client for making HTTP requests to the Rick and Morty API.
- Dependency Injection: Koin (as indicated by
koinViewModel()). - Image Loading: Coil 3 for loading and displaying images.
- Logging: Uses a logging library (as indicated by
com.diamondedge.logging.loggingorio.ktor.util.logging.KtorSimpleLogger).
- Android Studio (latest stable version recommended, e.g., Koala or newer for latest Compose features)
- JDK 17 or higher
- Clone the repository:
git clone [https://github.com/laetuz/Rickpository-CMP.git](https://github.com/laetuz/Rickpository-CMP.git) cd Rickpository-CMP - Open in Android Studio: Open the cloned project using Android Studio.
- Build the project:
Android Studio should automatically sync Gradle and download dependencies. You can then build the project using
Build > Make Projector by running it on an emulator or physical device.
The Rick and Morty API is public and does not require an API key.
app/src/main/java/id/neotica/rickpository/: Root packagedata/: Contains data layer components.CharacterRepositoryImpl.kt: Implementation of the repository pattern.local/: Room database components (Entities, DAOs, Database class).remote/: Ktor client setup and API service definitions.
domain/: Contains domain layer components.model/: Data models (e.g.,Character,RickAndMortyResponse,ApiResult).repository/: Repository interface (if defined).
presentation/: Contains UI layer components (Jetpack Compose).characters/: Composables and ViewModel for the characters list screen.character_detail/: (If implemented) Composables and ViewModel for the character detail screen.
di/: Koin modules for dependency injection.navigation/: Jetpack Compose Navigation setup.
This project uses the public Rick and Morty API. All data is fetched directly from this API.
This project is licensed under the MIT License.