NyTimes for Clean Architecture
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
📚
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.
- 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.