How emmanueldav/cashipaymentapp works
Cashi Payments is a Kotlin Multiplatform app for submitting payments and viewing transaction history. The main workflow is a user entering recipient, amount, and currency; shared presentation logic validates and submits the payment to a backend, then records it in the platform repository. Android presents the Compose send and history screens and uses Firestore for live history; iOS has a Swift shell and a documented in-memory repository stand-in. Relationships rely on the README workflow and architecture, indexed references, and the excerpts shown; unsampled platform wiring is not expanded.
Main entry points: PaymentViewmodel.kt Payment view model · PaymentScreen.kt Send screen · FirebasePaymentRepository.kt Platform repository declaration · PaymentRepository.kt Payment repository contract
Components 19
Client UI
- Android app shell
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/MainActivity.kt - Send screen
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/ui/PaymentScreen.kt - History screen
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/ui/HistoryScreen.kt - Amount input formatting
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/ui/ThousandsSeparatorTransformation.kt - iOS app shell
iosApp/iosApp/ContentView.swift
Shared payment logic
- Payment view model
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/presentation/PaymentViewmodel.kt - Form and history state
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/presentation/PaymentUiState.kt - Payment validation
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/domain/validation/PaymentValidator.kt - Minor-unit formatting
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/domain/money/MoneyFormat.kt - Payment and currency models
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/domain/models/Payment.kt
Backend submission
- Payment request DTO
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/data/dto/PaymentRequest.kt - Payment API client
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/data/network/PaymentApiClient.kt
Transaction history
- Payment repository contract
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/domain/repositories/PaymentRepository.kt - Platform repository declaration
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/data/FirebasePaymentRepository.kt - Android Firestore repository
sharedLogic/src/androidMain/kotlin/com/emmanueliyke/cashipaymentapp/data/FirebasePaymentRepository.android.kt - iOS in-memory repository
sharedLogic/src/iosMain/kotlin/com/emmanueliyke/cashipaymentapp/data/FirebasePaymentRepository.ios.kt
Other components
- Payment user
- Payment backend
- Firestore
Connections 22
- Payment user → Send screen: enters payment
README.md - Android app shell → Send screen: routes to
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/MainActivity.kt - Android app shell → History screen: routes to
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/MainActivity.kt - Send screen → Payment view model: sends form actions
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/ui/PaymentScreen.kt - Send screen → Amount input formatting: formats amount input
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/ui/PaymentScreen.kt - Send screen → Minor-unit formatting: formats displayed amount
androidApp/src/main/kotlin/com/emmanueliyke/cashipaymentapp/ui/PaymentScreen.kt - Payment view model → Form and history state: updates state
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/presentation/PaymentViewmodel.kt - Payment view model → Payment validation: validates fields
README.md - Payment view model → Minor-unit formatting: parses amount
README.md - Payment view model → Payment request DTO: creates request
README.md - Payment view model → Payment API client: submits payment
README.md - Payment API client → Payment backend: posts payment
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/data/network/PaymentApiClient.kt - Payment view model → Payment and currency models: builds payment record
README.md - Payment view model → Payment repository contract: records and observes
README.md - Platform repository declaration → Payment repository contract: implements per platform
sharedLogic/src/commonMain/kotlin/com/emmanueliyke/cashipaymentapp/data/FirebasePaymentRepository.kt - Platform repository declaration → Android Firestore repository: has Android actual
sharedLogic/src/androidMain/kotlin/com/emmanueliyke/cashipaymentapp/data/FirebasePaymentRepository.android.kt - Platform repository declaration → iOS in-memory repository: has iOS actual
README.md - Android Firestore repository → Firestore: writes and listens
sharedLogic/src/androidMain/kotlin/com/emmanueliyke/cashipaymentapp/data/FirebasePaymentRepository.android.kt - Payment repository contract → Payment view model: streams transactions
README.md - Payment view model → History screen: provides live state
README.md - iOS app shell → Payment view model: uses shared logic
- iOS in-memory repository → Firestore: uses memory stand-in
README.md