{"id":37027108,"url":"https://github.com/anwarpro/mvvmate","last_synced_at":"2026-01-14T03:12:29.054Z","repository":{"id":257856319,"uuid":"868031362","full_name":"anwarpro/mvvmate","owner":"anwarpro","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-12T06:33:08.000Z","size":540,"stargazers_count":4,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T15:38:11.484Z","etag":null,"topics":["cmp","compose-multiplatform","mvvm","state-management"],"latest_commit_sha":null,"homepage":"https://helloanwar.com/mvvmate/","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/anwarpro.png","metadata":{"files":{"readme":"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-05T09:44:19.000Z","updated_at":"2025-06-19T06:40:48.000Z","dependencies_parsed_at":"2025-01-09T19:39:44.703Z","dependency_job_id":"c4ca9483-bd59-41d9-8ef7-2893c54531a1","html_url":"https://github.com/anwarpro/mvvmate","commit_stats":null,"previous_names":["anwarpro/mvvmate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anwarpro/mvvmate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwarpro%2Fmvvmate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwarpro%2Fmvvmate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwarpro%2Fmvvmate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwarpro%2Fmvvmate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anwarpro","download_url":"https://codeload.github.com/anwarpro/mvvmate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anwarpro%2Fmvvmate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cmp","compose-multiplatform","mvvm","state-management"],"created_at":"2026-01-14T03:12:28.476Z","updated_at":"2026-01-14T03:12:29.049Z","avatar_url":"https://github.com/anwarpro.png","language":"Kotlin","readme":"# MVVMate\n\nMVVMate is a minimal state management library for Compose Multiplatform, based on the MVVM\narchitecture.\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.helloanwar.mvvmate/core)](https://central.sonatype.com/artifact/com.helloanwar.mvvmate/core)\n[![Documentation](https://img.shields.io/badge/docs-API-blue)](https://anwarpro.github.io/mvvmate)\n\n## Overview\n\nThis library provides base classes and interfaces for managing UI state, handling user actions, and\nemitting side effects in a Compose Multiplatform project.\n\n### Key Components\n\n- **BaseViewModel**: A base ViewModel class that manages state and handles user actions.\n- **BaseViewModelWithEffect**: Extends `BaseViewModel` to also manage UI side effects.\n- **UiState**: A marker interface for defining UI states.\n- **UiAction**: A marker interface for user actions.\n- **UiEffect**: A marker interface for UI side effects.\n\n## Installation\n\nTo use MVVMate in your project, add the following to your `build.gradle.kts`:\n\n### For Kotlin Multiplatform Projects:\n\n```kotlin\nkotlin {\n    sourceSets {\n        val commonMain by getting {\n            dependencies {\n                implementation(\"com.helloanwar.mvvmate.core:1.0.0\")\n            }\n        }\n    }\n}\n```\n\n### For Android Projects:\n\n```kotlin\ndependencies {\n    implementation(\"com.helloanwar.mvvmate.core:1.0.0\")\n}\n```\n\n## Usage\n\nHere's a simple example of how you can use `MVVMate` in your Compose Multiplatform project:\n\n```kotlin\n// Define your UI State\ndata class MyUiState(val message: String = \"\") : UiState\n\n// Define your User Actions\nsealed class MyUiAction : UiAction {\n    object ShowMessage : MyUiAction()\n}\n\n// Define your ViewModel\nclass MyViewModel : BaseViewModel\u003cMyUiState, MyUiAction\u003e(MyUiState()) {\n    override suspend fun onAction(action: MyUiAction) {\n        when (action) {\n            MyUiAction.ShowMessage -\u003e updateState { copy(message = \"Hello, World!\") }\n        }\n    }\n}\n\n// Use the ViewModel in your Composable function\n@Composable\nfun MyScreen(viewModel: MyViewModel) {\n    val state by viewModel.state.collectAsState()\n\n    Text(text = state.message)\n    Button(onClick = { viewModel.handleAction(MyUiAction.ShowMessage) }) {\n        Text(\"Show Message\")\n    }\n}\n```\n\n## API Documentation\n\nFor more detailed information, you can check\nthe [API documentation](https://anwarpro.github.io/mvvmate) generated by Dokka.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanwarpro%2Fmvvmate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanwarpro%2Fmvvmate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanwarpro%2Fmvvmate/lists"}