Skip to content
VSValter Silva
Back to projects
Working MVPAcademic project2026

Jurimetria AI

Capstone project: a system for tracking court cases that uses AI to extract structured summaries from rulings and feed a jurimetrics dashboard.

Problem

Law firms and legal departments need to track cases and understand historical outcomes by court, district, judge and type of claim — information that lives inside the text of the rulings.

Solution

Case, party and claim management; ruling text sent for AI analysis with structured output; and a jurimetrics dashboard computed by the database. Core principle: the AI reads one document at a time and never computes statistics.

Architecture

  • React + Vite frontend → Node.js/Express API → PostgreSQL. The AI key exists only on the backend.
  • Layered backend (routes → controllers → services → repositories) plus an isolated AI layer, which made it possible to switch providers without touching controllers or services.
  • Asynchronous analysis: the record is created as Pending before the external call, the API answers 202 and the frontend polls the status.
  • Structured Outputs with a Zod schema, validated again on the backend before persisting.

Key features

  • CRUD for cases, parties, claims, rulings and appellate decisions, plus supporting catalogs (courts, districts, judges).
  • PDF and DOCX ruling upload with text extraction.
  • Anonymization (LGPD) of CPF, CNPJ, email, phone, postal code, ID and banking data before anything is sent to the AI.
  • Jurimetrics dashboard by judge, by claim and by court.

Technical challenges

  • No ruling is left without a recorded analysis: if the AI call fails, the status becomes Error with a log and the user can retry.
  • Separating semantic reading (AI) from aggregation (SQL), so the numbers are always descriptive, auditable statistics.
  • Automated tests with node:test that never call the real API or require a running database.