← all projects

basis-kmp

Kotlin Multiplatform investment tracker — one shared core (valuation, cost basis, allocation), fully native Compose and SwiftUI UIs.

View on GitHub ↗Kotlinupdated 5d ago

KotlinKMPComposeSwiftUIKoin

High-level design

One Kotlin module owns the numbers — valuation, cost basis, allocation. Android and iOS each own their own rendering, sharing nothing at the UI layer.

shared/domain

valuation, cost-basis, allocation math — pure Kotlin, tested on JVM and Kotlin/Native

shared/data

repository interfaces + Koin DI graph, implemented once

androidApp

Jetpack Compose + Material 3

iosApp

SwiftUI, calling the shared module through a generated Swift interface

Low-level design

SHARING.md documents the module-by-module share-vs-native call. The short version:

  • Share: anything expensive to get wrong twice — math, validation, persistence schema
  • Keep native: charts (Vico on Android, Swift Charts on iOS), navigation, biometrics
  • expect/actual only at the one or two seams where a platform API is unavoidable (secure storage)