Skip to content

davidpetkov/tech-assignment-2coders

Repository files navigation

TMDB Movie Explorer

Kotlin Compose Hilt AGP

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.

📱 Screenshots

Main Feed Details Screen Search Screen
Feed Screen Details Screen Search Screen

✨ Features

1. Main Screen (Feed)

  • 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.

2. Details Screen

  • 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 heart icon 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.

3. Search Screen

  • 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.

🛠 Tech Stack

The project is built with Kotlin 2.0.21 and utilizes the following libraries:

User Interface

  • Jetpack Compose (BOM 2024.09.00)
  • Coil (2.7.0) - Asynchronous image loading.
  • Navigation Compose (2.9.6)

Architecture & Injection

  • Hilt (2.59) - Dependency Injection.
  • Hilt Navigation Compose (1.0.0)
  • Lifecycle ViewModel (2.6.1)
  • AndroidX Core KTX (1.10.1)

Networking & Data

  • 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.

Testing

  • JUnit 4 (4.13.2)
  • Mockk (1.14.9)
  • MockWebServer (5.3.2)
  • Coroutines Test (1.7.3)

Tools

  • Timber (5.0.1) - Logging.
  • KSP (2.3.2) - Kotlin Symbol Processing.

🏛 Architecture

This project enforces Clean Architecture with a strict separation of concerns:

  1. Presentation (UI) Layer:
    • Composables and ViewModels.
    • Handles UI state and user interactions (like clicking the Favorite heart).
  2. Domain Layer:
    • Contains business logic.
    • Defines Repository interfaces.
    • Pure Kotlin (no Android dependencies).
  3. Data Layer:
    • Implementation of Repositories.
    • RemoteDataSource: Manages Retrofit/TMDB API calls.
    • LocalDataSource: Manages Room Database for caching.

🚀 Getting Started

Prerequisites

  • Android Studio (Ladybug or newer recommended for AGP 9.0.0).
  • JDK 17 or higher.
  • TMDB API Key.

Installation

  1. Clone the repo:
    git clone https://github.com/davidpetkov/tech-assignment-2coders
  2. Add API Key: Create a secret.properties file in the root directory and add your TMDB key:
    TMDB_API_KEY="your_actual_api_key"
  3. Build: Open the project in Android Studio and sync Gradle.
  4. Run: Select the app configuration and run on an Emulator or Physical Device.

🧪 Testing

Unit Tests (Domain/Data logic):

./gradlew testDebugUnitTest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages