{"id":18694571,"url":"https://github.com/adidas/mvi","last_synced_at":"2025-04-06T10:13:29.268Z","repository":{"id":44490337,"uuid":"405922897","full_name":"adidas/mvi","owner":"adidas","description":"Library for implementing MVI (Model-View-Intent) architecture in Kotlin.","archived":false,"fork":false,"pushed_at":"2025-01-13T12:00:18.000Z","size":1774,"stargazers_count":90,"open_issues_count":0,"forks_count":7,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-30T09:07:38.903Z","etag":null,"topics":["adidas","android","mvi"],"latest_commit_sha":null,"homepage":"https://adidas.github.io/mvi","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adidas.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-13T10:10:11.000Z","updated_at":"2025-03-25T16:12:27.000Z","dependencies_parsed_at":"2024-03-15T16:46:00.126Z","dependency_job_id":"7c1f94de-b27e-4cb2-a84b-ff24de694162","html_url":"https://github.com/adidas/mvi","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adidas%2Fmvi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adidas%2Fmvi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adidas%2Fmvi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adidas%2Fmvi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adidas","download_url":"https://codeload.github.com/adidas/mvi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464223,"owners_count":20942970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adidas","android","mvi"],"created_at":"2024-11-07T11:11:36.668Z","updated_at":"2025-04-06T10:13:29.242Z","avatar_url":"https://github.com/adidas.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg style='width: 500px' src=\"assets/mvi_logo.png\" alt=\"adidas mvi Logo\"/\u003e\n\u003c/div\u003e\n\n[![Kotlin](https://img.shields.io/badge/Kotlin-2.0.0-blue.svg?style=flat\u0026logo=kotlin)](https://kotlinlang.org)\n![Test workflow](https://github.com/adidas/mvi/actions/workflows/deploy_docs.yml/badge.svg)\n[![adidas official](https://img.shields.io/badge/adidas-official-000000)](https://github.com/adidas)\n\n## Introduction\n\nadidas MVI is an efficient library that helps you implement the MVI architectural pattern in your Android or JVM\napplications. MVI is a pattern that promotes a unidirectional flow of data and provides a clear separation between the\ndifferent components of your application. This library aims to simplify the implementation of MVI by providing a set of\ntools and utilities.\n\n## Current Version\n\nHere are the current available mvi modules versions:\n\n| Module      |                                                                       Version                                                                        |\n|-------------|:----------------------------------------------------------------------------------------------------------------------------------------------------:|\n| mvi         |         [![Maven Central](https://img.shields.io/maven-central/v/com.adidas.mvi/mvi)](https://mvnrepository.com/artifact/com.adidas.mvi/mvi)         |\n| mvi-compose | [![Maven Central](https://img.shields.io/maven-central/v/com.adidas.mvi/mvi-compose)](https://mvnrepository.com/artifact/com.adidas.mvi/mvi-compose) |\n| mvi-kotest  |  [![Maven Central](https://img.shields.io/maven-central/v/com.adidas.mvi/mvi-kotest)](https://mvnrepository.com/artifact/com.adidas.mvi/mvi-kotest)  |\n\n## Features\n\n**Simple and lightweight**: The library is designed to be easy to understand and use, without unnecessary complexity or\noverhead.\n\n**Unidirectional data flow**: The MVI pattern ensures that data flows in a single direction, making it easier to reason\nabout and test your application.\n\n**Separation of concerns**: The pattern encourages a clear separation between the model, view, and intent components of your\napplication.\n\n**Immutable data**: The library promotes the use of immutable data structures, which helps reduce bugs and makes your code\nmore reliable.\n\n**Thread safety**: Offers built-in mechanisms to handle concurrency and synchronization when managing the application's\nstate. This ensures that multiple threads can safely access and modify the state without encountering data races or\ninconsistencies.\n\n## Usage in adidas\n\nMVI library is now being used in adidas CONFIRMED app. In fact, this library was developed initially as core\narchitecture of CONFIRMED app, and later it was decided to open source it.\n\n## Installation\n\nTo use the adidas MVI Library in your Android project, follow these steps:\n\nOpen the build.gradle file of your project.\nAdd the following dependency to the dependencies block:\n\n```\nimplementation(\"com.adidas.mvi:mvi:{LATEST_VERSION}\")\n```\n\nSync your project with the Gradle files.\n\n## Usage\n\nTo use the adidas MVI Library in your application, you need to understand the basic concepts and components of the MVI\npattern.\n\n## Concepts\n\n**Model**: The model represents the state of your application. It's an immutable data structure that holds all the\ninformation needed to render the UI.\n\n**View**: The view is responsible for rendering the UI and reacting to user interactions. It observes the model and updates\nthe UI accordingly.\n\n**Intent**: An intent represents a user action or an event that triggers a state change in the model. Intents are dispatched\nto the model, which updates its state based on the intent received.\n\n## Components\n\nadidas MVI Library provides the following components to help you implement the MVI pattern:\n\n**View State**: Represents the immutable model data that the view observes. It holds all the necessary information\nrequired to render the user interface (UI). The ViewState is updated by the model based on the received intents and\nreflects the current state of the application.\n\n**Side Effect**: Represents an action or an event that occurs as a result of the state update. It encapsulates tasks\nsuch as network requests, database operations, or other external interactions. Side effects are triggered by the model\nand can be used to perform background operations or trigger additional state changes. This action needs to be executed\nonly once.\n\n**State**: The State\u003cViewState, SideEffect\u003e class combines the ViewState and SideEffect components to provide a\ncomprehensive representation of the application state within the MVI pattern.\n\n**State Transform**: This interface helps with transforming from one state to another, working closely with Reducer, it\nencapsulates the necessary information for the model to update its state. There are some helper functions such as\nrequireAndReduceState() for more convenient.\n\n**Reducer**: Serves as a middleware or intermediary component between the all MVI concepts and UI. It is also\nresponsible for running the intents with a specific coroutine dispatcher, Cancellation and logging of events.\n\n## License\n\n[Apache License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadidas%2Fmvi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadidas%2Fmvi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadidas%2Fmvi/lists"}