ngenohkevin 51264301a8 v1.3.0: major redesign — bento UI, Insights, Goals, multi-SIM, in-app updates
UI overhaul
- Modern fintech bento design system (LedgaText, Space, Radius, Motion).
- Inter font via Google Fonts.
- New PillTabBar + LedgaTopBar; 4-tab IA: Home / Activity / Insights / You.
- Home rewritten as bento cards; new AccountChip leading slot.
- Activity wraps Transactions + Trends behind a segmented control.
- Trends gains a GitHub-style heatmap calendar.
- You consolidates Settings into grouped bento cards.

Insights (Phase C)
- Rule engine + 6 rules: anomaly (z-score), recurring detection, fee tips,
  Fuliza outstanding, Fuliza auto-pay pairing, positive nudges.
- Daily InsightWorker (3 AM); generates on screen entry for first-time users.
- Natural-key dedup so dismiss/snooze state survives re-runs.
- Home teaser surfaces the top active insight.

Goals (Phase D)
- New Goal entity + GoalContribution table.
- 3 contribution rules: AllSavingsDeposits, ToRecipient, Manual.
- Rule-based contributions compute live via SQL aggregation (no
  duplicate rows). Manual rule uses goal_contributions table.
- GoalsScreen with progress rings + status badges; AddGoalSheet;
  GoalDetailScreen with contributing-transactions list.
- "Add to goal" entry in TransactionDetailSheet for Manual goals.

Multi-SIM (Phase E)
- MpesaAccount entity captured per-subscription on SMS receive
  (SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX with legacy fallback).
- READ_PHONE_STATE permission (optional; falls back to "Line N" labels).
- Every screen-facing query is account-scoped via TransactionRepository
  composing with the selected-account flow.
- AccountSwitcherSheet on Home; AccountsScreen with rename / recolor /
  set-primary; BackfillScreen with 3-prong attribution (SMS-inbox auto,
  date range, per-transaction manual via TransactionDetailSheet).

In-app updates (Phase F + G)
- Chunked APK download with progress reporting.
- UpdateRepository state machine (Idle → Downloading → Ready → Failed).
- Full-screen UpdateScreen with parsed What's new / Fixes sections.
- "Remind me later" persists dismissed version.
- Background UpdateCheckWorker pre-fetches APK on unmetered network.
- Home banner: "available" vs "ready to install" copy variants.
- Proactive REQUEST_INSTALL_PACKAGES permission prompt with settings
  deep-link before firing the installer intent.

Parser quality
- Hustler Fund "sent KshX to NAME" amount-first phrasing now matches.
- "Give cash to AGENT" agent-deposit format recognized as DEPOSIT.
- Fuliza auto-pay recipient labels rewritten as "Fuliza overdraft
  (auto-cleared / auto-partial)" for clearer transaction lists.
- 8 new real-world regression fixtures from sanitized export.
- Audit: 0 UNKNOWN against 6,565-transaction real history (was 838).

Database
- v3 schema: mpesa_accounts, goals, goal_contributions, insights tables.
- transactions gains accountId (FK), note.
- Explicit MIGRATION_1_2 + MIGRATION_2_3.

Tests
- 65 unit tests across parser (33), rule engine (14), goal rules (8),
  update logic (8), parser audit (1), insights dry-run (1).
- Two test suites (audit, dry-run) read the local export when present,
  skip cleanly in CI.

Design spec
- LEDGA_REDESIGN.md captures the full direction + tokens + per-screen
  wireframes + phased PR plan.

versionCode 3, versionName 1.3.0.
2026-05-16 13:17:54 +03:00

Ledga

M-Pesa spending tracker for Android. Automatically reads M-Pesa SMS confirmations to track your spending — zero manual entry.

Download

Download the latest APK from Releases.

Install directly on your Android phone (no Play Store needed). The app checks for updates automatically.

Features

Automatic SMS Tracking

  • Reads M-Pesa SMS in real-time via BroadcastReceiver
  • Supports 17 transaction types: Send Money, Buy Goods, Pay Bill, Withdraw (Agent/ATM), Deposit, Received, Airtime (Self/Other), M-Pesa Global, Fuliza (Borrow/Repayment/Reversal), M-Shwari, KCB M-Pesa, Reversal
  • Import existing SMS history on first launch
  • Stores raw SMS for future parser improvements

Smart Categorization

  • 13 default categories: Groceries, Transport, Bills, Airtime, Food, Send Money, Received, Withdrawal, Deposit, Shopping, International, Savings & Loans, Other
  • Auto-categorizes by merchant name and paybill/till number
  • Pre-loaded rules for common merchants (Naivas, KPLC, Uber, etc.)
  • Tap any transaction to re-categorize

Home Dashboard

  • Current M-Pesa balance (from last transaction)
  • Monthly spending total with fees breakdown
  • Animated donut chart by category
  • Period selector: Today / This Week / Month
  • Recent transactions feed

Transactions

  • Grouped by day with search and filters
  • Filter by type: All, Sent, Received, Bills, Goods, Withdraw
  • Transaction detail bottom sheet with full info
  • One-tap re-categorization
  • Daily spending bar chart (Vico)
  • Category breakdown with color indicators
  • Top 5 merchants by spending
  • Transaction fees summary
  • Period selector: 7D / 30D / 90D / 1Y

Budget Tracking

  • Set overall monthly budget
  • Progress bars with color coding (green/warning/red)
  • Per-category budget support

Notifications

  • Daily spending summary (default 8 PM)
  • Weekly summary (Sunday evening)
  • Budget warning at 80% and exceeded at 100%
  • Large transaction alerts (configurable threshold)
  • All toggleable in settings

Backup & Export

  • Google Drive: Auto-backup to app data folder, restore on fresh install
  • Manual Export: ZIP file with transactions.csv (Excel-friendly) + data.json (full restore)
  • Manual Import: Restore from exported ZIP
  • Share exports via WhatsApp, email, Bluetooth

Self-Update

  • Checks GitHub Releases on launch (max once per day)
  • Download and install updates directly from the app

Customization

  • Theme: System / Light / Dark
  • Font size: System Default / Small / Medium / Large / Extra Large
  • M-Pesa green primary color with Material 3

Tech Stack

Component Technology
Language Kotlin
UI Jetpack Compose + Material 3
Database Room (SQLite)
DI Hilt
Settings Jetpack DataStore
Charts Vico
Background WorkManager + BroadcastReceiver
Backup Google Drive API
Navigation Navigation Compose (type-safe routes)
Build Gradle (Kotlin DSL)

Requirements

  • Android 8.0+ (API 26)
  • SMS permission (to read M-Pesa messages)
  • Notification permission (Android 13+, for summaries and alerts)

Privacy

All data stays on your device. No server, no accounts, no analytics, no tracking. Google Drive backup uses the app-specific folder — invisible to other apps and only accessible by Ledga.

Building

# Debug
./gradlew assembleDebug

# Release (requires keystore)
./gradlew assembleRelease

# Tests
./gradlew testDebugUnitTest

Release

Tag a version to trigger the CI/CD pipeline:

git tag v1.0.0
git push origin v1.0.0

GitHub Actions builds the signed APK and creates a release automatically.

License

Private — for personal/family use.

S
Description
No description provided
Readme
416 KiB
Languages
Kotlin 99.4%
Python 0.6%