Giter VIP home page Giter VIP logo

cinemalistings's Introduction

๐ŸŒŸ About

It simply app that loads a billboard from TheMovieDatabase Api and display inside a RecyclerView as a GridLayout. This repository shows a clean code with MVVM architecture and use professional libraries with Kotlin language. Different models are used for each architecture layer with mappers whose work is transforming the objects to the next layer. Each layer is represented by a module and also exist a core module to be the base of app modules.

OS Language Architecture UI Observable

๐Ÿ“œ Screenshots





๐Ÿ“œ Project requirements

Instructions

To launch the application you need to get an API key from TheMovieDb, (registration is required). You need to create file named secrets.properties like * secrets.defaults.properties* file, and put your api key inside like this:

THEMOVIEDB_API_KEY="your_api_key"

๐Ÿ“š Libraries used

  • Kotlin - First class and official programming language for Android development.
  • Coroutines - For asynchronous and more.
  • Glide - An image loading library for Android.
  • Material Components for Android
    • Modular and customizable Material Design UI components for Android.
  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
    • StateFlow - Data objects that notify views when the underlying database changes.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • ViewBinding - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views.
  • Moshi - Library that can be used to convert Java Objects into their JSON representation and JSON string to an equivalent Java object.
  • OkHttpClient - HTTP client that allows all requests to the same host to share a socket and response caching avoids the network completely for repeat request.
  • Retrofit - Turns HTTP API into a Java interface.
  • Dagger 2 - Dependency Injection Framework.
  • Hilt - Jetpack Dependency Injection Framework.

๐Ÿ“ Modules

Modules have been created to respect the layers of the architecture. First there are 3 main modules: data, domain and presentation*. At the same time, the project has 4 more modules, with prefix ' core', where provide the base of app layers, and there are one 'commons' module that provide some features to the rest of modules.

*Note: Presentation module is called 'App'

Module name Type Modules visibility Description
core-commons Java/Kotlin Library - Commons resources and classes that can be used in different applications
core-presentation Java/Kotlin Library :core-commons Base activity, adapters, managers to presentation layer
core-data-remote Java/Kotlin Library :core-commons Base remote data sources
app Android Application :core-commons :core-presentation :domain Ui and base application features
domain Java/Kotlin Library :core-commons :data Use-cases
data Java/Kotlin Library :core-commons :data-remote Repositories
data-remote Java/Kotlin Library :core-commons :core-data-remote Remote data sources (network)

๐Ÿ“ Test

This project has test inside :app and :data-remote modules.

Inside :app are tested some cases of ViewModels, and also filters are tested:

  • MovieFiltersTest to check if the release year of movies is filtered correctly.
  • BillboardViewModelTest to check pagination, loading state and errors.
  • MovieDetailsViewModelTest to check success, loading and error states.

Inside :data-remote there are different tests:

  • MoshiAdapterTest to check if the date is parsed correctly.
  • DateTest to check if the date is mapped correctly by SimpleDateAdapter and by custom extension function.
  • TheMovieDbApiServiceTest to check errors when api key is not implemented.
  • TheMovieDbMockApiTest to check data source with mock responses.

Extras

  • Github Actions - The project uses GitHub actions for CI operations such as running automated build and test.
  • Renovate - The project uses Renovate bot to keep dependencies up to date.
  • Proguard Obfuscation code in release build implemented (but not tested)

cinemalistings's People

Contributors

javiergbravo avatar renovate[bot] avatar

Watchers

 avatar

cinemalistings's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4.1.7
  • actions/setup-java v4.2.1
  • actions/checkout v4.1.7
  • actions/setup-java v4.2.1
  • asadmansr/android-test-report-action v1.2.0
gradle
buildSrc/src/main/kotlin/AppDependencies.kt
buildSrc/src/main/kotlin/HandlerDependencies.kt
buildSrc/src/main/kotlin/Libs.kt
  • androidx.core:core-ktx 1.10.1
  • androidx.appcompat:appcompat 1.6.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.8.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-android 1.8.1
  • com.jakewharton.timber:timber 5.0.1
  • com.google.android.material:material 1.9.0
  • androidx.constraintlayout:constraintlayout 2.1.4
  • androidx.recyclerview:recyclerview 1.3.2
  • androidx.activity:activity-ktx 1.7.2
  • androidx.lifecycle:lifecycle-viewmodel-ktx 2.6.2
  • androidx.lifecycle:lifecycle-runtime-ktx 2.6.2
  • com.github.bumptech.glide:glide 4.16.0
  • com.google.dagger:hilt-android 2.50
  • com.squareup.okhttp3:okhttp 4.12.0
  • com.squareup.okhttp3:logging-interceptor 4.12.0
  • com.squareup.retrofit2:retrofit 2.11.0
  • com.squareup.moshi:moshi-kotlin 1.15.1
  • com.squareup.retrofit2:converter-moshi 2.11.0
  • com.google.truth:truth 1.4.2
  • junit:junit 4.13.2
  • app.cash.turbine:turbine 1.1.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.8.1
  • androidx.test.ext:junit 1.1.5
  • androidx.arch.core:core-testing 2.2.0
  • androidx.test.espresso:espresso-core 3.5.1
  • org.mockito:mockito-core 5.12.0
  • com.squareup.okhttp3:mockwebserver 4.12.0
  • com.google.dagger:hilt-android-testing 2.50
  • com.github.bumptech.glide:compiler 4.16.0
  • com.squareup.moshi:moshi-kotlin-codegen 1.15.1
  • com.google.dagger:hilt-android-compiler 2.50
  • androidx.hilt:hilt-compiler 1.2.0
  • com.google.dagger:hilt-android-gradle-plugin 2.50
buildSrc/src/main/kotlin/Plugins.kt
  • com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin 2.0.1
  • org.jetbrains.kotlin:kotlin-gradle-plugin 1.9.24
buildSrc/src/main/kotlin/ProjectConfig.kt
gradle.properties
settings.gradle.kts
build.gradle.kts
app/build.gradle.kts
buildSrc/build.gradle.kts
core/core-commons/build.gradle.kts
core/core-data-remote/build.gradle.kts
core/core-presentation/build.gradle.kts
data/build.gradle.kts
data/data-remote/build.gradle.kts
domain/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.8

  • Check this box to trigger a request for Renovate to run again on this repository

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.