{"id":20138398,"url":"https://github.com/getspherelabs/cosmo-kmp","last_synced_at":"2025-04-09T18:08:47.524Z","repository":{"id":192245797,"uuid":"685502490","full_name":"getspherelabs/cosmo-kmp","owner":"getspherelabs","description":"Cosmo: Kotlin Multiplatform App using Jetpack Compose and SwiftUI ","archived":false,"fork":false,"pushed_at":"2023-09-03T01:26:32.000Z","size":2956,"stargazers_count":92,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T20:05:32.422Z","etag":null,"topics":["combine","compose","coroutines","cosmos","jetpackcompose","kmm","kmp","koin","kotlin","kotlin-multiplatform","kotlin-multiplatform-mobile","ktor","sqldelight","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getspherelabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-31T11:31:05.000Z","updated_at":"2025-02-24T13:13:04.000Z","dependencies_parsed_at":"2023-09-03T17:58:25.363Z","dependency_job_id":null,"html_url":"https://github.com/getspherelabs/cosmo-kmp","commit_stats":null,"previous_names":["getspherelabs/cosmo-kmp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getspherelabs%2Fcosmo-kmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getspherelabs%2Fcosmo-kmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getspherelabs%2Fcosmo-kmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getspherelabs%2Fcosmo-kmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getspherelabs","download_url":"https://codeload.github.com/getspherelabs/cosmo-kmp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248084772,"owners_count":21045135,"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":["combine","compose","coroutines","cosmos","jetpackcompose","kmm","kmp","koin","kotlin","kotlin-multiplatform","kotlin-multiplatform-mobile","ktor","sqldelight","swift","swiftui"],"created_at":"2024-11-13T21:37:51.496Z","updated_at":"2025-04-09T18:08:47.488Z","avatar_url":"https://github.com/getspherelabs.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/getspherelabs/cosmo-kmp\"\u003e\u003cimg  alt=\"Cosmo Banner\" src=\"https://github.com/getspherelabs/cosmo-kmp/blob/main/docs/imgs/banner_cosmo_kmp(rounded).png?raw=true\"/\u003e\u003c/a\u003e \u003cbr\u003e\n\u003c/p\u003e\n\n# Architecture\nThe app architecture has three layers: a data layer, a domain layer and a UI layer. Cosmo uses [Meteor KMP](https://github.com/getspherelabs/meteor-kmp) to create application using MVI architecture. It provides a unidirectional data flow (UDF), allowing you to handle state changes and propagate them to the UI efficiently.\n\n# Technology\n\n- [Kotlin]()\n- [Kotlin Coroutine]()\n- [Swift]()\n- [Jetpack Compose]()\n- [SwiftUI]()\n- [Ktor]()\n- [SqlDelight]()\n- [Koin]()\n- [Meteor]()\n- [Multiplatform Settings]()\n- [Moko KSwift]()\n- [Combine]()\n- [Coil]()\n- [Meteor ViewModel]()\n- [NavigationStack]()\n- [Turbine]()\n- [Ktlint]()\n- [Spotless]()\n- [Jacoco]()\n\n# Modularization\nModularization is the practice of breaking the concept of a monolithic, one-module codebase into loosely coupled, self contained modules.\n\nA barebone module is simply a directory with a Gradle build script inside. Usually though, a module will consist of one or more source sets and possibly a collection of resources or assets. Modules can be built and tested independently. Due to Gradle's flexibility there are few constraints as to how you can organize your project. In general, you should strive for low coupling and high cohesion.\n\n- **Low coupling** - Modules should be as independent as possible from one another, so that changes to one module have zero or minimal impact on other modules. They should not possess knowledge of the inner workings of other modules.\n- **High cohesion** - A module should comprise a collection of code that acts as a system. It should have clearly defined responsibilities and stay within boundaries of certain domain knowledge.\n\n```mermaid\ngraph TD;\n    shared--\u003eandroidApp;\n    shared--\u003eiosApp;\n    featureAbout--\u003eshared;\n    featureOnboarding--\u003eshared;\n    featureDiscover--\u003eshared;\n    featureFavourite--\u003eshared;\n    featureDetail--\u003eshared;\n    data--\u003elocal;\n    data--\u003esettings;\n    data--\u003enetwork;\n    local--\u003efeatureDetail;\n    local--\u003efeatureFavourite;\n    network--\u003efeatureDiscover;\n    network--\u003efeatureDetail;\n    settings--\u003efeatureOnboarding;\n```\n\n# Screenshots\n| Android (Jetpack Compose)              | IOS     (SwiftUI)    |\n| ---------------------- | ---------------------- |\n| ![android](docs/imgs/android_screenshot.png) | ![ios](docs/imgs/ios_screenshot.png) |\n\n  \n# Testing\n\nWith a testable app architecture, the code follows a structure that allows you to easily test different parts of it in isolation. Testable architectures have other advantages, such as better readability, maintainability, scalability, and reusability.\n\nUnit tests for the data layer, especially repositories. Most of the data layer should be platform-independent.\n\n# Setup\n\nTo build and run the Android client, you must use Android Studio Arctic Fox or a newer version.\n\nFor iOS development, you'll need XCode 13.2 or a later version, primarily because of the utilization of the new Swift 5.5 concurrency APIs. When you open the iOS project, please ensure that you open the `.xcworkspace` file instead of the `.xcodeproj` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetspherelabs%2Fcosmo-kmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetspherelabs%2Fcosmo-kmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetspherelabs%2Fcosmo-kmp/lists"}