From 5f7a847b7040dc4bcd85e1aa6e3ca59ee520bb20 Mon Sep 17 00:00:00 2001 From: Rajan Maurya Date: Thu, 25 Dec 2025 21:35:13 +0530 Subject: [PATCH 1/2] docs: add CLAUDE.md for Claude Code guidance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add documentation file to help Claude Code instances understand the codebase architecture, build commands, and development patterns. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Rajan Maurya --- CLAUDE.md | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++ version.txt | 1 - 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 CLAUDE.md delete mode 100644 version.txt diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..af67b5891b --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,82 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +Android Client for MifosX - a Kotlin Multiplatform (KMP) application for field officers to manage financial services. Supports Android, iOS, and Desktop with offline capability. + +**Demo**: `gsoc.mifos.community` (mifos/password) + +## Build Commands + +```bash +# Full pre-push check (run before PRs) +./ci-prepush.sh + +# Individual tasks +./gradlew check -p build-logic # Verify build-logic +./gradlew spotlessApply --no-configuration-cache # Format code +./gradlew dependencyGuardBaseline # Update dependency baseline +./gradlew detekt # Static analysis +./gradlew build # Full build + +# Platform-specific +./gradlew :cmp-android:assembleDebug # Android debug APK +./gradlew :cmp-desktop:run # Run desktop app + +# Testing +./gradlew testDebug # Unit tests +./gradlew :lint:test :mifosng-android:lintRelease # Lint checks +``` + +## Architecture + +### Module Structure +``` +core/ - Shared layers (common, model, domain, data, database, network, datastore, designsystem, ui) +feature/ - Feature modules (auth, client, loan, savings, groups, center, offline, etc.) +cmp-android/ - Android app entry point +cmp-desktop/ - Desktop JVM app +cmp-ios/ - iOS app +cmp-shared/ - Shared composition root +cmp-navigation/ - Navigation and DI aggregation +build-logic/ - Gradle convention plugins +``` + +### Clean Architecture Layers +1. **Presentation** (feature modules): Compose screens + ViewModels with StateFlow +2. **Domain** (core/domain): Use cases and repository interfaces +3. **Data** (core/data): Repository implementations +4. **Database** (core/database): Room with KMP expect/actual pattern +5. **Network** (core/network): Ktor + Ktorfit for API calls + +### Key Patterns +- **State**: Sealed classes for UI state (e.g., `ClientListUiState`) +- **DI**: Koin modules in each module's `di/` package, aggregated in `cmp-navigation/di/KoinModules.kt` +- **Data Flow**: `Flow>` or `Flow>` from repositories + +### Adding a New Feature +1. Create module under `feature/[name]/` +2. Apply plugin: `alias(libs.plugins.mifos.cmp.feature)` +3. Structure: Screen.kt, ViewModel.kt, UiState.kt, Route.kt + `di/Module.kt` +4. Register DI module in `cmp-navigation/di/KoinModules.kt` +5. Add navigation route in cmp-navigation + +## Key Technologies +- Kotlin 2.1.0, Compose Multiplatform 1.9.0 +- Room 2.7.0-rc02 (multiplatform), Ktor 3.1.3, Ktorfit 2.5.2 +- Koin 4.0.1-RC1, Paging 3, Coil 3.2.0 +- Versions in `gradle/libs.versions.toml` + +## Commit Convention +Format: `(): ` + +Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `misc` + +Example: `feat(client): add client filter functionality` + +## Branch Policy +- Development: `development` branch +- PRs target: `master` branch +- Always pull from `development` for latest changes diff --git a/version.txt b/version.txt deleted file mode 100644 index fd845667f8..0000000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -2025.12.2-beta.0.18 \ No newline at end of file From c651fa0ef737e650ee1c8696d96058be756a24fb Mon Sep 17 00:00:00 2001 From: Rajan Maurya Date: Thu, 25 Dec 2025 21:40:34 +0530 Subject: [PATCH 2/2] chore: restore version.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Rajan Maurya --- version.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 version.txt diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000..fd845667f8 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +2025.12.2-beta.0.18 \ No newline at end of file