Phase 2: Data Sources & Shared Transactions #44
Labels
No Label
architecture
backend
bug
feature
frontend
priority:critical
priority:high
priority:low
priority:medium
priority:nice-to-have
ux
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/BillTracker#44
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add the shared foundation for imported, synced, and manual transaction data. This phase creates the tables and APIs that CSV import (Phase 3) and SimpleFIN (Phase 5) will feed into.
Depends on: Phase 1 (#43) — needs
transaction_idcolumn onpaymentstableBlocks: Phase 3 (#45), Phase 4 (#46), Phase 5 (#47)
Parent: #42
Scope
Implement
data_sourcestablefinancial_accountstabletransactionstableDo NOT implement
Database
Three new tables added via
v0.60migration:data_sources— user_id scoped, with manual seed per userfinancial_accounts— linked to data_sources, provider_account_id unique constrainttransactions— user_id scoped, source_type enum (manual/file_import/provider_sync), match_status, matched_bill_id FK to billsAll tables use
CREATE TABLE IF NOT EXISTSwith proper indexes.Backend API
Mounted in
server.js:GET /api/data-sources— list data sources with account/transaction countsGET /api/transactions— list with filters (match_status, ignored, source_type, date range, text search)POST /api/transactions/manual— create manual transaction, auto-creates manual data sourcePUT /api/transactions/:id— update transaction fieldsDELETE /api/transactions/:id— delete, nullifies linked payment.transaction_idPOST /api/transactions/:id/ignore— set ignored=1, match_status=ignoredPOST /api/transactions/:id/unignore— set ignored=0, match_status=unmatchedManual Data Source
Seed a manual data source on first run:
type: manual,provider: manual,name: Manual EntryensureManualDataSource()(user_id, type, provider)WHERE type='manual' AND provider='manual'Acceptance Criteria
Previous → Phase 1 (#43)
Next → Phase 3 (#45)