Skip to content

feat: Full offline support with Room 3 + Store 5 + Security#3137

Draft
therajanmaurya wants to merge 2 commits intoopenMF:developmentfrom
therajanmaurya:feat/offline-store5-migration
Draft

feat: Full offline support with Room 3 + Store 5 + Security#3137
therajanmaurya wants to merge 2 commits intoopenMF:developmentfrom
therajanmaurya:feat/offline-store5-migration

Conversation

@therajanmaurya
Copy link
Copy Markdown
Member

Summary

  • Room 3 (3.0.0-alpha03) migration with encrypted TypeConverters
  • Store 5 (5.1.0-alpha08) for full offline cache with SourceOfTruth
  • Security module (FieldEncryptor, SecurityGate, SessionManager)
  • DataStore dual-store (plain + secure) with write-before-delete migration
  • Staleness UI showing data freshness on every cached screen
  • 10 new Room entities + DAOs for complete offline coverage
  • Every list/detail screen works from cache when offline

Plan

Implementing PLAN-migration-mifos-mobile-260501

Progress

  • Phase 0: sync-dirs (core-base/security, store, database)
  • Phase 1: Gradle verification + additions
  • Phase 2: Security + DI verification
  • Phase 3D: TypeConverter encryption
  • Phase 4: DataStore dual-store verification
  • Phase 6: DI wiring order
  • Phase 7: SecurityGate wrapping
  • Phase 3A: Fix ChargeEntity/DAO gaps
  • Phase 3B: 10 new entities
  • Phase 3B-extra: 10 mapper files
  • Phase 3C: 10 new DAOs
  • Phase 3E: AppDatabase update (version bump)
  • Phase 5A: DataFreshnessIndicator + CachedData wrapper
  • Phase 5B: 10 offline repos with Store 5
  • Phase 5C: 6 memory stores
  • Phase 5D: ViewModel/screen staleness wiring
  • Phase 8: Verification

Test plan

  • ./gradlew :cmp-android:assembleDemoDebug passes
  • ./gradlew :core:database:kspKotlinIosArm64 passes
  • Offline mode: airplane mode → screens load from cache
  • Staleness: cached data shows "Updated X min ago" banner
  • Encryption: TypeConverter values have ENC: prefix

- Upgrade Room 2.7.2 → 3.0.0-alpha03 (androidx.room3 artifacts)
- Add Store 5.1.0-alpha08 dependencies to core/data
- Wire SecurityModule as first in KoinModules DI order
- Add TypeConverter encryption with FieldEncryptor install() pattern
- Migrate DataStore to dual-store (plain + secure Settings)
- Add write-before-delete migration for existing userData
- Wrap ComposeApp with SecurityGate
- Update KMPRoomConventionPlugin for Room 3 plugin ID
- Fix MifosGitHooksConventionPlugin for submodule .git file
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 313913cf-9cb1-4629-8642-9e7d464677cb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…astore modules

- Migrate to Store5 offline-first architecture with staleness UI
- Add datastore modules (secure settings, per-platform factories)
- Refactor analytics module with proper KMP source sets
- Add StoreRegistry and entity mappers for beneficiary/loan/account
- Fix settings.gradle.kts import ordering for lib-integrate compatibility
- Fix detekt issues (param ordering, max line length)
- Update dependency tree and Gradle wrapper
- Clean up deprecated code and consolidate modules
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