A simple Marvel characters app built using Jetpack Compose, Paging 3, and Kotlin Coroutines, implementing a clean architecture approach with the MVVM (Model-View-ViewModel) pattern. The app fetches data from the Marvel API to display a list of characters, supports pagination, and includes detailed character views.
Characters List | Character Details | Images Gallery |
---|---|---|
Search | ||
- Character List: Displays a list of Marvel characters loaded from the Marvel API with pagination support.
- Search: Filter results by character name using the search functionality.
- Character Details: View detailed information about a character, including images of comics, series, stories, and events (lazy-loaded as needed). Empty sections are hidden if no data is available.
- Images Gallery: Preview details screen section in gallery view.
This project follows Clean Architecture principles to ensure separation of concerns and scalability. It is implemented using the MVVM ( Model-View-ViewModel) pattern. Key layers include:
- Presentation Layer: Jetpack Compose for UI and ViewModels for state management.
- Domain Layer: Use cases encapsulating business logic.
- Data Layer: Repositories interacting with the Marvel API using Retrofit.
- MVVM Architecture: Implements Model-View-ViewModel pattern for separation of concerns.
- Kotlin: Official programming language for Android development.
- Jetpack Compose: Modern toolkit for building native UI.
- Paging 3: For handling infinite scrolling and pagination.
- Retrofit: A type-safe HTTP client for API communication.
- Kotlin Coroutines: Asynchronous programming with structured concurrency.
- Hilt: Dependency injection library for Android.
- Flow: Reactive streams for managing asynchronous data streams.
- Material3 Design: UI/UX design framework.
-
Clone the repository:
git clone https://github.com/MuhamedFathy/MarvelApp.git
-
Open the project in Android Studio.
-
Obtain your Marvel API keys from Marvel Developer Portal and add them to the project:
- Navigate to
local.properties
(project-level). - Add the keys as
PUBLIC_API_KEY
andPRIVATE_API_KEY
in the file.
- Navigate to
PUBLIC_API_KEY="key_here"
PRIVATE_API_KEY="key_here"
- Sync, build, and run the project.