The Lender's Workspace for Working the File

Cortex covers the loan lifecycle from evaluate through review to fund.

ℹ️
Frontend mounted on Marketplace
Mount pointsrc/file/left-nav.tsx
App entrysrc/main.tsx
⚠️
Cortex is dead. The cortex-lender-checker-ui repo will be renamed soon — the patterns and architecture here still apply, but the branding is going away.

Fast Track Renders Decisions as an Interactive Checklist

The decision engine's output becomes a navigable hierarchy of stages, categories, and rules.

ℹ️
Each rule can trigger an action — order a vendor report, open an editing drawer, or link to a pending task.
Source Files
Schemasrc/lib/decision.query.ts
Stage trackersrc/file/summary/check-list-stage-tracker.tsx
CheckListsrc/file/summary/check-list.tsx

Bounded Domains Keep Each Concern Isolated

No cross-domain imports except through the shared API layer.

ℹ️
Everything lives under one file ID — all three views (Summary, Tasks, Funding) share the same loan context.
Source Files
Layout shellsrc/file/index.tsx
Summarysrc/file/summary/
Borrower Taskssrc/file/borrower-tasks/
Fundingsrc/file/funding-disbursement/
Productssrc/orders/products/
Taskssrc/orders/tasks/
UI componentssrc/ui/
API layersrc/lib/
Routessrc/routes/

Every Rule Gets a Dedicated Component

Rules should map to data groups, not individual fields — but the legacy API currently maps 1:1.

Adaptive Polling
⚠️
Legacy constraint: The current API maps each rule to a single field. A refactor is planned to align with the group-based model shown above.

Rule Cards Are Actionable, Not Just Informational

Inline edits and orders trigger live decision refreshes.

What Can a Rule Card Do?
Data Drawers
Edit income, liabilities, and liens with row-level forms
Order Placement
Trigger vendor reports directly from a rule card
Lender-Only Fields
Extra fields visible only to lenders — never exposed to borrowers
ℹ️
Edits cascade: entity data persists, then decisions recalculate — the UI picks up changes on the next action or poll cycle.
Source Files
DTI drawersrc/file/summary/rules/dti-drawer/
Lien drawersrc/file/summary/rules/lien-drawer/
Order mutationsrc/lib/place-order.mutation.ts

Lenders Request, Borrowers Upload, Lenders Approve

The borrower tasks view connects lender orders to borrower fulfillment.

Specialized Task Types
Property Inspection
Photos, checklist, and final report
Identity Verification
Document extraction and comparison
Income Documents
Parsed data with issue flagging
Liability Payments
Payment approval tied to funding
Source Files
Tasks querysrc/lib/borrower-tasks-list.query.ts
Endpointssrc/lib/endpoints.ts
Property Inspectionorders/tasks/instant-pcr/
Identity Verificationorders/tasks/government-id/
Income Documentsorders/tasks/income-docs.tsx
Liability Paymentsorders/tasks/liability-payment/

Two Paths to Disburse

Institutional setup determines whether the lender or borrower drives the closing workflow.

Source Files
Core pathsrc/file/funding-disbursement/core/
Method pathsrc/file/funding-disbursement/method/
Status hooksrc/file/funding-disbursement/use-disbursement.ts
Endpointssrc/lib/endpoints.ts
⚠️
Disbursement is irreversible — both paths require explicit confirmation before funds transfer.

The Feedback Loop That Drives the Loan

The Lender UI and Borrower UI share one API, split by audience.

Source Files
Auth querysrc/routes/__root.tsx
Nav routessrc/file/left-nav.tsx
Role guard (PCR)orders/tasks/instant-pcr/index.tsx
Role guard (Income)orders/tasks/income-docs.tsx
⚠️
Security boundary: Lender UI schemas include lender-only fields that must never appear in the borrower UI — always strip when adapting patterns.

The Lender UI Is a Live View of the Decision Engine

Three principles that define the lender's workspace.

Navigation

Keyboard Shortcuts

→ / Space
Next slide
Previous slide
Home / End
First / last slide
F
Toggle fullscreen
?
Toggle this help
Esc
Close help
Comments