What is the Finance MVP? #59
Notifications
Due Date
No due date set.
Depends on
Reference: bobby/hapi#59
Reference in new issue
Block a user
Part of #44
Question
What does the finance domain need at MVP: core entities (accounts, transactions, categories, budgets?), the first endpoints/flows, how data gets in (manual, import, bank feed later), and what is explicitly deferred?
Resolution: Finance MVP
Finance in v1 is a ledger plus a zero-based Budget per owner, filled by importer Bots through an idempotent ingest endpoint. It replaces the Owner's hand-filled spreadsheet. Terms are in
GLOSSARY.md→ Finance.Ownership (ADR-0001 / ADR-0005 applied)
tracked_untilon the Personal Account and archive it, then create a new Household Account withtracked_fromon the same date. History stays where it was spent. The two Accounts aren't linked, so the Household never sees a reference to Personal data.Entities
checking|savings|credit_card|cash; institution; currency; owner;tracked_from/tracked_until; archived. No balances in v1.amount_minor(signed integer cents, negative = money out);occurred_on(purchase date, required; the importer falls back to the posted date if the source lacks one);posted_on(optional); raw payee + normalized payee;external_id(unique per Account, absent for manual entries); Category;categorized_by=manual|learned; note;dismissed;recorded_by. Posted only: no pending Transactions.expense|income|transfer; owner; archived. Lifecycle: create, rename, archive, merge (A's Transactions, Payee mappings and Targets move to B, then A is archived) and promote. No hard delete of a Category that is in use.monthly|quarterly|annual, effective from a month. Old Targets are kept so past months recompute correctly. A period longer than a month makes the Category Banked for that Budget, and a Banked Target takes an optional opening banked balance.recorded_by.Budget behaviour
occurred_on. Months are never locked: summaries are recomputed on read, so late posts land in the right month. The summary also shows expected vs actual income.expenseCategory reduces that Category's spending. That covers refunds and reimbursements: if joint pays you back for groceries, the joint outflow is Household Groceries and your inflow is Personal Groceries.transferTransactions (e.g. a card payoff) are excluded from spending and Budgets.Getting data in
POST /v1/finance/transactions/ingesttakes{financial_account_id, transactions: [{external_id, amount_minor, occurred_on, posted_on?, payee_raw}]}in bounded batches. Each item reportscreated | duplicate | dismissed | outside_tracked_window. A knownexternal_idis ignored, never updated, so a re-import never overwrites edits. Transactions outside the Account's tracked window are dropped.finance:writefor joint Accounts, a Person's Binding for Personal ones. hAPI holds no bank credentials. Accepted limitation: a domain Scope also lets the Bot read and change Budgets. Finer Finance Scopes are a v2 priority.external_id) are read-only, so only Category and note change. Deleting one dismisses it: it's hidden from Budgets, and itsexternal_idis kept so a re-import doesn't bring it back.API surface (flat,
/v1/finance/...,owner+recorded_byon every record)accounts: CRUD, archive.transactions: list (filters: account, owner, month, Category, uncategorized,categorized_by), manual create, patch, delete/dismiss;transactions/ingest.categories: CRUD, archive,/{id}/merge,/{id}/promote.payee-mappings: list, delete.budgets: one per owner, expected income;budgets/{id}/targets;budgets/{id}/moves;budgets/{id}/months/{YYYY-MM}(summary: per-Category Allocation, spent, remaining, banked balance; unassigned; expected vs actual income; rebalance hint).Deferred past v1
Splits; balances and net worth (later: investments, home and mortgage), with transfer-leg linking arriving alongside it for reconciliation; ML categorization (would sit below Payee mappings); a hand-written rule editor; pending Transactions; bill-due reminders (Scheduling fog); an aggregator running inside hAPI; finer Finance Scopes (v2 priority). Multi-currency is out of scope (USD only, never expected).
Amended by Which importer Bots ship in v1, and where do they run? (#67):
occurred_onis now the best-known date, editable on imported Transactions withinposted_on − 31 d … posted_on. There's a newdated_by(source|posted|manual),occurred_onis optional on ingest, and adate_reviewflag covers posted-date rows from days 1–5 of a month. See the resolution on #67.