Professional Project

riTara AI: Defensible AI for Mortgage QC

riTara AI (E3) is a mortgage quality-control platform powered by riTara's proprietary E3 engine: Extracted, Explained, Evidenced. I built the frontend, where teams upload loan documents, watch them process in real time, check the AI's extracted data against a configurable rules engine, and make an audit-ready decision on each loan.

Project Overview

E3 is riTara's flagship mortgage QC platform, positioned as "Defensible AI for Mortgage QC" and built for high-compliance lenders and quality-control firms. The frontend is a React 19, TypeScript, and Vite 7 single-page app with a feature-driven architecture. Loan documents upload straight to S3 through presigned URLs, processing status arrives live over WebSockets, and extracted data is checked against a rules engine. Reviewers see bounding boxes over extracted fields in a PDF viewer, validation results with confidence scores, QC reports, and an AI-assisted decision workflow for each loan.

Upload

Direct-to-S3 presigned uploads with per-file progress tracking

Extract

AI field extraction with confidence scores and PDF overlays

Validate

Configurable rules engine with severity-graded results

Decide

QC reports and AI-assisted loan disposition with audit trail

The E3 Engine: Defensible AI

riTara builds intelligence systems for high-compliance industries where accuracy, explainability, and defensibility matter most. Modern AI can extract information quickly, but often fails where trust and auditability are non-negotiable. The proprietary E3 engine is built for exactly that: every extracted value can be traced back to its source evidence.

Extracted

Unstructured loan documents are turned into structured, queryable data fields with confidence scores.

Explained

Every result carries a rationale, so reviewers understand why a value or finding was produced, not just what it is.

Evidenced

Findings are linked to source evidence with bounding-box overlays on the document, producing an audit-ready trail.

Tech Stack

React 19
TypeScript (strict)
Vite 7
TanStack Router (file-based)
TanStack Query v5
TanStack Table
TanStack Virtual
Zustand
Immer
Tailwind CSS v4
shadcn/ui
Radix UI
React Hook Form
Zod
Axios
react-pdf / PDF.js
CodeMirror 6
WebSockets
AWS S3
Biome
Vitest
React Testing Library
MSW

On-Demand Document Processing

Drag-and-drop upload with loan-program assignment and file selection

Direct-to-S3 uploads through presigned URLs, with no server relay and per-file progress

Real-time processing monitor over WebSockets with per-document and per-segment status

Exponential-backoff auto-reconnect (5 attempts) that survives dropped connections

PDF document viewer rendering pages with bounding-box overlays on extracted fields

Performance dashboard surfacing processing time, cost, and accuracy per session

Session history to revisit past on-demand processing runs

Synthesized loan record consolidating extracted data into a ULDD-format view

Rules Engine & Validation

Rulesets grouping reusable rules with a Draft → Active → Archived lifecycle

Rules catalog for browsing and managing individual validation rules

Execution plans defining which rulesets run for given conditions

Approval queue workflow for reviewing and approving rule changes

CodeMirror 6 SQL editor with Copilot-style ghost text and inline autocomplete

Backend-driven diagnostics with quick-fixes, draft autosave, and a live preview pane

Severity classification (Critical, High, Medium, Low) across rules and findings

Multi-step ruleset creation: Basics → Rules Selection → Settings → Review

Rule-by-rule validation results with pass/fail, confidence scoring, and filtering

Review, QC & Decisioning

Synced review-extraction workspace pairing the PDF viewer with an extracted-field list

Dual-mode pagination with auto-advance between forms and page-number normalization

Extracted entities displayed as data fields with per-field confidence scores

QC reports aggregating quality assessment per session and document

QC findings as individual cards with severity, description, and affected fields

Exportable QC report format for downstream review

Loan decision workflow with an AI-generated recommendation banner

Decision form (approve, deny, suspend) with a full decision audit trail

Projects, Runs & Loan Programs

Project CRUD organizing loan processing into discrete, configurable projects

Multi-step project wizard: Details → Loan Program → Rulesets → Review

Run management to start processing runs and track Draft/Active/Completed states

Per-loan extraction and validation views nested under a project run

Loan program CRUD with category-based organization and ruleset assignment

Loan program statistics dashboard (active, restricted, and total counts)

Data-heavy tables on TanStack Table with sorting, pagination, filtering, and selection

Virtualized rendering via TanStack Virtual for large document and rule lists

Architecture & Engineering

Feature-Driven Structure

  • Self-contained feature modules (api, components, hooks, types, schemas, store, table)
  • Public APIs exposed through per-feature barrel exports and a `@/` path alias
  • Shared UI in a central components library; feature UI kept local to each feature
  • Ten domain features spanning auth, processing, rules, QC, and decisioning

State Management

  • Zustand + Immer for global client state (auth, UI) with cookie-persisted sessions
  • TanStack Query for all server state with per-feature centralized query keys
  • React Hook Form + Zod for complex multi-step form state and validation
  • Query cache tuned with 5-minute stale time and 10-minute garbage collection

API & Authentication

  • Centralized Axios client with interceptors for token injection and error transforms
  • Standard ApiResponse<T> envelope with typed feature API methods and mappers
  • Token-based auth with OTP email verification and secure SameSite cookies
  • 401 intercept clears auth and redirects; 403 is logged; route guards protect the app
  • Env vars validated by Zod at startup and accessed through a typed `ENV` object

Quality & Tooling

  • Vitest + React Testing Library for unit and integration tests
  • MSW for API mocking with reusable test factories
  • Biome for linting and formatting, enforced via Husky + lint-staged pre-commit
  • Tailwind CSS v4 with semantic design tokens and shadcn/ui + CVA variants

Business Impact

Risk & Compliance

  • Reduces repurchase exposure by catching defects before loans are sold
  • Improves audit readiness with explainable, evidence-linked findings
  • Increases validation consistency across reviewers and loan files
  • Produces a defensible audit trail for regulated mortgage workflows

Operational Efficiency

  • Scales mortgage QC operations without scaling headcount
  • Lowers operational cost by automating extraction and validation
  • Real-time processing visibility replaces manual status chasing
  • Serves QC firms, aggregators, wholesale, non-QM, and bank divisions

See it in action

Explore the live platform