Clean Architecture Modular Project: MVI + Jetpack Compose + Coroutines + Flows + Hilt + UnitTests

Overview

NyTimes for Clean Architecture

JetpackCompose Platform Android Studio Dolphin License

The purpose of this project is to consolidate some of the learned insights throughout the years about the Clean Architecture principles and reflect those lessons on Android, taking advantage of the Kotlin programming language features too.

This project summarises some of the general use cases and demands on a typical production project using: Jetpack Compose, Functional Programming,MVI, Kotlin Coroutines and Kotlin Flows

Build a simple app to hit the NY Times Most Popular Articles API and show a list of articles, that shows details when items on the list are tapped.

Libraries Used 📚

  • Compose Toolkit for building native UI (in a declarative way - 100% Kotlin).
  • Coroutines Library support for Kotlin coroutines.
  • Flows Stream processing API, built on top of Coroutines.
  • Dagger Hilt Dependency injection library for Android.
  • Retrofit Type-safe REST client for Android to consume RESTful web services.
  • Timber Logger with a small API which provides utility on top of Android's normal Log class.
  • MockK mocking framework for testing.
  • Coil Compose Image downloading and caching library supported by Jetpack Compose.
  • Lottie Compose Library that provides that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile.
  • Shot Shot is a Gradle plugin and a core android library thought to run screenshot tests for Android.

## Modules 📑
  • app - The application module with access to all the application
  • data - Android module that can only access domain module
  • data-api - Android module that can only access data module
  • domain - Kotlin module that cannot access any other module

Unit Testing

There are some highlights:

  • Every layer in the architecture has been tested.
  • MockK has been used for mocking | stubbing.
  • Given | When | Then code presentation order, in order to give a more structured style.





Clean Architecture

License 🚔

Copyright 2023 Ahmed Abo Elnaga

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.
You might also like...
A cryptocurrency application with clean architecture (MVVM, Jetpack Compose, Flow, Dagger Hilt)

Amirypto A cryptocurrency application built with Clean architecture and Jetpack component (MVVM, Jetpack Compose, Flow, Hilt, Retrofit). It was made t

Example Multi module architecture Android project using MVVM, Dynamic Features, Dagger-Hilt, Coroutines and Navigation Components
Example Multi module architecture Android project using MVVM, Dynamic Features, Dagger-Hilt, Coroutines and Navigation Components

ModularDynamicFeatureHilt An Android template project following a multi module approach with clean architecture. It has been built following Clean Arc

Skeleton project for show the architecture of Android project using MVVM, Clean Architecture and Kotlin coroutine Flow
Skeleton project for show the architecture of Android project using MVVM, Clean Architecture and Kotlin coroutine Flow

ClearScoreDemo Skeleton project for showing the architecture of Android project using MVVM, Clean architecture and Kotlin coroutine Flow App Architect

📚  Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Cleanarchitecture MVVM Hilt base - Android Clean Architecture example project
Cleanarchitecture MVVM Hilt base - Android Clean Architecture example project

Android Clean Architecture example project Note: This is project based on MVVM c

A personal project made using Jetpack Compose, Clean-MVVM architecture and other jetpack libraries

A basic CRUD for recording your personal credit and debit transactions. Made using Jetpack Compose, Clean-MVVM and other Jetpack libraries, incorporated with Unit Tests.

🪐 Modern Android development with Hilt, Coroutines, Flow, JetPack(ViewModel) based on MVVM architecture.

Ceres 🪐 Modern Android development with Hilt, Coroutines, Flow, JetPack(ViewModel) based on MVVM architecture. Download Gradle Add the dependency bel

E-Commerce application with MVVM & Clean Arch - Hilt - Coroutines - Retrofit - Firebase - Room DB.
E-Commerce application with MVVM & Clean Arch - Hilt - Coroutines - Retrofit - Firebase - Room DB.

E-Commerce-App E-Commerce application with MVVM & Clean Arch - Hilt - Coroutines - Retrofit - Firebase - Room DB. API Link Project Features MVVM with

Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow..
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow..

Nextflix-Composable A Clean Architecture App to show use of multi-module-architecture in a Jetpack Compose. The modules are as follow: app: Presentati

Owner
Ahmed mahmoud abo elnaga
Senior android developer with +8 years’ experience with java and +4 with years’ experience with kotlin / Mobile tech leader with with +2 years’ experience
Ahmed mahmoud abo elnaga
Sample Project with Clean Architecture for demonstrating using Kotlin Flows for fetching User Location and networking.

Nearby-Places-Foursquare-Android Getting Nearby Places using Foursquare API API's Used from FourSquare Get Key from Foursquare site. NearBy places Her

Abhishek Dubey 5 Nov 30, 2022
Clean MVVM with eliminating the usage of context from view models by introducing hilt for DI and sealed classes for displaying Errors in views using shared flows (one time event), and Stateflow for data

Clean ViewModel with Sealed Classes Following are the purposes of this repo Showing how you can remove the need of context in ViewModels. I. By using

Kashif Mehmood 22 Oct 26, 2022
🍭 GithubSearchKMM - Github Repos Search - Android - iOS - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Dependency Injection, shared KMP ViewModel, Clean Architecture

GithubSearchKMM Github Repos Search - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Depend

Petrus Nguyễn Thái Học 50 Jan 7, 2023
FaceTimeClone app that implements Coroutines , mvvm architecture , clean architecture , navigation component , hilt , etc.... using kotlin language

This repository contains a FaceTimeClone app that implements Coroutines , mvvm architecture , clean architecture , navigation component , hilt , etc.... using kotlin language

null 17 Dec 13, 2022
Built with Jetpack compose, multi modules MVVM clean architecture, coroutines + flow, dependency injection, jetpack navigation and other jetpack components

RickAndMortyCompose - Work in progress A simple app using Jetpack compose, clean architecture, multi modules, coroutines + flows, dependency injection

Daniel Waiguru 9 Jul 13, 2022
A simple, classic Kotlin MVI implementation based on coroutines with Android support, clean DSL and easy to understand logic

A simple, classic Kotlin MVI implementation based on coroutines with Android support, clean DSL and easy to understand logic

Nek.12 4 Oct 31, 2022
An example of a test task for creating a simple currency converter application for the Android platform. The app is developed using Kotlin, MVI, Dagger Hilt, Retrofit, Jetpack Compose.

Simple Currency Converter Simple Currency Converter Android App by Isaev Semyon An example of a test task for creating a simple currency converter app

Semyon Isaev 1 Nov 8, 2021
Architecture With MVI using Kotlin, Coroutines, Retrofit and Unit test

Architecture With MVI using Kotlin, Coroutines, Retrofit and Unit test MVI (Model-View-Intent) streamlines the process of creating and developing appl

Ahmed Karam 4 Aug 18, 2022
Searchbook - SearchBooks is an app built with Jetpack Compose and architecture of MVVM + MVI

SearchBooks SearchBooks is an app built with Jetpack Compose and architecture of

Jayden 4 Nov 20, 2022
Delish, a Food Recipes App in Jetpack Compose and Hilt based on modern Android tech-stacks and MVVM clean architecture.

Delish Screens Tech stack & Open-source libraries 100% Kotlin based + Coroutines + Flow for asynchronous. Dagger Hilt 2.37 Accompanist JetPack Jetpack

Mohamed Elbehiry 305 Dec 12, 2022