For best practices: Clean Architecture, Multi Modules, Hilt, MVVM, Coroutines with migrating a View-based app to Jetpack Compose.
- You should get an API Key. (https://developer.marvel.com/)
- Save the base url and your keys (public & private key) in your
local.properties
.
MARVEL_BASE_URL = "https://gateway.marvel.com:443/v1/public/"
MARVEL_PUBLIC_KEY = [YOUR PUBLIC KEY]
MARVEL_PRIVATE_KEY = [YOUR PRIVATE KEY]
- Build and run the project
The application consists of 3 layers.
- Presentation Layer
view
: Displays the application data on the screen (Activity/Fragment)viewmodel
: Stores UI related data and interacts with the domain layer.
- Domain Layer
Contains the business logic of the application.
It's an individual module and complete java/kotlin module.
The domain layer is responsible for encapsulating complex business logic, or simple business logic that is reused by multiple ViewModels.usecase
: Contains the business logic of the application.repository interface
model
(domain) : Represents the domain-specific objects or entities.
- Data Layer
Handles data retrieval, storage, and mapping.datasource
: Represents the source of data, such as a network API or a local DB responsible for data retrieval and storage.repository impl
: Implements the repository interface in the domain layer.mapper
: Converts data model to domain model.model
(dto) : Represents the data structure or objects used within the data layer.
app
: Serves as an entry point to the application.feature
: Contains an isolated part of an app's functionality.common-ui
: Contains custom UI elements that helps make UI consistent across different features.domain
: Encapsulates the business logic of the application.data
: Contains a repository, data sources and model classes.
Clean Architecture
+Multi Module
+MVVM
- Migrate from a View-based app to
Compose
. Coroutines
Flow
: AsynchronousViewModel
ViewBinding
Navigation
Compose
: JetpackHilt
: Dependency InjectionRetrofit
: NetworkGlide
: Image Library
(...작성중)