WORK IN PROGRESSDraft docs — content and examples are still being refined.
Information model

Entities & the security chain

Every entity is a flat, top-level array on State, linked to the others only by id. This section shows the entity families and the one relationship worth learning first: how a loan is secured in a home without ever pointing at it directly.

The one relationship to understand first

A loan is secured in a home — but never points at it directly

Four entities form a chain, so the same collateral can back several loans and one loan can be secured by several objects. The deed is the knot in the middle — read outward from it. Hover a link to see the two fields it joins.

Mortgage loan
agreementKind: LOAN
id loan-1
loanAmount 2 400 000 SEK
state.financing[]
← SECURES
Mortgage deed
agreementKind: MORTGAGE_DEED
collateralCoverages[].id → loan-1
collateralObjects[].collateralObjectId → co-1
…mortgageDeedDetails.faceValue 2 400 000 SEK
state.collateralAgreements[]
COVERS →
Collateral object
agreementKind: COLLATERAL_OBJECT
id co-1
collateralObjectDetails.assetId → asset-1
state.collateralObjects[]
REFERENCES →
The home
assetKind: REAL_ESTATE
id asset-1
address Storgatan 12
state.assets[]
WHERE PEOPLE FIT IN  DEBTOR / CODEBTOR → the loan accountRoles[].partyId  MORTGAGOR → the deed mortgagors[].partyId  OWNER → the home owners[].partyId