Implement bankstatement, export, and data interactors (#4) #16

Merged
admin merged 1 commits from feat/4-implement-bankstatement-export-data into main 2026-06-28 10:42:01 +00:00
Owner

Summary

  • Add BankStatementImporter interface and 3 stub implementations (BRI / Jago / BNI) returning NotImplementedError
  • Add ExportExpensesToCsv interactor that writes a UTF-8 BOM CSV via Okio with ISO 8601 dates and double-quoted notes
  • Add ClearAllData interactor that wipes all Room tables inside withTransaction
  • Add PDFBoxResourceLoader.init(this) to MainApplication.onCreate and register all new interactors in DomainModule (incl. the List<BankStatementImporter> aggregate)

Test plan

  • ./gradlew assembleDebug succeeds in the worktree
  • 3 bank importer stubs return NotImplementedError failure as specified
  • ExportExpensesToCsv opens the SAF OutputStream, writes the BOM via \uFEFF, writes the Date,Category,Amount,Note header, and one CSV row per expense with LocalDate.toString() (ISO 8601)
  • ClearAllData calls database.withTransaction { database.clearAllTables() } (no re-seed; SettingsScreen will re-run SeedDefaultCategories afterwards)
  • MainApplication.onCreate invokes PDFBoxResourceLoader.init(this) before startKoin
  • DomainModule provides the 3 named bank importers, the List<BankStatementImporter> aggregate, ExportExpensesToCsv, and ClearAllData

Closes #4

## Summary - Add `BankStatementImporter` interface and 3 stub implementations (BRI / Jago / BNI) returning `NotImplementedError` - Add `ExportExpensesToCsv` interactor that writes a UTF-8 BOM CSV via Okio with ISO 8601 dates and double-quoted notes - Add `ClearAllData` interactor that wipes all Room tables inside `withTransaction` - Add `PDFBoxResourceLoader.init(this)` to `MainApplication.onCreate` and register all new interactors in `DomainModule` (incl. the `List<BankStatementImporter>` aggregate) ## Test plan - [x] `./gradlew assembleDebug` succeeds in the worktree - [x] 3 bank importer stubs return `NotImplementedError` failure as specified - [x] `ExportExpensesToCsv` opens the SAF `OutputStream`, writes the BOM via `\uFEFF`, writes the `Date,Category,Amount,Note` header, and one CSV row per expense with `LocalDate.toString()` (ISO 8601) - [x] `ClearAllData` calls `database.withTransaction { database.clearAllTables() }` (no re-seed; `SettingsScreen` will re-run `SeedDefaultCategories` afterwards) - [x] `MainApplication.onCreate` invokes `PDFBoxResourceLoader.init(this)` before `startKoin` - [x] `DomainModule` provides the 3 named bank importers, the `List<BankStatementImporter>` aggregate, `ExportExpensesToCsv`, and `ClearAllData` Closes #4
admin added 1 commit 2026-06-28 10:37:17 +00:00
admin merged commit 36deb46a28 into main 2026-06-28 10:42:01 +00:00
admin deleted branch feat/4-implement-bankstatement-export-data 2026-06-28 15:02:10 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/ledgerr#16