Logo Lanfrica

Cliffshiz/mpesa-ai-tracker

Domain:

digital infrastructure

Record type:

software
Creator:
Cli
Host:
# M-Pesa AI Tracker — Starter Build Privacy-first personal finance tracker that reads M-Pesa SMS on-device, parses and categorizes transactions with local AI, and never sends raw data to a server unless the user opts in. ## What's included (working core) - `lib/models/transaction.dart` — data model + Hive type adapters - `lib/services/sms_parser_service.dart` — regex parser for all major M-Pesa SMS formats (received, sent, paybill, buy goods, withdraw, deposit, airtime, Fuliza, reversal) - `lib/services/categorization_service.dart` — local keyword-based categorizer + optional cloud LLM fallback + anomaly (z-score) detection - `lib/services/database_service.dart` — AES-256 encrypted Hive storage, key held in Android Keystore via `flutter_secure_storage` - `lib/services/background_sms_service.dart` — WorkManager periodic scan + live SMS listener - `lib/providers/transaction_provider.dart` — Riverpod state - `lib/screens/dashboard_screen.dart` — dashboard UI with balance card, category pie chart, recent transactions ## Not yet built (roadmap) - Onboarding/permission-explainer flow - Budgets + alerts screen - Full transaction history with search/filter - PDF/CSV export (packages already in pubspec: `pdf`, `csv`, `share_plus`) - Receipt OCR linking (package included: `google_mlkit_text_recognition`) - Biometric lock screen (`local_auth` included) - Multi-account switcher UI - Goals feature - Cash-flow forecast model Each of these is additive — the parser/DB/provider layer already supports them (e.g. `accountLabel` field is already on the model for multi-SIM). ## Setup ```bash flutter create --org com.yourcompany mpesa_ai_tracker_shell # copy lib/ and pubspec.yaml from this project into the shell cd mpesa_ai_tracker_shell flutter pub get flutter pub run build_runner build --delete-conflicting-outputs # generates .g.dart files ``` ### Android permissions (`android/app/src/main/AndroidManifest.xml`) ```xml ``` Request `READ_SMS`/`RECEIVE_SMS` **at runtime** …