# openmf/mifos-pay architecture

> Architecture diagram of the GitHub repository openmf/mifos-pay, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openmf/mifos-pay
- Repository: https://github.com/openmf/mifos-pay

## Overview

Mifos Pay is a Kotlin Multiplatform wallet app for Android, iOS, desktop, and web, built on the Fineract API. Its broad user journey enters through a platform shell, renders the shared Compose application, and proceeds through authentication and financial tasks; the README documents the backend relationship, while sampled code confirms the shared-app handoff. The tree also shows transfer, loan, search, settings, and synchronization areas. Feature-level wiring is mostly unsampled, so those connections are omitted rather than inferred.

Main entry points: [`cmp-shared/src/commonMain/kotlin/cmp/shared/SharedApp.kt`](https://github.com/openmf/mifos-pay/blob/dev/cmp-shared/src/commonMain/kotlin/cmp/shared/SharedApp.kt) (Shared app), [`cmp-desktop/src/jvmMain/kotlin/main.kt`](https://github.com/openmf/mifos-pay/blob/dev/cmp-desktop/src/jvmMain/kotlin/main.kt) (Desktop shell), [`cmp-shared/src/iosMain/kotlin/MifosViewController.kt`](https://github.com/openmf/mifos-pay/blob/dev/cmp-shared/src/iosMain/kotlin/MifosViewController.kt) (iOS shell), [`cmp-web/src/wasmJsMain/kotlin/Main.kt`](https://github.com/openmf/mifos-pay/blob/dev/cmp-web/src/wasmJsMain/kotlin/Main.kt) (Web shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entrypoints"]
  node_desktop["Desktop shell<br/>[main.kt]"]
  node_ios["iOS shell"]
  node_web["Web shell<br/>[Main.kt]"]
end

subgraph group_navigation["Shared app"]
  node_shared["Shared app<br/>[SharedApp.kt]"]
  node_compose["Compose root<br/>[ComposeApp.kt]"]
end

subgraph group_finance["Financial services"]
  node_auth["Authentication API"]
  node_twofactor["Two-factor API"]
  node_search["Search API<br/>[SearchService.kt]"]
  node_loans["Loan API<br/>[LoansService.kt]"]
  node_transfer["Money transfer"]
end

subgraph group_platform["Platform services"]
  node_sync["Data synchronization<br/>[DataSyncWorker.kt]"]
  node_database[("Local database")]
  node_review["App review"]
end

node_user(("User"))
node_fineract["Fineract backend"]

node_user -.->|"uses"| node_desktop
node_user -.->|"uses"| node_ios
node_user -.->|"uses"| node_web
node_desktop -->|"launches"| node_shared
node_ios -->|"renders"| node_shared
node_web -->|"renders"| node_shared
node_shared -->|"delegates"| node_compose
node_auth -.->|"API calls"| node_fineract
node_twofactor -.->|"API calls"| node_fineract
node_search -.->|"API calls"| node_fineract
node_loans -.->|"API calls"| node_fineract

click node_desktop "https://github.com/openmf/mifos-pay/blob/dev/cmp-desktop/src/jvmMain/kotlin/main.kt"
click node_ios "https://github.com/openmf/mifos-pay/blob/dev/cmp-shared/src/iosMain/kotlin/MifosViewController.kt"
click node_web "https://github.com/openmf/mifos-pay/blob/dev/cmp-web/src/wasmJsMain/kotlin/Main.kt"
click node_shared "https://github.com/openmf/mifos-pay/blob/dev/cmp-shared/src/commonMain/kotlin/cmp/shared/SharedApp.kt"
click node_compose "https://github.com/openmf/mifos-pay/blob/dev/cmp-navigation/src/commonMain/kotlin/cmp/navigation/ComposeApp.kt"
click node_auth "https://github.com/openmf/mifos-pay/blob/dev/core/network/src/commonMain/kotlin/org/mifospay/core/network/services/AuthenticationService.kt"
click node_twofactor "https://github.com/openmf/mifos-pay/blob/dev/core/network/src/commonMain/kotlin/org/mifospay/core/network/services/TwoFactorAuthService.kt"
click node_search "https://github.com/openmf/mifos-pay/blob/dev/core/network/src/commonMain/kotlin/org/mifospay/core/network/services/SearchService.kt"
click node_loans "https://github.com/openmf/mifos-pay/blob/dev/libs/mifos-loans/src/commonMain/kotlin/org/mifos/lib/loan/network/LoansService.kt"
click node_transfer "https://github.com/openmf/mifos-pay/blob/dev/feature/transfer-interbank/src/commonMain/kotlin/org/mifospay/feature/transfer/interbank/screens/PreviewTransferScreen.kt"
click node_sync "https://github.com/openmf/mifos-pay/blob/dev/sync/src/commonMain/kotlin/kpt/sync/infra/DataSyncWorker.kt"
click node_review "https://github.com/openmf/mifos-pay/blob/dev/core-base/platform/src/commonMain/kotlin/kpt/core/base/platform/review/AppReviewManager.kt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop,node_ios,node_web,node_user toneBlue
class node_shared,node_compose toneAmber
class node_auth,node_twofactor,node_search,node_loans,node_transfer toneMint
class node_sync,node_database,node_review toneRose
class node_fineract toneIndigo
```

## Components

### App entrypoints

- [Desktop shell](https://github.com/openmf/mifos-pay/blob/dev/cmp-desktop/src/jvmMain/kotlin/main.kt): `cmp-desktop/src/jvmMain/kotlin/main.kt`
- [iOS shell](https://github.com/openmf/mifos-pay/blob/dev/cmp-shared/src/iosMain/kotlin/MifosViewController.kt): `cmp-shared/src/iosMain/kotlin/MifosViewController.kt`
- [Web shell](https://github.com/openmf/mifos-pay/blob/dev/cmp-web/src/wasmJsMain/kotlin/Main.kt): `cmp-web/src/wasmJsMain/kotlin/Main.kt`

### Shared app

- [Shared app](https://github.com/openmf/mifos-pay/blob/dev/cmp-shared/src/commonMain/kotlin/cmp/shared/SharedApp.kt): `cmp-shared/src/commonMain/kotlin/cmp/shared/SharedApp.kt`
- [Compose root](https://github.com/openmf/mifos-pay/blob/dev/cmp-navigation/src/commonMain/kotlin/cmp/navigation/ComposeApp.kt): `cmp-navigation/src/commonMain/kotlin/cmp/navigation/ComposeApp.kt`

### Financial services

- [Authentication API](https://github.com/openmf/mifos-pay/blob/dev/core/network/src/commonMain/kotlin/org/mifospay/core/network/services/AuthenticationService.kt): `core/network/src/commonMain/kotlin/org/mifospay/core/network/services/AuthenticationService.kt`
- [Two-factor API](https://github.com/openmf/mifos-pay/blob/dev/core/network/src/commonMain/kotlin/org/mifospay/core/network/services/TwoFactorAuthService.kt): `core/network/src/commonMain/kotlin/org/mifospay/core/network/services/TwoFactorAuthService.kt`
- [Search API](https://github.com/openmf/mifos-pay/blob/dev/core/network/src/commonMain/kotlin/org/mifospay/core/network/services/SearchService.kt): `core/network/src/commonMain/kotlin/org/mifospay/core/network/services/SearchService.kt`
- [Loan API](https://github.com/openmf/mifos-pay/blob/dev/libs/mifos-loans/src/commonMain/kotlin/org/mifos/lib/loan/network/LoansService.kt): `libs/mifos-loans/src/commonMain/kotlin/org/mifos/lib/loan/network/LoansService.kt`
- [Money transfer](https://github.com/openmf/mifos-pay/blob/dev/feature/transfer-interbank/src/commonMain/kotlin/org/mifospay/feature/transfer/interbank/screens/PreviewTransferScreen.kt): `feature/transfer-interbank/src/commonMain/kotlin/org/mifospay/feature/transfer/interbank/screens/PreviewTransferScreen.kt`

### Platform services

- [Data synchronization](https://github.com/openmf/mifos-pay/blob/dev/sync/src/commonMain/kotlin/kpt/sync/infra/DataSyncWorker.kt): `sync/src/commonMain/kotlin/kpt/sync/infra/DataSyncWorker.kt`
- **Local database**
- [App review](https://github.com/openmf/mifos-pay/blob/dev/core-base/platform/src/commonMain/kotlin/kpt/core/base/platform/review/AppReviewManager.kt): `core-base/platform/src/commonMain/kotlin/kpt/core/base/platform/review/AppReviewManager.kt`

### Other components

- **User**
- **Fineract backend**

## Connections

- User → Desktop shell: uses
- User → iOS shell: uses
- User → Web shell: uses
- Desktop shell → Shared app: launches (evidence: `cmp-desktop/src/jvmMain/kotlin/main.kt`)
- iOS shell → Shared app: renders (evidence: `cmp-shared/src/iosMain/kotlin/MifosViewController.kt`)
- Web shell → Shared app: renders (evidence: `cmp-web/src/wasmJsMain/kotlin/Main.kt`)
- Shared app → Compose root: delegates (evidence: `cmp-shared/src/commonMain/kotlin/cmp/shared/SharedApp.kt`)
- Authentication API → Fineract backend: API calls
- Two-factor API → Fineract backend: API calls
- Search API → Fineract backend: API calls
- Loan API → Fineract backend: API calls
