{"id":24714433,"url":"https://github.com/ml-opensource/kmp-template","last_synced_at":"2025-09-06T15:40:28.499Z","repository":{"id":225279524,"uuid":"764580955","full_name":"ml-opensource/KMP-Template","owner":"ml-opensource","description":"A Git repository providing a Kotlin Multiplatform Project template","archived":false,"fork":false,"pushed_at":"2024-05-17T05:50:46.000Z","size":347,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-24T12:11:22.605Z","etag":null,"topics":["android","compose-multiplatform","ios","kmp","koin-kotlin","kotlin","kotlin-multiplatform","skie","template-repository"],"latest_commit_sha":null,"homepage":"","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/ml-opensource.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}},"created_at":"2024-02-28T10:41:11.000Z","updated_at":"2024-10-03T18:58:16.000Z","dependencies_parsed_at":"2024-03-05T12:47:23.684Z","dependency_job_id":"1dc4b3a9-92e6-4726-80c3-1146d128b3b8","html_url":"https://github.com/ml-opensource/KMP-Template","commit_stats":null,"previous_names":["monstar-lab-oss/kmp-template","ml-opensource/kmp-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-opensource%2FKMP-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-opensource%2FKMP-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-opensource%2FKMP-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-opensource%2FKMP-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ml-opensource","download_url":"https://codeload.github.com/ml-opensource/KMP-Template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235820061,"owners_count":19050101,"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":["android","compose-multiplatform","ios","kmp","koin-kotlin","kotlin","kotlin-multiplatform","skie","template-repository"],"created_at":"2025-01-27T08:16:35.273Z","updated_at":"2025-01-27T08:16:36.371Z","avatar_url":"https://github.com/ml-opensource.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kotlin Multiplatform Project Setup\n\n![kotlin-version](https://img.shields.io/badge/kotlin-1.9.23-blue)\n\nThis Kotlin Multiplatform project targets Android and iOS using Compose Multiplatform.\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://github.com/monstar-lab-oss/KMP-Template/assets/95737419/0917435d-5e69-495c-8abc-bdeadb3bae60\" width=\"25%\" height=\"25%\" style=\"margin-right: 50px;\" /\u003e\n \u003cimg src=\"https://github.com/monstar-lab-oss/KMP-Template/assets/95737419/79919fd2-4177-45fd-b65d-4324dbfa3db9\" width=\"25%\" height=\"25%\" /\u003e\n\u003c/p\u003e\n\n\n💻 **Techstack**\n-   \u003cimg src=\"https://kotlinlang.org/assets/images/favicon.svg?\u0026v=8607ff59d5296c7642ecd72bd3daa79b\" height=12 /\u003e [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html)\n-   [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform) for sharing UIs across multiple platforms with Kotlin\n- \u003cimg src=\"https://developer.apple.com/assets/elements/icons/swiftui/swiftui-96x96_2x.png\" height=12 /\u003e [Swift UI](https://developer.apple.com/xcode/swiftui/) (Optional)\n- 🗡️ [koin](https://github.com/InsertKoinIO/koin) for Dependency Injection\n- ☁️ [ktor](https://github.com/ktorio/ktor) for networking\n- 🔗 [Kotlin Serialization](https://kotlinlang.org/docs/serialization.html) as primary JSON (de)serialization tool\n- 🔄 [Kotlin Coroutines](https://kotlinlang.org/docs/coroutines-overview.html) for async operations\n- 📦 [Room (Kotlin Multiplatform)](https://developer.android.com/kotlin/multiplatform/room) for persistent SQL storage\n- 🗂 [DataStore (Kotlin Multiplatform)](https://developer.android.com/kotlin/multiplatform/datastore) for persistent NoSQL storage\n- 📱 Shared [ViewModel](https://developer.android.com/reference/androidx/lifecycle/ViewModel) by AndroidX\n- 🧭 [Voyager](https://voyager.adriel.cafe/navigation) for navigation\n- 📲 [SKIE](https://skie.touchlab.co/) - Swift Kotlin Interface Enhancer by Touchlab\n- 🖼 Coil for loading images\n- ✨ [Spotless](https://github.com/diffplug/spotless) for code-format control\n- 🔍 [Detekt](https://github.com/detekt/detekt) for static code analysis\n\n📒 **Todo**\n- Jetpack Navigation\n- Deeplink Support\n- Build Logic\n\n## Project Setup\n\n### Android:\n\n1. Open the project in Android Studio.\n2. Wait for the build to finish.\n3. Select `composeApp` from the `Run/Debug` Configurations.\n4. Apply and run.\n\n### iOS:\n\n1. Navigate to the `KMP-Template/iosApp` directory.\n2. For first-time setup:\n    - Open terminal in that directory and run the command `pod install`.\n    - It’ll generate the `iosApp.xcworkspace` file.\n3. Open the `iosApp.xcworkspace` file in Xcode.\n4. Choose the correct target for your device or simulator in the scheme chooser at the top of the window.\n5. Build and run.\n\n### iOS with Swift UI:\n\nIf you want to run the iOS app with swift UI (not compose multiplatform)\n1. Open the `iosApp.xcworkspace` file in Xcode.\n2. Navigate to the `iosApp/presentation/ContentView` file in Xcode.\n3. Inside the ContentView body, uncomment the line `SplashScreen()` and comment out the `ComposeView().ignoresSafeArea(.keyboard)`.\n4. Build and run.\n\n## Structure\n\n- `/composeApp`: Contains code shared across the Compose Multiplatform applications.\n    - `commonMain`: Holds code that's common for all targets.\n    - Platform-specific directories (e.g., `androidMain`, `iosMain`): Contain Kotlin code that will\n      compile only for the designated platform. For iOS-specific Kotlin code, such as integration with\n      Apple's CoreCrypto, uses `iosMain`.\n\n- `/iosApp`: Contains the iOS application. This is the necessary entry point for the iOS app,\n  even when sharing UI with Compose Multiplatform. This is also where to add any SwiftUI code for\n  your project.\n\n## Architecture\nTemplate implements [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) and follows [best practices](https://developer.android.com/topic/architecture) provided by Google with some tweaks here and there\n\n### Presentation layer\nThe Presentation layer or UI Layer is our Jetpack Compose UI screens and components, and ViewModels. The Presentation layer interacts with the Domain Layer where our business logic resides.\n\n### Domain layer\nThe domain layer contains the application's business logic. This layer only works with abstractions and as such it never knows about how different layers look like. It doesn't know about any Databases, APIs, or even any Frameworks.\n\n### Data layer\nThe data layer is where the actual interactions happen between different data sources. This layer “implements” parts of the Domain layer and communicates with the APIs, Databases, and other services and SDKs.\n\n\n## Tools\nThese are the tools used in the template, to improve the development, that you should be aware of:\n\n### [Spotless](https://github.com/diffplug/spotless)\nSpotless is a Gradle plugin used for consistent code formatting and style conventions across the project. You can use it running the following Gradle commands:\n\n`./gradlew spotlessCheck` - Checks the style formatting and displays any issues\n\n`./gradlew spotlessApply` - Same as above but automatically tries to fix most of the issues. If for any reason it can't, then a list of problems is displayed.\n\n## Additional Resources\n\nFor more information on Kotlin Multiplatform, visit\nthe [official documentation](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fml-opensource%2Fkmp-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fml-opensource%2Fkmp-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fml-opensource%2Fkmp-template/lists"}