Business domains
This module documents what the application does and why, domain by domain. The architectural counterpart — how it is built — is in the architecture module.
Who owns which rule
Before reading any domain page, be clear about where a rule is enforced. The front end owns less than it appears to.
| Owner | Rules |
|---|---|
Backend (authoritative) |
Whether money can move. Balance computation, fee charging, advance repayment and recovery, remittance matching, batch settlement, permission enforcement, statement generation, KYC decisioning, all persistence and all validation that matters. |
Front end (real logic, documented here) |
Progressive-pricing arithmetic in the advance calculator (period totals, average fee, net delivery, reserve, risk-rating defaults); event-rule filter expression parsing and rendering; feature-flag layer precedence; route admission and navigation gating; form validation and cross-field rules; card provider status normalisation and Airwallex onboarding state derivation; CRM timeline normalisation; report column/query construction; supplier partial-edit orchestration. |
Front end (presentation only) |
Everything else — the app displays and submits; the backend decides. |
|
When a domain page says "the app computes X", that means the arithmetic runs in the browser and is submitted for the backend to accept or reject. It never means the browser is the system of record. |
Domain index
Supplier — the core aggregate
| Page | Scope |
|---|---|
The supplier entity and its workspace; the |
|
Onboarding templates, the services/product matrix, compliance actions and KYC document verification, marketplace account access, 2FA and SMS numbers. |
|
Initial and daily underwriting, supplier information, documentation, background reports, external report tabs, UCC filings and TransUnion, Amazon health rules, real-time validation, Marqeta KYC compliance. |
|
The offer lifecycle (request → underwrite → price → approve → re-offer), advance lines, ML offer eligibility, and the progressive-pricing calculator. |
|
Outgoing payment configurations, incoming deposit accounts, Plaid bank verification, routing-number validation, auto-payment, payment history. |
|
Funding particulars, purchase and payment fees, per-marketplace reserves and minimum-fee overrides, fee settings defaults, long-term contracts. |
|
EFS, Marqeta and Airwallex — provider discovery, card issuing, status normalisation, the Airwallex cardholder onboarding state machine. |
|
Hide, suspend, lock, cancel, write off, delete, win-back; and the global Actions menu operations (earnings/remittance loads, chargebacks, recoveries, receivables, write-offs, statement and payment adjustments, fund transfers). |
Around the supplier
| Page | Scope |
|---|---|
The marketplace catalogue, payment gateways, the supplier↔marketplace link and marketplace statements. |
|
Fund-transfer batch lifecycle, per-supplier payment details, batch downloads, pending edits. |
|
The treasury review queue, decisions and outcome reasons, review statistics. |
|
The activity timeline (notes, tasks, files, emails, events), task workflow, task filters and counters, comments, pinned notes. |
|
The email log and preview, email settings and preferences, batch email, SMS. |
|
Configuration-driven internal reports, external reports, the waiting-suppliers report, CSV export. |
|
Bulk imports and CLI actions, users and permission groups, global settings, configs, email settings, fee settings, onboarding templates, contracts, month-end close, the raw event stream. |
|
The cross-supplier underwriting queue. |
|
Runtime feature-flag switching (including for EVA) and QA tooling. |
Cross-cutting mechanisms these domains all rely on — authentication, permissions, feature flags, events, error handling — are in the platform module.
Reading a domain page
Each page follows the same structure:
-
What it is — the business purpose in plain terms.
-
Where it lives — routes, components, services, store slice.
-
How it works — the flow, with the rules the front end owns called out.
-
Business rules and constraints — statuses, validations, permission and flag gates.
-
Gotchas — the things that have caused bugs.
Every claim cites the implementing file under src/app. Where a citation and
the code disagree, the code is right and the page needs fixing.