From f99c0b387a1c718bd8795b432eec3a38ac9cc983 Mon Sep 17 00:00:00 2001 From: aliumujib Date: Mon, 1 Jul 2024 12:22:39 +0100 Subject: [PATCH] first commit --- README.md | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..485f2e0 --- /dev/null +++ b/README.md @@ -0,0 +1,101 @@ +# Jetpack-Compose-Orbit-MVI-Demo + +This repository contains a Cat Breed Library application that is implemented MVI architecture using +Dagger, Jetpack Compose, Navigation Compose, MVI. + +## ✨Features + +This application has the following features: + +- Display cat image and breed, descriptions. +- Display cat breed details +- Save and display favourites in a list + +## 🏢Architecture + +This application leverages the MVI (Model-View-Intent) architecture, Clean Onion layered architecture, and the Repository Pattern to ensure a robust and scalable design. + +### MVI Implementation + +The MVI architecture is implemented using two key components: + +1. **IntentProcessor**: + - This class accepts intents and transforms them into results by invoking use cases, which in turn call repository functions. + - The results are modeled as sealed classes to represent the output of various operations. + +2. **StateReducer**: + - This component takes the previous state (or initial state) and a result, transforming them into a new state that can be rendered in the UI. + +### Dependency Injection + +Both the IntentProcessor and StateReducer are injected into the ViewModel. The ViewModel connects these components through a delegate, ensuring unidirectional data flow and clear state transitions without tight coupling between components. + +### Benefits + +- **Unidirectional Data Flow**: The architecture enforces unidirectional data flow, simplifying state management and ensuring predictable state transitions. +- **Testability**: The separation of concerns and modular design allow individual components and state transitions to be easily tested. +- **Scalability and Maintainability**: By adhering to Clean Onion architecture and the Repository Pattern, the application remains scalable and maintainable, with clear boundaries and responsibilities for each layer. + +This approach ensures a maintainable codebase with a clear separation of concerns, making it easier to extend and test the application. + + + +## 💽 DataFlow + + + +## 📦Module +The application is organized to group modules based on features, ensuring related features are contained within the same folder/module. This structure maintains clarity and separation of concerns within the codebase. + +### Feature-Based Module Organization + +- **Feature Modules**: + - Each feature module contains its own domain and data layers, encapsulating all necessary components for the feature. + - This modularization ensures that each feature operates independently, promoting maintainability and scalability. + +### Shared Modules + +The application also includes shared modules to handle common functionalities and configurations. These shared modules include: + +- **Local Room Database**: Centralized setup and configuration for the Room database used across various features. +- **Test Utilities**: Common utilities and configurations for testing, facilitating consistent and efficient test setups. +- **Networking**: Shared networking setup and configurations, ensuring a unified approach to network operations. +- **Design System**: Common design elements and styles, promoting consistency in the application's user interface. + +## 📚Library + +This application uses the libraries below. + +| Name | Link | +|--------------------| ------------------------------------------------------------ | +| Dagger | https://insert-koin.io | +| Jetpack Compose | https://developer.android.com/jetpack/compose | +| Navigation Compose | https://developer.android.com/jetpack/compose/navigation | +| Coil | https://coil-kt.github.io/coil/ | +| Room | https://developer.android.com/training/data-storage/room?hl=ja | +| Retrofit | https://github.com/Biuni/PokemonGO-Pokedex | + +## 💡License + +``` +Copyright (c) 2024 Abdul-Mujeeb Aliu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` +# CatBreedBrowser