How openmf/mobile-wallet works
Main system components
• Feature Modules: Each business feature (e.g., accounts, auth, edit password, faq, finance, home, invoices, kyc, make-transfer, etc.) is placed in its own subdirectory under “feature”. They encapsulate the individual business functionalities.
• Platform-specific Modules: These include modules like “mifospay-android”, “mifospay-ios”, “mifospay-desktop”, “mifospay-web” and even “mifospay-shared” which bring together the multiplaform logic and UI navigation. They serve as the entry points per platform.
• Build & Library Infrastructure: The “build-logic” directory contains custom Gradle scripts and convention plugins, and the “libs” directory (for example, mifos-passcode) contains additional reusable libraries.
• CI/CD & Deployment: The .github workflows, Dockerfile, and fastlane directories point to automated build, testing, deployment, and release processes.
Relationships and interactions
• The Data layer comprises components under “core/data”, “core/datastore”, etc., which handle repository implementations, mappers, and API communication via Ktor.
• The Domain layer (“core/domain”) holds business logic or use cases driven by Domain-Driven Design.
• The Presentation (UI) layer is handled in “core/ui”, “core/designsystem” and the feature modules (each feature contains its own ViewModels, screens, navigators, etc.) that use Compose for building UI.
• Diagnostic/analytics features under “core/analytics” may sit as an overlay interacting with both the domain and UI layers.
• Integration points:
• Dependency injection using Koin flows between modules (note the various “di” directories in feature modules and core components).
• API networking interactions using Ktor/Ktorfit in the “core/network” modules, which interact with the backend Fineract API.
• Shared configuration across platforms is orchestrated through common build scripts from “build-logic”.
Architectural patterns/design principles
• The project uses a modular architecture where each feature or cross-cutting concern is isolated in its own module.
• It follows separation of concerns and dependency inversion; the UI layer calls into ViewModels, which then trigger domain use cases that communicate with the data layer.
• Multiplaform principles are evident where “commonMain” code is shared and “androidMain”, “iosMain”, etc. provide platform-specific implementations.
• DI is consistently applied through Koin “modules” found across the project.
• Modern reactive/procedural UI design is leveraged through Jetpack Compose constructs across platforms.
Technical stack details
• Languages and Platforms: Kotlin, Kotlin Multiplatform.
• UI Framework: Jetpack Compose (including Compose Multiplatform).
• Networking: Ktor and Ktorfit.
• Dependency Injection: Koin.
• Build Tools: Gradle (using convention plugins from “build-logic”) and fastlane for mobile deployment.
• Testing & CI: GitHub Actions workflows for pre-push, PR checks, monthly tags, etc.
Elements
• Clear labels for each component:
• External API calls from the network module and flows between dependency injection modules.
• For multi-platform boundaries, consider using grouping (such as a frame around platform-specific modules).