Git Product home page Git Product logo

themoviedb-cleanarchitecture's Introduction

The Movie DB

Cover

The Movie DB app is an implementation of Clean Architecture. It is a native Android app built using Jetpack Compose with modern Android development using Hilt, Coroutines, Flow, Jetpack, and Material Design.

๐Ÿ“ฒ Download APK

Download the APK from this Link.

๐Ÿ›  Tech stack & Open-source libraries

  • Minimum SDK level 24
  • Kotlin based, Coroutines + Flow for asynchronous.
  • Jetpack:
    • Compose: Androidโ€™s modern toolkit for building native UI.
    • ViewModel: UI related data holder and lifecycle aware.
    • App Startup: Provides a straightforward, performant way to initialize components at application startup.
    • Hilt Navigation: For navigating screens and injecting dependencies.
    • Hilt: for dependency injection.
  • Ktor: Kotlin-based framework for building efficient HTTP clients in Kotlin applications.
  • SQLDelight: Generates Kotlin APIs from SQL statements for seamless database integration.
  • Coil: Image loading library for loading images from network.
  • Material-Components: Material design components for building ripple animation, and CardView.
  • Timber: A logger with a small, extensible API.

Architecture

CleanArchitecture-Android

The project is based on the Clean Architecture and the MVVM pattern. It uses the Google's ViewModel as a UI state holder to take advantage of its benefits like persistence, view lifecycle scooping, and SavedStateHandle.

With this loosely coupled architecture, you can increase the reusability of components and scalability of your app.

UI Layer

The UI layer consists of Jetpack Compose UI elements to configure screens that interact with users and the Presentation layer by sending actions to it and observing it's data changes.

Presentation Layer

The Presentation layer contains ViewModels that present the app states and restores data when configuration changes. The ViewModels interact with the Domain layer by Use Cases.

Domain Layer

  • Use Cases: Act as an abstraction layer between the Domain layer and the Presentation layer. Use Cases encapsulate the logic required to perform tasks like retrieving movies list or submit movie ratings.
  • Repositories: Interfaces that define the contract for accessing and managing data from external data sources(local DB, and remote server). The Domain layer defines the repository interfaces, while the actual implementation is provided in the Data layer. This separation allows the Domain layer to remain agnostic to the data source.
  • Domain Models: Plain Kotlin classes that represent the core data structures and business objects of the app. These objects encapsulate the data and behavior that are central to the app's domain.

Data Layer

The Data layer contains the Repositories implementation, it queries data from the local database and requests remote data from the network. It follows the single source of truth principle.

themoviedb-cleanarchitecture's People

Contributors

ahmedalaishat avatar

Watchers

 avatar

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.