A modern Android application designed to browse movies and TV series using The Movie Database (TMDB) API. This project demonstrates modern Android development practices, focusing on Jetpack Compose and Clean Architecture principles.
| Main Feed | Details Screen | Search Screen |
|---|---|---|
![]() |
![]() |
![]() |
- Jetpack Compose UI: A reactive, declarative UI displaying a list of trending movies.
- Infinite Scroll: Implemented using Paging 3 to seamlessly load large datasets without performance impact.
- Movie Cards: Each item displays the movie title, poster image, and a short description.
- Extended Metadata: Upon selection, the app navigates to a detailed view showing ratings, vote counts, and author/creator information.
- Favorites System: Users can click the
hearticon to save a movie to their local favorites list. This state is persisted across app launches. - Rich Media: High-quality backdrops and posters loaded efficiently.
- Multi-Type Search: Users can search for both Movies and TV Series.
- Throttled Search: Input is debounced/throttled to optimize API usage and reduce network strain while the user types.
The project is built with Kotlin 2.0.21 and utilizes the following libraries:
- Jetpack Compose (BOM 2024.09.00)
- Coil (2.7.0) - Asynchronous image loading.
- Navigation Compose (2.9.6)
- Hilt (2.59) - Dependency Injection.
- Hilt Navigation Compose (1.0.0)
- Lifecycle ViewModel (2.6.1)
- AndroidX Core KTX (1.10.1)
- Retrofit (3.0.0) - Type-safe HTTP client.
- OkHttp (4.12.0) - HTTP client and interceptors.
- Moshi (1.15.0) - JSON parsing.
- Paging 3 (3.3.6) - Pagination for infinite scrolling.
- Room Database (2.8.4) - Local persistence and caching.
- JUnit 4 (4.13.2)
- Mockk (1.14.9)
- MockWebServer (5.3.2)
- Coroutines Test (1.7.3)
- Timber (5.0.1) - Logging.
- KSP (2.3.2) - Kotlin Symbol Processing.
This project enforces Clean Architecture with a strict separation of concerns:
- Presentation (UI) Layer:
- Composables and ViewModels.
- Handles UI state and user interactions (like clicking the Favorite heart).
- Domain Layer:
- Contains business logic.
- Defines Repository interfaces.
- Pure Kotlin (no Android dependencies).
- Data Layer:
- Implementation of Repositories.
- RemoteDataSource: Manages Retrofit/TMDB API calls.
- LocalDataSource: Manages Room Database for caching.
- Android Studio (Ladybug or newer recommended for AGP 9.0.0).
- JDK 17 or higher.
- TMDB API Key.
- Clone the repo:
git clone https://github.com/davidpetkov/tech-assignment-2coders
- Add API Key:
Create a
secret.propertiesfile in the root directory and add your TMDB key:TMDB_API_KEY="your_actual_api_key"
- Build: Open the project in Android Studio and sync Gradle.
- Run:
Select the
appconfiguration and run on an Emulator or Physical Device.
Unit Tests (Domain/Data logic):
./gradlew testDebugUnitTest

