https://github.com/apter-tech/githubuserfinder
Kotlin Multiplatform sample project with Jetpack Compose and SwiftUI
https://github.com/apter-tech/githubuserfinder
android ios jetpack-compose kotlin kotlin-multiplatform swiftui
Last synced: 3 months ago
JSON representation
Kotlin Multiplatform sample project with Jetpack Compose and SwiftUI
- Host: GitHub
- URL: https://github.com/apter-tech/githubuserfinder
- Owner: apter-tech
- Created: 2022-04-06T18:36:31.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T20:41:31.000Z (6 months ago)
- Last Synced: 2024-10-24T08:26:49.544Z (6 months ago)
- Topics: android, ios, jetpack-compose, kotlin, kotlin-multiplatform, swiftui
- Language: Kotlin
- Homepage:
- Size: 19 MB
- Stars: 48
- Watchers: 5
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHubUserFinder
Kotlin Multiplatform sample project with Jetpack Compose and SwiftUI
Check this basic, simple KMP project with latest and greatest libraries. You can also easily learn and keep your knowledge up-to-date in both [Jeptack Compose](https://developer.android.com/jetpack/compose?gclid=CjwKCAjw7vuUBhBUEiwAEdu2pHTM59Y0NTVLcoFuOJHq5g8p3dJludRLuITkxy54fKMp-3YafHSjNRoCSIwQAvD_BwE&gclsrc=aw.ds) and [SwiftUI](https://developer.apple.com/xcode/swiftui/).




Android | iOS
:--: | :--:|
### About the project
- Shared ViewModels :rocket:
- Shared resources (svg, strings) with moko-resources
- MVVM + Reducer implementation = MVI
- List and detail screens
- Favourite user feature with SQLDelight
- Simple paging functionality
- Linter & formatter (detekt, swiftlint)
- Common tests
- Dark mode
- Automated dependency update with Renovate
- GitHub Actions config: [GitHubUserFinder.yml](https://github.com/kaszabimre/GitHubUserFinder/blob/main/.github/workflows/GitHubUserFinder.yml)
- [GitHub API](https://docs.github.com/en/rest/search#search-users)
- Coverage report (kover)### Libraries
> Check [Dependencies.kt](https://github.com/kaszabimre/GitHubUserFinder/blob/main/buildSrc/src/main/java/Dependencies.kt) for more details- 🌎 [Ktor](https://github.com/ktorio/ktor) - Network
[](https://github.com/ktorio/ktor)
- 🔒 [SQLDelight](https://github.com/cashapp/sqldelight) - LocalDB
[](https://github.com/cashapp/sqldelight)
- 💉 [Koin](https://github.com/InsertKoinIO/koin) - DI framework
[](https://github.com/InsertKoinIO/koin)
- 📋 [Kermit](https://github.com/touchlab/Kermit) - Logger
[](https://github.com/touchlab/Kermit)
- 🎨 [moko resources](https://github.com/icerockdev/moko-resources) - Shared resources
[](https://github.com/icerockdev/moko-resources)
- 🚦 Testing - Common unit tests in `shared` module with [MockHttpClient](https://github.com/kaszabimre/GitHubUserFinder/blob/main/shared/src/commonTest/kotlin/io/imrekaszab/githubuserfinder/MockHttpClient.kt)
- 🔍 Linter & formatter
- [Detekt](https://github.com/detekt/detekt) - `shared + Android`

```
./gradlew detekt
```
- [Swiftlint](https://github.com/realm/SwiftLint) - `iOS`

- [Rules in swiftlint.yaml](https://github.com/kaszabimre/GitHubUserFinder/blob/main/iosApp/.swiftlint.yml)
```
swiftlint --fix
```### Code coverage
- 📋 [Kover](https://github.com/Kotlin/kotlinx-kover) - Kotlin code coverage tool
[](https://github.com/Kotlin/kotlinx-kover)> Use `./gradlew koverVerify koverHtmlReport` to verify and generate the coverage report with a custom rule:
```Kotlin
kover {
verify {
rule {
isEnabled = true
name = "Minimum coverage verification error"
target =
kotlinx.kover.api.VerificationTarget.ALLbound {
minValue = 90
maxValue = 100
counter =
kotlinx.kover.api.CounterType.LINE
valueType =
kotlinx.kover.api.VerificationValueType.COVERED_PERCENTAGE
}
}
}
}
```> After that we can use the [Kotlinx Kover Report](https://github.com/marketplace/actions/kotlinx-kover-report) to add the coverage report to the PR as a comment
### IDEs
- Android Studio Flamingo | 2022.2.1 | with [KMM plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile)
- Xcode 14.3