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
![image](https://private-user-images.githubusercontent.com/62279741/250531123-ad92ac74-1a74-49df-a226-969b0cba96ba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEzMTIxMzQsIm5iZiI6MTcyMTMxMTgzNCwicGF0aCI6Ii82MjI3OTc0MS8yNTA1MzExMjMtYWQ5MmFjNzQtMWE3NC00OWRmLWEyMjYtOTY5YjBjYmE5NmJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE4VDE0MTAzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY4ZWFiOTYzNzk1Y2MzMGNlMzBmMWE3YWVjZmVkNjYxYjBiNjczMzg5YTFkYWM1ZGFjYWY4MWQ2NjVjZTcxMWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vTVg-SEzZtk-CYKKgY61T08MblkD58O8NmpmafD6LuI)
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
(...์์ฑ์ค)