Media
- Last updated
- Jun 17, 2026
- Original upload
- Jun 13, 2026
- Language
- C#
- License
- MIT
- Type
- Tool
About this project
AI-powered document review for reinsurance workflows.
Reva is a local-first, offline-by-default AI document-intelligence application for reinsurance bordereaux ingestion and reconciliation. It turns messy files, emails, spreadsheets, PDFs, scans, and visible text into structured, reviewable, export-ready data with source citations, honest confidence, learned schema mapping, and analyst corrections that persist by sender.
The shipped product is a single self-contained Reva.exe. It serves the static Next.js cockpit, REST API, OCR, reconciliation engine, and native assistant chat from one localhost origin: http://localhost:5187. No Node.js, web server, cloud OCR, or API key is required at run time.
Highlights
| Capability | What Reva does |
|---|---|
| Any-format intake | Ingests TXT, Markdown, CSV, Office files, .eml/.msg email with attachments, digital PDFs, images, scanned PDFs, and unknown binaries through a low-confidence visible-text fallback. |
| Offline OCR | Runs bundled Sdcb.PaddleOCR PP-OCR V5 models locally and records normalized boxes and polygons for citation overlays. |
| Native assistant | Streams AI-SDK UI-message SSE from /api/agent while Microsoft.Extensions.AI talks to a local Ollama OpenAI-compatible endpoint. |
| Learned schema mapping | Combines static reinsurance aliases, bounded fuzzy matching, and EF-backed sender/domain overrides learned from analyst corrections. |
| Reconciliation | Compares stated headline figures to computed table totals for money fields, cession rate, and line of business with a configurable tolerance. |
| Rossum-style review | Shows document pages beside fields; hovering a field highlights the exact cited source region and scales with zoom. |
| Export templates | Exports CSV, Excel, and JSON through saved templates, including a Lloyd's CRS template and live preview. |
| Local-first default | Keeps extraction deterministic and keyless; optional LLM-assisted extraction and optional Docling paths stay disabled unless configured. |
Architecture at a glance
flowchart TB
subgraph Runtime["Single self-contained Reva.exe · localhost-only"]
Host["src/Reva.Web<br/>Minimal API + static UI host<br/>/api + /api/agent + SPA fallback"]
UI["Next.js 16.2.9 static export<br/>React 19.2 · TypeScript · Tailwind 4<br/>served from wwwroot"]
Agent["Native assistant chat<br/>Microsoft.Extensions.AI + Ollama<br/>AI-SDK UI-message-stream SSE"]
Workflow["DocumentWorkflow<br/>parse → classify → extract → map → reconcile → review → export"]
Infra["src/Reva.Infrastructure<br/>EF Core, parser router, PaddleOCR, extractor, mapping, reconciliation"]
Core["src/Reva.Core<br/>contracts, states, canonical fields, MoneyFormatter"]
Store[("SQLite default<br/>SQL Server by config")]
end
Analyst["Analyst browser"] -->|http://localhost:5187| UI
UI -->|same-origin REST + SSE| Host
Host --> Workflow
Host --> Agent
Agent -->|4 tool-loop functions| Workflow
Workflow --> Infra
Infra --> Core
Infra --> Store
Infra --> Files["Local file storage<br/>SHA-256 hashed uploads"]
Agent -. optional local model .-> Ollama["Ollama qwen3-vl:8b<br/>http://localhost:11434/v1"]
Quick start
Windows release
- Download
Reva-v1.3.0-win-x64.zipfrom Releases. - Extract the ZIP.
- Double-click
Reva.exeorStart-Reva.cmd. - Open
http://localhost:5187and upload a reinsurance document.
Optional assistant chat:
winget install Ollama.Ollama
ollama pull qwen3-vl:8b
Reva best-effort starts ollama serve when Ollama is installed. If the model is unavailable, chat reports that clearly and the rest of the product continues to work offline.
From source
dotnet run --project src/Reva.Web/Reva.Web.csproj
For frontend development:
cd web
pnpm install
pnpm dev
Core validation:
dotnet test Reva.slnx
cd web
npx playwright test
Repository map
| Path | Owns |
|---|---|
src/Reva.Core | Domain contracts, document states, canonical reinsurance field names, and shared money formatting. |
src/Reva.Infrastructure | Persistence, storage, hashing, parsers, OCR, classification, extraction, learned mapping, reconciliation, workflow orchestration, and native agent services. |
src/Reva.Web | .NET 10 web host, REST endpoints, /api/agent, OpenAPI, static UI serving, and SPA fallback. |
web | Next.js App Router cockpit that static-exports into src/Reva.Web/wwwroot at package time. |
contracts | Review payload schema, including normalized citation geometry. |
tests | Unit, integration, host smoke, package smoke, and test index. |
docs | Architecture, pipeline, packaging, demo, and reinsurance-domain documentation. |
Documentation
| Guide | Start here when you want to... |
|---|---|
| Documentation index | Navigate the project docs. |
| Architecture | Understand the all-in-one executable, backend boundaries, API host, static UI, data model, and security posture. |
| AI pipeline | Follow parsing, OCR, extraction, schema mapping, reconciliation, assistant chat, and export flow. |
| Packaging | Build and smoke-test Reva-v1.3.0-win-x64.zip. |
| Demo script | Run a concise product walkthrough with the seeded corpus. |
| Reinsurance landscape | Review the document types, canonical fields, standards, and competitive UX patterns behind Reva. |
| Test suite | Pick the right unit, integration, E2E, Playwright, or package-smoke command. |
| Visual reference | See the current cockpit direction. |
POST /api/documentsuploads a file and starts the workflow.GET /api/documentsandGET /api/documents/{id}return queue/detail data.GET /api/documents/{id}/review-payloadreturns the schema-backed review payload.GET /api/documents/{id}/pages/{page}.pngserves renderable page images for the split view.POST /api/documents/{id}/reviewsaves field edits and mapping corrections.GET /api/documents/{id}/exportdownloads CSV, Excel, or JSON./api/templatesowns export template CRUD and duplication.POST /api/data/reseedandPOST /api/data/clearmanage demo/workspace data.POST /api/agentstreams AI-SDK UI-message-stream SSE.GET /api/agent/statusreports local Ollama/model readiness.GET /healthreports package health.
Reva's keyless path is the product default: native .NET parsers, local PaddleOCR, SQLite, deterministic extraction, learned mapping, reconciliation, review, and exports all run without a cloud account. Optional Docling and optional LLM-assisted extraction are additive configuration paths, not required runtime services.
License
MIT — see LICENSE.