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 a category (categoryId).
Optionally: account kind (accountKind โ IKE/IKZE/PPK/PPE/OIPE/standard/bank,
a tax wrapper), instrument (instrumentType โ ETF/stocks/bonds/โฆ), a JDG
flag (higher IKZE limit), ticker/ISIN/target allocation, owner and beneficiary.
The fields are backward-compatible โ no account kind = behaviour as before.
Off-portfolio assetsโ
Real estate, land, cash, vehicles โ a value and an optional growth rate. Each
asset has a class (assetClass): cash (cash/savings), real_estate
(property; realEstateUsage: primary/rental/land) or physical_asset (tangible:
physicalKind car/equipment/collection). No class โ it is inferred (cash by name,
otherwise real estate), so older data works without migration. The
includeInInvestable / liquid flags drive the wealth lenses (defaults based on
class), while growth describes the behaviour in the projection (see
How we calculate).
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).
Categoriesโ
User-defined grouping of positions (categories: Category[] in the state). Each
category has an id, a name, a colour (from the palette) and an optional emoji;
its order in the list = the display order. The default set is Retirement,
Investments, Loan, Bonds, Crypto โ but you can freely rename, add and remove
them (Settings โ Categories). Migration from the old "pillars" model (the fixed
IโV) maps them onto categories with fixed ids (Bitcoin โ Crypto), without losing
any position assignments.
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.