Git Product home page Git Product logo

tolgaprm / mova-movieapp Goto Github PK

View Code? Open in Web Editor NEW
104.0 2.0 5.0 176.59 MB

"A movie and TV show information app for teaching MVVM, Paging3, Flow-Coroutines with Clean Architecture. With this app, you can easily find information about your favorite films and TV series. You can view the cast, plot summary, release date, and more. "

License: Apache License 2.0

Kotlin 100.00%
clean-architecture coroutines flow lifecycle paging3 repository-pattern viewmodel android kotlin movie

mova-movieapp's Introduction

Mova-Movies App

Get it on Google Play Store

"A movie and TV show information app for teaching MVVM, Paging3, Flow-Coroutines with Clean Architecture With this app, you can easily find information about your favorite films and TV series. You can view the cast, plot summary, release date, and more. "

API

License

Screenshots

Light Version


Dark Version


Tech stack & Open-source libraries

  • Minimum SDK level 24+

  • 100% Kotlin based Coroutines Flow for asynchronous.

  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.

    • A single-activity architecture, using the Navigation to manage composable transactions.
    • Lifecycle - perform an action when lifecycle state change
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • UseCases - Located domain layer that sits between the UI layer and the data layer.
    • Repository - Located in data layer that contains application data and business logic
  • Hilt -Dependency Injection Library

  • Paging - The Paging library makes it easier for you to load data incrementally and gracefully within your app's UI

  • Navigation - Manage transaction among the fragments

  • Room - Create, store, and manage persistent data backed by a SQLite database.

  • WorkManager - WorkManager is the recommended solution for persistent work. Work is persistent when it remains scheduled through app restarts and system reboots.

  • AlarmManager - AlarmManager is a class provides access to the system alarm services. These allow you to schedule your application to be run at some point in the future. My usage is to set a upcoming movie reminder.

  • Notification - A notification is a message that Android displays outside your app's UI to provide the user with reminders, communication from other people, or other timely information from your app.

  • Retrofit2 & OkHttp3 - construct the REST APIs and paging network data.

  • Moshi - A modern JSON library for Android, Java and Kotlin

  • Coil - An image loading library for Android backed by Kotlin Coroutines.

  • Testing

    • Flow Turbine - Turbine is a small testing library for kotlinx.coroutines Flow.
    • Truth - A library for performing assertions in tests

Modularization Structure

  • I used convention plugin for manage dependencies.
  • This app modularization guide is soon.
  • When I implement navigation for multiModule, I got help this article.

API Key ๐Ÿ”‘

  • You will need to provide developer key to fetch the data from TMDB API.
  • Generate a new key (v3 auth) from here. Copy the key and go back to Android project.
  • Open the page is gradle/local.properties
  • Define a constant API_KEY, it looks like

API_KEY = PASTE_YOUR_API_KEY

Upcoming Features

  • CI Support
  • UI and Unit Tests

Find this repository useful?

Don't forget give a star. โญ

Licence

    Designed and developed by 2022 tolgaprm (Tolga Pirim)

   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.

mova-movieapp's People

Contributors

tolgaprm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mova-movieapp's Issues

Mova-100 Remove callbacks from using Firebase functions.

Example

Remove the code

   override fun addMovieToFavoriteList(
        userUid: String,
        data: Map<String, List<Movie>>,
        onSuccess: () -> Unit,
        onFailure: (uiText: UiText) -> Unit,
    ) {
        firestore.collection(userUid).document(Constants.FIREBASE_FAVORITE_MOVIE_DOCUMENT_NAME)
            .set(data.toConvertToFavoriteMovieMap(), SetOptions.merge())
            .addOnSuccessListener {
                onSuccess()
            }.addOnFailureListener { exception ->
                setExceptionToFirebaseMessage(exception = exception, onFailure = onFailure)
            }
    }
   override suspend fun addMovieToFavoriteList(
        userUid: String,
        movieInFavoriteList: List<Movie>
    ): SimpleResource {
        return safeCallWithForFirebase {
            val data = mapOf(
                FIREBASE_MOVIES_FIELD_NAME to movieInFavoriteList
            )
            val result =
                firestore.collection(userUid)
                    .document(Constants.FIREBASE_FAVORITE_MOVIE_DOCUMENT_NAME)
                    .set(data.toConvertToFavoriteMovieMap(), SetOptions.merge())
            result.await()
            if (result.isSuccessful) {
                Resource.Success(Unit)
            } else {
                Resource.Error(UiText.unknownError())
            }
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.