TOE Engineering Presentation Series/Borrower UI: Repo & Application Architecture

Signup, Application, & Portal

Borrower UI serves the entire borrower experience.

ℹ️
Public signup lives outside auth; the wizard and portal sit behind an auth guard that bridges through Cognito.

Domain Folders Own Their Slice

Each folder contains its UI, API layer, and tests.

Decisions Drive Completion, Not Screen Order

Satisfy codes determine completion — screens are always present, not conditionally rendered.

Source Files
Schemasrc/lib/decision.api.ts
Resolversrc/application/resolve-screens.ts
Screen Definitionssrc/application/screen-definitions.ts
Code Definitionssrc/application/satisfy-code-definitions.ts

Codes Map to Screens

Each satisfy code declares its screen and required fields.

Source Files
Basic Infoscreens/basic-info-screen.tsx
Propertyscreens/property-screen.tsx
Loan Detailsscreens/loan-details-screen.tsx
Employmentscreens/employment-screen.tsx
Co-Borrowerscreens/coborrower-screen.tsx
Demographicsscreens/demographics-screen.tsx
Liabilitiesscreens/liabilities-screen.tsx
Assetsscreens/assets-screen.tsx
Offerscreens/offer-screen.tsx

Two Submit Patterns, One Interface

Every screen calls the same submit handler. The renderer decides how to persist.

Post-Submit Lifecycle
Invalidate Queries
Decision + file data refresh
Advance
Next incomplete screen
Source Files
Form Defaultssrc/application/screens/form-defaults.ts
Navigationsrc/application/use-screen-navigation.ts
Handlersrc/application/stage-renderer.tsx
Endpointssrc/lib/endpoints.ts

The Renderer Decides What to Show

One component handles all three states — wizard screens, offer, and confirmation.

Wizard Screen Types
Simple Screens
Basic Info, Property, Loan Details, Demographics
Form Fields
Entity Screens
Employment, Co-Borrower, Liabilities, Assets
Repeatable Cards
ℹ️
Every screen receives the same props contract — codes, file data, completion status, and submit handler.
Source Files
Renderersrc/application/stage-renderer.tsx
Indicatorsrc/application/stage-indicator.tsx
Propssrc/application/application.schema.ts
Offersrc/application/screens/offer-screen.tsx
Confirmationsrc/application/screens/submitted-screen.tsx
Cardsrc/application/repeatable-card.tsx
Card Listsrc/application/repeatable-card-list.tsx

From Rigid Rules to Flexible Codes

Three phases, each further decoupling screens from the decision engine.

Source Files
1:many modelsrc/application/satisfy-code-definitions.ts
Screen arraysrc/application/screen-definitions.ts
Completionsrc/application/resolve-screens.ts

Codes Drive Completion, Screens Stay Fixed

Three principles behind the Borrower UI application wizard.

Navigation

Keyboard Shortcuts

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