Home

Awesome

<h1 align="center">MovieHunt</h1> <p align="center"> MovieHunt is a sample Android project using <a href="https://www.themoviedb.org/">The Movie DB</a> API based on MVVM architecture. It showcases the latest Android tech stacks with well-designed architecture and best practices.

The new v2 re-design is available. šŸŽ‰ Check it out now!

<img src='art/home.png' width='25%'/><img src = 'art/home2.png' width='25%'/><img src='art/list.png' width='25%'/><img src ='art/movie_detail.png' width='25%'/>

</p>

Features

<img src="./art/moviehunt-demo.gif" align="right" width="32%"/>

Tech Stacks

Architectures

MVVM

We follow Google recommended Guide to app architecture to structure our architecture based on MVVM, reactive UI using LiveData / RxJava observables and data binding.

Package Structures

com.enginebai.moviehunt # Root Package
ā”œā”€ā”€ data                # For data modeling layer
ā”‚   ā”œā”€ā”€ local           # Local persistence database
|   ā”‚   ā”œā”€ā”€ dao         # Data Access Object for Room
|   |   ā”œā”€ā”€ model       # Model classes
ā”‚   ā”œā”€ā”€ remote          # Remote data source
ā”‚   ā””ā”€ā”€ repo            # Repositories for single source of data
|
ā”œā”€ā”€ di                  # Dependency injection modules
ā”‚
ā”œā”€ā”€ ui                  # Fragment / View layer
ā”‚   ā”œā”€ā”€ list            # List screen Fragment and ViewModel
ā”‚   ā”œā”€ā”€ home            # Main screen Fragment and ViewModel
|   ā”‚   ā”œā”€ā”€ controller  # Epoxy controller for RecyclerView
|   ā”‚   ā””ā”€ā”€ models      # Epoxy models for RecyclerView
ā”‚   ā””ā”€ā”€ details         # Detail screen Fragment and ViewModel
|
ā”œā”€ā”€ utils               # Utility Classes / Kotlin extensions
ā”œā”€ā”€ MainActivity        # Single activity
ā”œā”€ā”€ AppContext          # Application
ā””ā”€ā”€ NavigationRouter    # Navigation controller

API Key šŸ”‘

You will need to provide developer key to fetch the data from TMDB API.

const val TMDB_API_KEY = "\"90c05******************655\""
defaultConfig {
    ...
    buildConfigField("String", "TMDB_API_KEY", TMDB_API_KEY)
    ...
}

NOTE: It's important to keep the double quotes for this value, since it's used as String type build config fields, the field name in quotes, the field value in escaped quotes additionally. If you're missing the double quotes, it will build fail.

LICENSE

Copyright (c) 2020 Engine Bai

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.