🗡️ Mosterdex exemplifies modern Android development with Hilt, Coroutines, Flow, Room, ViewModel, and Material Design, all structured within an MVVM architecture.
Monsterdex has two screens:
- List of Pokémon fetched from an API and stored in a Room database using paging.
- Detailed information about individual Pokémon.
- Minimum SDK level: 24
- Developed with Kotlin, Coroutines and Flow for asynchronous programming.
- Jetpack
- Lifecycle: Observe Android lifecycles and handle UI states upon lifecycle changes.
- ViewModel: Manages UI-related data holder and is lifecycle aware, allowing data to survive configuration changes such as screen rotations.
- Room: provides an abstraction layer over SQLite.
- Compose: Android’s recommended modern toolkit for building native UI
- Hilt: Used for dependency injection.
- Architecture
- MVVM Architecture (Compose - ViewModel - Model)
- Repository Pattern
- Compose Navigation: Provides navigation support for Jetpack Compose applications
- Retrofit2 & OkHttp3: Used to construct REST APIs and handle paging network data.
- Sandwich: Provides a lightweight and modern response interface to handle network payloads on Android.
- Moshi: A modern JSON library for Kotlin and Java.
- ksp: Kotlin Symbol Processing API.
- Turbine: A small testing library for kotlinx.coroutines Flow.
- Material3: Material 3 is the latest version of Google’s open-source design system
- Coil: An image loading library for Android backed by Kotlin Coroutines
- Compose Animation: Powerful and extensible APIs that make it easy to implement various animations in your app's UI
- Timber: A logger with a small, extensible API.
Monsterdex is based on the MVVM architecture and the Repository pattern, which follows the Google's official architecture guidance.
The Monsterdex app has been fully modularized
Top tip: A module graph (shown above) can be useful during modularization planning for visualizing dependencies between modules.
The Monsterdex app contains the following types of modules:
app:
module - Contains app-level classes and navigation control. Depends on all feature and required core modules.feature:
module - Specific to single responsibilities in the app. Reusable across different apps. Maintain isolation, keeping classes within the module if only used there.core:
module - Houses common code and shared dependencies. Can be used by multiple modules. Do not depend on feature or app modules.
Mosterdex use the PokeAPI for constructing REST API.
PokeAPI provides a RESTful API interface to highly detailed objects built from thousands of lines of
data related to Pokémon
This project draws inspiration from Pokedex created by skydoves.
Monsterdex is distributed under the terms of the Apache License (Version 2.0). See the license for more information.