Reva

AI-powered document review for reinsurance workflows.

MIT·C#·ai / blazor / document-ai
1
Stars
0
Forks

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.

Report
Description

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

CapabilityWhat Reva does
Any-format intakeIngests 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 OCRRuns bundled Sdcb.PaddleOCR PP-OCR V5 models locally and records normalized boxes and polygons for citation overlays.
Native assistantStreams AI-SDK UI-message SSE from /api/agent while Microsoft.Extensions.AI talks to a local Ollama OpenAI-compatible endpoint.
Learned schema mappingCombines static reinsurance aliases, bounded fuzzy matching, and EF-backed sender/domain overrides learned from analyst corrections.
ReconciliationCompares stated headline figures to computed table totals for money fields, cession rate, and line of business with a configurable tolerance.
Rossum-style reviewShows document pages beside fields; hovering a field highlights the exact cited source region and scales with zoom.
Export templatesExports CSV, Excel, and JSON through saved templates, including a Lloyd's CRS template and live preview.
Local-first defaultKeeps 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

  1. Download Reva-v1.3.0-win-x64.zip from Releases.
  2. Extract the ZIP.
  3. Double-click Reva.exe or Start-Reva.cmd.
  4. Open http://localhost:5187 and 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

PathOwns
src/Reva.CoreDomain contracts, document states, canonical reinsurance field names, and shared money formatting.
src/Reva.InfrastructurePersistence, 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.
webNext.js App Router cockpit that static-exports into src/Reva.Web/wwwroot at package time.
contractsReview payload schema, including normalized citation geometry.
testsUnit, integration, host smoke, package smoke, and test index.
docsArchitecture, pipeline, packaging, demo, and reinsurance-domain documentation.

Documentation

GuideStart here when you want to...
Documentation indexNavigate the project docs.
ArchitectureUnderstand the all-in-one executable, backend boundaries, API host, static UI, data model, and security posture.
AI pipelineFollow parsing, OCR, extraction, schema mapping, reconciliation, assistant chat, and export flow.
PackagingBuild and smoke-test Reva-v1.3.0-win-x64.zip.
Demo scriptRun a concise product walkthrough with the seeded corpus.
Reinsurance landscapeReview the document types, canonical fields, standards, and competitive UX patterns behind Reva.
Test suitePick the right unit, integration, E2E, Playwright, or package-smoke command.
Visual referenceSee the current cockpit direction.
  • POST /api/documents uploads a file and starts the workflow.
  • GET /api/documents and GET /api/documents/{id} return queue/detail data.
  • GET /api/documents/{id}/review-payload returns the schema-backed review payload.
  • GET /api/documents/{id}/pages/{page}.png serves renderable page images for the split view.
  • POST /api/documents/{id}/review saves field edits and mapping corrections.
  • GET /api/documents/{id}/export downloads CSV, Excel, or JSON.
  • /api/templates owns export template CRUD and duplication.
  • POST /api/data/reseed and POST /api/data/clear manage demo/workspace data.
  • POST /api/agent streams AI-SDK UI-message-stream SSE.
  • GET /api/agent/status reports local Ollama/model readiness.
  • GET /health reports 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.