Skip to content

Latest commit

 

History

History
98 lines (84 loc) · 7.07 KB

README.md

File metadata and controls

98 lines (84 loc) · 7.07 KB

Movie Rating Demo

This is a demo of movie & TV show that implements MVVM design pattern by following the Clean Architecture principles, using TMDB API which is available on Github Public APIs page.

Tech stack & Open-source libraries

Some Demo app Features

  • Browse popular and top rated movies/tv shows on the Home page
  • Search movies/tv shows on the Search page
  • See the details of a movie/tv show
    • Watch trailers tiles and navigated to youtube
    • You can choose the movie/tv show as favorite by tapping the favourite icon
  • View favorite movies/tv shows on the Favorites page
  • Offline support (if cached data is available)
  • Light and Dark mode support

Demo App Structure

  • androidTest (Instrumentation Tests Espresso and Hilt Test Lib)
  • debug (HiltTestActivity for UI tests)
  • main
  • sharedTest (directory act as bridge between unit and instrumentation tests. It contains files like Fake Hilt Modules, fake Repository, Hilt Test Runner)
  • test (Unittest cases Robolectric, Mockito and Hilt)

The project is structured into three distinct layers that have been designed to address concerns related to Separation of Concerns and Testability.

  • Data
  • Presentation
  • Domain

Data

The first layer is the Data layer, which is responsible for managing the application data that is fetched from either the network or the local database.
This layer consists of four packages

  • local : The local package comprises the Room components that are used to fetch data from the local database.
  • mapper : The mapper package contains mapping functions to map the data retrieved from various sources to domain models.
  • remote : The remote package comprises the Retrofit components used to fetch data from the network source.
  • repository : The repository package contains the implementations of repository interfaces defined in the domain layer.

Presentation

The second layer is the Presentation layer, which is responsible for rendering the application data on the screen.
This layer consists of two packages

  • adapter : The adapter package contains RecyclerView and ViewPager2 adapter classes
  • ui : The ui package comprises Activities and Fragments with their corresponding ViewModel classes.

Domain

The third and central layer of the project is the Domain layer. This layer acts as a bridge between the data and presentation layers, retrieving data from the former and exposing it to the latter. The Domain layer is independent of other layers, which means that changes in other layers do not affect it.
The Domain layer consists of three packages

  • model : The model package contains data classes that hold the data retrieved from the data layer, to be used later on in the presentation layer to expose it to the UI.
  • repository : The repository package contains repository interfaces that abstract the domain layer from the data layer.
  • usecase : The usecase package contains use cases that handle the business logic, which can be reused by multiple ViewModels.

Demo Video

Youtube: https://youtu.be/-HLev0uGmlg Watch the video

Try the App

Check out the Releases and download & install the APK file to try the app.