Skip to content

refactor: adopt template 90ff6da6, kpt.* packages, wallet root on ForkAppShell, web sign-in via relay - #2070

Open
therajanmaurya wants to merge 5 commits into
openMF:devfrom
therajanmaurya:session-mobile-wallet-20261106011512
Open

therajanmaurya wants to merge 5 commits into
openMF:devfrom
therajanmaurya:session-mobile-wallet-20261106011512

Conversation

@therajanmaurya

@therajanmaurya therajanmaurya commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Brings Mifos Pay onto kmp-project-template 90ff6da6 (template PR openMF/kmp-project-template#316) and finishes the migration onto the template's structure, so later template syncs apply cleanly. The web app now signs in and loads home end to end (verified with the demo account on mifos-bank-2). Supersedes #2069.

Changes

Template sync

  • Adopts template 90ff6da6: sync engine and ownership contract, Kotlin 2.4.20, Room 3.1, the Store5 offline-first stack and the per-layer Fork* seams.

Package migration

  • org.mifospay.core.* / org.mifospay.feature.* → kpt.core.* / kpt.feature.* across every core/ and feature/ module (~800 files).
  • Where the wallet declares a name the template already has in the same package (palette, typography, UserData, LanguageConfig, password utilities, the home/profile/settings screens), the wallet's version lives in a .fork subpackage and is imported explicitly, so it never resolves to the template's.
  • MifosPreferences merged into ForkPreferencesRepository, which extends the template's UserPreferencesRepository.
  • The wallet's Fineract network stack (services, utils, localAssets) sits under the main access point package, matching the template's network layout.

App shell

  • MifosPaySharedApp is gone. The wallet root (login, passcode, background re-auth lock, 401 dialog, the four-tab shell) is ForkAppRoot in the fork-owned cmp.navigation.registry.app, rendered through the template's ForkAppShell.root. Every platform entry point (Android, iOS, desktop, web) reaches it through the template's SharedApp.
  • The template's ComposeApp, AppViewModel, RootNav*, navigation, KoinModules and KoinExt are back to the template versions; the wallet's Koin modules register through ForkFeatureRegistry, its module dependencies through feature-deps.gradle.kts.
  • Removed the unused org.mifospay.MainActivity (the manifest launches the template activity).

Web

  • Same-origin /cors relay (Cloudflare Pages worker) for the Fineract servers, which reject browser-origin requests; an allowlisted origin (https://openmf.github.io) can use it cross-origin, so a GitHub Pages build works too.
  • Fixed the home screen staying on its loading state after sign-in (empty, never-fetched cache was treated as fresh — template fix included).
  • Fixed the JS currency formatter crash and turned off HTTP request logging by default (it printed request bodies, including the sign-in password, to the console).
  • Koin bindings that collided by simple name on JS/Wasm are qualified; a desktop test guards it.

Build and tests

  • Mokkery 3.4.2 → 3.6.0 (3.4.2 crashes the compiler on Kotlin 2.4.20).
  • Test fakes updated for the new preferences interface; database version test now expects schema v10; two tests now await their resource-backed error state; dependency baseline regenerated; iOS Kotlin source list regenerated.

Verification

  • Compiles for Android, desktop, JS and Wasm; desktop test suite passes.
  • Web (production build of this branch): sign-in with the demo account, passcode setup and home with balance and transactions — all requests 200.

Known follow-ups (pre-existing on dev)

  • Detekt and the documentation audit report ~6,400 undocumented public symbols across the wallet modules; the Android check fails in the same Detekt step.
  • Fork-only pages under docs/architecture/tree/ resolve as template-owned, so their authored sections can't be written in the fork yet (template ownership fix needed).
  • keystores/ contains committed keystore files; signing material should move to the secrets vault.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

therajanmaurya and others added 3 commits November 6, 2026 01:51
Move fork code out of template-owned roots before the strict-mirror sync:
- core-base/network org.mifos.corebase.network (12 files) -> core/network (same package); libs/mifos-loans depends on core:network
- drop the template.core.base.* shims; consumers import kpt.core.base.* directly
- drop the unused core/analytics + core-base/analytics modules
- Compose plugins for core/common|data|network move to module-deps.gradle.kts
- .template-sync-holds: 99 held paths (app shell, platform files, fork docs, never-touch cla-check)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…enMF#316)

Strict-mirror template sync from 6fe88bad (48 template commits):
- engine overlay + 3-way merges; 9 conflicts resolved keeping the fork shell (RootNav, Koin, nav bridge)
  and the template's ForkFeatureRegistry / privacy consent / deep links / onboarding install
- ksp-registration: 16 wallet entities + DAOs (@DbEntity/@dbdao) and 16 stores (@StoreProvider,
  14 @Cachekey) replace the hand-written AppDatabase / AppStoreRegistry / StoreModule; Room v10
  (9->10 adds framework_write_conflicts + drafts.attemptCount), ledger in app-profile/migration-ledger.yaml
- registry seams seeded (demo-stripped), feature/onboarding seeded, fork features in feature-deps
- 99 fork paths held in .template-sync-holds (cmp-shared app shell, security gates, platform files, docs)
- fork includes moved to settings.local.gradle.kts (project graph identical, 66 projects)
- product-health 37 passed / 1 warn / 0 failed; assembleProdDebug + desktop compile green

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ules out of di/, dependency baseline, docs refresh
@therajanmaurya therajanmaurya changed the title [WIP] chore(sync): template sync 90ff6da6 (kmp-project-template PR #316) refactor: adopt template 90ff6da6, kpt.* packages, wallet root on ForkAppShell, web sign-in via relay Nov 6, 2026
@therajanmaurya
therajanmaurya marked this pull request as ready for review November 6, 2026 12:10
@therajanmaurya
therajanmaurya requested review from a team November 6, 2026 12:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant