Data model
The whole plan is one coherent object (in cloud mode stored as a single jsonb
record per household). The key pieces:
Portfolio positionsā
Investments and debt (a loan). Each position has, among other things: current value, target contribution, rate (interest/return), goal, instalment/term/maturity date, and its pillar.
Off-portfolio assetsā
Real estate, land, cash, vehicles ā a value and an optional appreciation rate.
Goalsā
Larger expenses with an amount, a deadline and saving progress.
Monthly entriesā
Per month: income (per person), contributions/overpayments split by person (the sum feeds the calculations), a savings budget, loan instalment, cost-of-living rating, a note, a marker for "who in the household did the review", and how much has already been applied to portfolio value (so applying is incremental, never double-counted).
Pillars (IāV)ā
Grouping of positions: Retirement, Investments, Loan, Bonds, Bitcoin ā with a configurable display order.
Profile and preferencesā
- Plan profile (shared in Duo): names, country, birth date, main goal.
- Device preferences (NOT synced): language, theme, role in the plan.
Net-worth snapshotsā
A lightweight record of net worth per month ā it powers the wealth trend (30 days / 12 months).
Every read and write of the data goes through validation (Zod) ā see Security.