-
-
Notifications
You must be signed in to change notification settings - Fork 5
Developer Guide
XPENC is open source (MIT) and welcomes contributions. This page is a quick orientation; the authoritative documents live in the repo.
Read first:
structure.md— the full design doc: mental model, data model, every decision and why it was made, plus an adversarial audit that hardened the app's invariants.
| Concern | Choice |
|---|---|
| Framework | Flutter 3.38.9 · Dart 3.10.8 |
| State | Riverpod |
| Database | Drift (SQLite), local-first, reactive queries |
| Routing | go_router |
| Charts | fl_chart |
| Notifications | flutter_local_notifications + timezone |
drift/drift_dev/
drift_flutter/sqlite3_flutter_libs at 2.31.0/0.2.8/0.5.24, and
flutter_riverpod at 2.6.1. drift ≥ 2.32 silently drops libsqlite3.so
from Android release builds — a real crash that once shipped. riverpod
3.x forces a Dart SDK too new for drift_dev here. Don't bump these
without reading the "Pinned dependencies" section of
CONTRIBUTING.md.
lib/
core/ theme, Money type, branding, notifications
data/ drift database, tables, DAOs, seed data
domain/ entities, repository interfaces
features/ one folder per screen (dashboard, transactions, budgets, …)
website/ landing page (Vercel)
tool/ icon generator, APK verification gate
.github/ CI + release workflows, issue & PR templates
docs/ releasing / maintainer docs
git clone https://github.com/PATILYASHH/XPENC.git
cd XPENC
flutter pub get
flutter runrm -rf build/native_assets # Windows only: Flutter native-assets bug
flutter analyze
flutter testWidget tests render every screen against a real in-memory database at a
real phone size (360 × 800 dp) and fail on layout overflows — catching what
flutter analyze can't. test/branding_test.dart fails the build if
AppInfo.version ever drifts from the version: line in pubspec.yaml.
flutter build apk --release --split-per-abi
bash tool/verify_apk.sh build/app/outputs/flutter-apk/app-arm64-v8a-release.apkverify_apk.sh must pass — it's the only check that catches a release
APK shipping with no libsqlite3.so, a failure no unit test can see
because every test overrides the database with an in-memory one.
After changing any table in lib/data/tables.dart:
dart run build_runner build --force-jit --delete-conflicting-outputs--force-jit is required — without it, build_runner fails with 'dart compile' does not support build hooks on this SDK.
- Edit
lib/data/tables.dart. - Bump
schemaVersioninlib/data/database.dart. - Add the
onUpgrademigration step. - Regenerate (above).
- Verify old backups still restore —
importAllskips unknown columns; add a test.
Not preferences — most are guarded by tests, and PRs that break them won't be merged:
-
Amounts are integer paise/cents. Never
double.₹12.50is stored as1250. - Net worth = Σ account balances. Transfers keep it unchanged; income raises it; expense lowers it.
- Transfers and person (due/owe) movements are neither income nor expense — they must never appear in budgets or income/expense reports.
- Debit cards & UPI are linked instruments, not accounts. They spend their bank's money and hold no balance of their own, or rupees get counted twice.
- Auto-Approve only fires from a learned rule (exact match), never a fresh guess — and Undo must reverse the posted transaction, not just hide the card.
- Nothing auto-posts silently. Cash Reminders and recurring rules always confirm with, or flag for review by, the user.
- SMS never leaves the device. All parsing is on-device, no network calls.
| You want to… | Start here |
|---|---|
| Report a bug | Bug report |
| Request a feature | Feature request |
| Add SMS support for your bank ⭐ | Bank support request — the most valuable "good first issue" |
| Improve docs / website | PRs welcome, no issue needed |
| Fix a bug / build a feature | Comment on the issue first so work isn't duplicated |
PR checklist, commit conventions and the full "adding a bank SMS template"
walkthrough are in
CONTRIBUTING.md.
Releases are cut by maintainers pushing a v* tag — see
docs/RELEASING.md.
Participation is governed by the
Code of Conduct.
- Features — what the app does today
- Roadmap — what's planned or in progress
- Privacy & Security
Using XPENC
Project
Elsewhere