Skip to content

The lending lifecycle

Module id: lending

From the application to servicing, collateral, and collections. Credit policy stays with the institution.

Scoring and bureau calls are risk. This module holds the loan case and the product-line records.

Lending, read top to bottom: journeys, applications and servicing, core records, then product lines
Read top to bottom. The channel starts a lending journey. Domain services run applications and servicing. The core stores those records, collateral, and collections. Product lines specialise the agreement.

exp-lending is the channel. Origination and servicing each have a domain service and a core service. Collateral and collections are core only. Several product lines have a core and no matching domain repository. That gap is listed below, not drawn as a box.

What it owns

  • Applications, offers, parties on an application, and decisions
  • Servicing cases, schedules, balances, disbursements, and accruals
  • Collateral cases, assets, valuations, and liens
  • Collection cases, actions, and promises
  • Product-line agreements: personal loans, mortgages, asset finance, credit cards, supply chain

What it does not own

  • The party. That is customers.
  • The product definition. That is products.
  • Scoring cases, provisioning, and reporting submissions. Those are risk.
  • Payment rails. Those are payments.
  • Credit policy. That stays with the institution.

Repositories

Journey, origination, servicing, collateral, collections

Repository Layer What it holds OpenAPI
exp-lending Experience Personal-loan experience at /api/v1/experience/lending openapi.yml
domain-lending-loan-origination Domain Applications and simulations openapi.yml
core-lending-loan-origination Core Applications, parties, verifications, decisions openapi.yml
domain-lending-loan-servicing Domain Servicing commands and queries openapi.yml
core-lending-loan-servicing Core Cases, schedules, balances, disbursements, accruals openapi.yml
core-lending-collateral-management Core Collateral cases, assets, valuations, liens openapi.yml
core-lending-delinquency-collections Core Collection cases, actions, promises, escalations openapi.yml

Product lines

Repository Layer What it holds OpenAPI
domain-lending-personal-loans Domain Personal-loan agreements openapi.yml
core-lending-personal-loans Core Personal-loan agreements openapi.yml
domain-lending-asset-finance Domain Asset-finance agreements openapi.yml
core-lending-asset-finance Core Asset-finance agreements, assets, usage openapi.yml
core-lending-mortgage Core Mortgage agreements. The SDK folder is core-lending-mortgages-sdk. openapi.yml
core-lending-credit-cards Core Revolving lines, statements, billing cycles openapi.yml
core-lending-supply-chain-finance Core Agreements, invoices, advances, settlements openapi.yml

No domain-lending-mortgage, domain-lending-credit-cards, or domain-lending-supply-chain-finance is on disk.

firefly-lending publishes a mock OpenAPI at openapi/lending.v1.yaml. The OpenAPI index marks it as a sample. It is not the module contract.

How the pieces fit

exp-lending is the channel for the personal-loan experience. It does not persist the application.

Origination: domain-lending-loan-origination coordinates applications and simulations. core-lending-loan-origination stores the application, its parties, verifications, fees, and decisions.

Servicing: domain-lending-loan-servicing exposes servicing commands and queries. core-lending-loan-servicing stores the case, schedule, instalments, balances, disbursements, accruals, and restructurings.

Collateral and collections are core records without a domain repository in this inventory. Product-line services hold the specialised agreement. Where a domain repository is missing, do not invent one.

Scoring requests go to risk. Bureau toolkits stay behind adapters.