Skip to content

The movie DB app client that uses kotlin, coroutines, flow, koin, gson, room and an MVVM with a clean architicture approcah!

Notifications You must be signed in to change notification settings

AlaaAlShammaa/TMDB-MVVM

Repository files navigation

TMDB-MVVM

👑 The TMDB-MVVM is based on Kotlin, MVVM architecture, coroutines, kotlin flow, koin, material designs and animations.

Screeshots

What Open API Used?

The Movies Database (TMDB) is a community built movie and TV database. Every piece of data has been added by our amazing community dating back to 2008. TMDb's strong international focus and breadth of data is largely unmatched and something we're incredibly proud of. Put simply, we live and breathe community and that's precisely what makes us different.

How to build on your environment

Add your The Movie DB's API key in your key.properties file. if you don't have such file, please create a new file inside the app module and name it key.properties Open the file and paste the following snippet in it (Don't forget to add your api key 😉)

tmdb_api_key=YOUR_API_KEY

Module structure

The module structure is designed to try several different architectures.

Entity module

Entity module composed of entity models for persisting in database and response models for fetching data from network requests.

Dependencies

  • Room Persistence - constructing database (An abstraction layer over SQLite).
  • Gson converter - a converter which uses Gson for serialization to and from JSON.

Network module

Network module composed of abstractions for RESTful requests. An Interceptor for requesting every time with a query parameter api_key.

Dependencies

App-ui module

app-ui module composed of adapters and viewholders for composing recyclerview's item via databinding. And some factories and extensions related to custom views.

Dependencies

  • Google-Material - material Components for Android (MDC-Android) help developers execute Material Design.
  • Glide - loading image.

App module

app module is the implementation of user interfaces on the application. Based on mvvm architecture (view-databinding-viewmodel-model), coroutines, kotlin flow with the repository pattern.

  • JetPack
    • LiveData - notify domain layer data to views.
    • Lifecycle - dispose observing data when lifecycle state changes.
    • ViewModel - UI related data holder, lifecycle aware.
    • Room Persistence - construct database.
  • Koin - dependency injection
  • Timber - this is a logger with a small, extensible API.

Unit Testing Frameworks

  • Robolectric - Robolectric is the industry-standard unit testing framework for Android.
  • Mockito-Kotlin - a small library that provides helper functions to work with Mockito in Kotlin.

User Interface Design

Based on Material design & animations.

  • Google Material Design.
  • Shared Element Transition (COMING SOON).

Find this repository useful? ❤️

Support it by joining stargazers for this repository. ⭐
And follow me for my next creations! 🤩

License

Designed and developed by 2020 alaashammaa (Alaa Alshammaa)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.