Skip to content

Android Jetpack + Kotlin, Coroutines, Flow + Clean Architecture + Domain model

License

Notifications You must be signed in to change notification settings

4mr0m3r0/movies-jetpack-sample

Repository files navigation

Movies

State State State State

🚧 👷🏗️ Under Modifications 🔨👷 🚧

Table of Contents

  1. Description
    1. Screenshots
    2. Flowchart
    3. Skills you may find
    4. Design Patterns implemented
    5. Domain model
    6. Architecture
  2. Resources
  3. Community
  4. Additional Android Samples

Description

This is a sample project with the main objective of integrating Jetpack components as much as possible in a single app.
Additionally, the project try to implement ideas from Domain-Drive Design, Design Patterns, and Clean Architecture mainly focused on the Dependency Inversion principle.

The app topic is Movies and you may find functionalities such as:

  • search movies by name.
  • see the movie extra details.
  • mark the movie as favorite.
  • listing favorite movies.

Jetpack components map

Legend:
🟩 Implemented in the app.
🟨 Implementing (WIP).
⬜ Not yet implemented.

Default Screen

Screenshots

Default Screen Search Screen Detail Screen Add to Favorite Screen Menu Screen Favorites Screen

Flowchart

graph LR
A[Navigation Drawer] --> B[Find Movie Screen]
A --> G
B -- input search --> C{Any Result?}
C -- Yes --> D[Listing Movies Screen]
C -- No --> E[Empty Screen]
D -- select --> F[Detail Screen]
F -- add to favorites --> F
G[Favorite Screen]
Loading

Skills you may find

Jetpack Kotlin & Quality Dependency Management Others Testing
Compose Coroutines Version Catalogs Landscapist MockK
WorkManager Asynchronous Flow TOML Material 3 ComposeTestRule
Hilt Detekt Gradle Kotlin DSL Retrofit
Room Ktlint OkHttp
Paging Timber
Navigation Lottie

Design Patterns implemented

Creational Structural Behavioral
Singleton Facade Command
Chain of Responsibility
State

Domain Model

The Domain Model pattern is shown here in a very simple way.
This project is trying to follow the ideas explained in Domain-Driven Design book of Eric Evans.
Yet, there are only a few entities, so far, such as: Movie and TomatoMeter.

Architecture

It's strongly recommended to read Clean Architecture book of Robert C. Martin for a better understanding and avoiding misconceptions out there.
As a glimpse, read Clean Code blog: https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html CleanArchitecture

Resources

Default Screen

Default Screen

Community

Additional Android Samples

For more samples in this series of Android Development, please, feel free to check them. Each one of them cover a specific topic.