{"id":18822396,"url":"https://github.com/moallemi/kotlin-multiplatform-showcase","last_synced_at":"2025-04-14T01:09:13.053Z","repository":{"id":46617573,"uuid":"294799493","full_name":"moallemi/kotlin-multiplatform-showcase","owner":"moallemi","description":"A real minimal app illustrating Kotlin Multiplatform","archived":false,"fork":false,"pushed_at":"2021-10-03T18:56:17.000Z","size":1498,"stargazers_count":66,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T01:09:01.371Z","etag":null,"topics":["android","hacktoberfest","ios-app","ios-swift","kmp","kotlin","kotlin-android","kotlin-js","kotlin-multi-platform","kotlin-multiplatform","ktor-client","ktor-server","swiftui","xcode"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moallemi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-11T19:50:43.000Z","updated_at":"2024-05-16T10:30:19.000Z","dependencies_parsed_at":"2022-07-22T01:48:08.420Z","dependency_job_id":null,"html_url":"https://github.com/moallemi/kotlin-multiplatform-showcase","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moallemi%2Fkotlin-multiplatform-showcase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moallemi%2Fkotlin-multiplatform-showcase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moallemi%2Fkotlin-multiplatform-showcase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moallemi%2Fkotlin-multiplatform-showcase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moallemi","download_url":"https://codeload.github.com/moallemi/kotlin-multiplatform-showcase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804803,"owners_count":21164134,"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","hacktoberfest","ios-app","ios-swift","kmp","kotlin","kotlin-android","kotlin-js","kotlin-multi-platform","kotlin-multiplatform","ktor-client","ktor-server","swiftui","xcode"],"created_at":"2024-11-08T00:49:15.668Z","updated_at":"2025-04-14T01:09:13.035Z","avatar_url":"https://github.com/moallemi.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kotlin Multiplatform Showcase\n\n\u003cimg src=\"https://github.com/moallemi/kmp-showcase/blob/master/.github/kmp-showcase.png?raw=true\"\u003e\n\nA minimal app illustrating **Kotlin Multiplatform**. Currently running on\n* Android (available on [Google Play](https://play.google.com/store/apps/details?id=me.moallemi.kmpshowcase))\n* iOS (Rejected by Apple!)\n* Web (view  [Demo](https://kmp-showcase-web.herokuapp.com))\n* Web-React (in progress)\n* macOS (TODO)\n* CLI (TODO)\n\n\u003cimg src=\"https://github.com/moallemi/kmp-showcase/blob/master/.github/android-ios-screenshot.png?raw=true\"\u003e\n\n## Project Structure\n\nThis project consists of several gradle modules as well as an xcode project.\n\n### Shared\n\nThis is the central module which contains shared client code. It includes an Api class with a method to query the apps endpoint using the Ktor http client.\n\n### Android\n\nThis is an Android project consuming the `:shared` module. It contains a single activity which calls the `viewModel.load()` function and displays its output in UI.\n\n### iOS\n\nThe iOS app code is in the `iosApp` directory. It uses SwiftUI to render output to screen.\n\n### Server\n\nThis is a simple Ktor server running on the Netty engine with a single endpoint `/api/v1/apps`, which outputs a list of `Apps` object serialized to JSON.\n\nNote that this repository may have not used the best practices on android or iOS implementation to help more clearly illustrate key parts of a Kotlin\nMultiplatform project and also to help someone just starting to explore KMP for the first time.\n\n### Libraries and tools used\n\n* [Kotlin Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html)\n* [Kotlinx Serialization](https://github.com/Kotlin/kotlinx.serialization)\n* [Ktor client and server library](https://github.com/ktorio/ktor)\n* [Android Architecture Components](https://developer.android.com/topic/libraries/architecture/index.html)\n* [Koin](https://github.com/InsertKoinIO/koin)\n* [SwiftUI](https://developer.apple.com/documentation/swiftui)\n\n### Development setup\n* **Android**: For development, the latest version of Android Studio 4.0+ is required.\n* **iOS**: The iOS code can be modified or built by opening `iosApp/KmpShowcase.xcodeproj` in Xcode.\n* **Server**: Running `./gradlew server:run` will deploy the server to localhost on port 9090.\n* **Web**: Running `./gradlew web:run -t` will run web client on localhost.\n* **WebReact**: Running `./gradlew webReact:run -t` will run web React client on localhost.\n\nOnce you setup the project, you might want to change server address in your `~/.gradle/gradle.properties`:\n\n```\nKMP_SHOWCASE_API_BASE_URL_DEFAULT=\u003cinsert\u003e // default: http://localhost:9090\nKMP_SHOWCASE_API_BASE_URL_ANDROID=\u003cinsert\u003e // default: http://10.0.2.2:9090\nKMP_SHOWCASE_API_BASE_URL_IOS_X64=\u003cinsert\u003e // default: http://localhost:9090\nKMP_SHOWCASE_API_BASE_URL_IOS_ARM64=\u003cinsert\u003e // default: http://localhost:9090\n```\n\n## Contributions\n\nIf you've found an error in this sample or you want to improve the project, please read the [Contributing Guide](CONTRIBUTING.md) first.\n\nPatches are encouraged, and may be submitted by forking this project and\nsubmitting a pull request. Since this project is still in its very early stages,\nif your change is substantial, please raise an issue first to discuss it.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoallemi%2Fkotlin-multiplatform-showcase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoallemi%2Fkotlin-multiplatform-showcase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoallemi%2Fkotlin-multiplatform-showcase/lists"}