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

Suppliers

The supplier entity and its workspace; the supplier store slice; the part-by-part editing mechanism that all supplier tabs share.

Onboarding and KYC

Onboarding templates, the services/product matrix, compliance actions and KYC document verification, marketplace account access, 2FA and SMS numbers.

Underwriting

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.

Advances and offers

The offer lifecycle (request → underwrite → price → approve → re-offer), advance lines, ML offer eligibility, and the progressive-pricing calculator.

Supplier payments and deposit accounts

Outgoing payment configurations, incoming deposit accounts, Plaid bank verification, routing-number validation, auto-payment, payment history.

Fees, reserves and contracts

Funding particulars, purchase and payment fees, per-marketplace reserves and minimum-fee overrides, fee settings defaults, long-term contracts.

Card programmes

EFS, Marqeta and Airwallex — provider discovery, card issuing, status normalisation, the Airwallex cardholder onboarding state machine.

Lifecycle actions and transactions

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

Marketplaces and gateways

The marketplace catalogue, payment gateways, the supplier↔marketplace link and marketplace statements.

Payment processes and batches

Fund-transfer batch lifecycle, per-supplier payment details, batch downloads, pending edits.

Balance approval

The treasury review queue, decisions and outcome reasons, review statistics.

CRM tools and tasks

The activity timeline (notes, tasks, files, emails, events), task workflow, task filters and counters, comments, pinned notes.

Emails and messaging

The email log and preview, email settings and preferences, batch email, SMS.

Reports

Configuration-driven internal reports, external reports, the waiting-suppliers report, CSV export.

Manage

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.

Underwriting tracker

The cross-supplier underwriting queue.

DEV Admin

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:

  1. What it is — the business purpose in plain terms.

  2. Where it lives — routes, components, services, store slice.

  3. How it works — the flow, with the rules the front end owns called out.

  4. Business rules and constraints — statuses, validations, permission and flag gates.

  5. 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.