JP Sámano

← All work

Verifaid

Who can legally sign, and within what limits? Verifaid reads corporate documents and powers of attorney, cites the exact page, and leaves approval to a second reviewer.

Role
Lead developer, LegalShelf
Period
Jul 2026 – present
Status
Controlled pilot
Verifaid
  • Interface
  • Services
  • Data and evidence
  • Human review

Case API Python / FastAPI

Authenticate the caller and enforce organization scope. Approval authority is explicitly granted instead of inferred from a request header.

Illustrated logical architecture. Select a component; animated paths show connections, not live traffic.

  • Python
  • FastAPI
  • PostgreSQL
  • Next.js
  • React
operations cleared
50+
pipeline stages
7
commits in six weeks
262
automated tests
596

Pilot figures and test baseline: 11 September 2026. Implementation reviewed through 14 September; status reviewed 20 October.

How the system connects

  • Interface
  • Services
  • Data and evidence
  • Human review

Case API Python / FastAPI

Authenticate the caller and enforce organization scope. Approval authority is explicitly granted instead of inferred from a request header.

Illustrated logical architecture. Select a component; animated paths show connections, not live traffic.

Problem

Before a lender disburses a loan, lawyers read the borrower's corporate documents to confirm that the person signing actually has the authority to sign, and up to what amount. It is slow, it depends on who reads it, and the reasoning is rarely written down in a way someone else can check.

Constraints

  • The system may recommend, but a named person must approve every conclusion.
  • Nothing may be asserted without a citation to document, version, page and excerpt.
  • Synthetic data only until a real-data gate is passed; originals are preserved untouched.
  • Each client organization's data must be isolated at the database level.

Decisions

  1. Citations before conclusions

    Every extracted fact carries its source, and the citation viewer opens the real page with the excerpt highlighted. A cited page is worth more than a confidence score.

  2. Read the law the way a lawyer does

    Signing caps are read from the clause itself, including amounts written out in words, and attorneys-in-fact are read from the appointment clause. The powers catalog follows the Civil Code.

  3. Isolation in the database, approval as a granted power

    Row-level security in PostgreSQL isolates each organization, the API authenticates the caller instead of trusting a header, and the right to approve is granted explicitly rather than inherited from a role.

Outcome

Verifaid returns a decision, not a report: whether signing can proceed, why it cannot, and who holds the authority to sign. It has cleared more than 50 operations for a paying client. In six weeks the platform went from an empty repository to a controlled pilot: a seven-stage pipeline, a citation viewer, traceable human approval where every review keeps its rationale, and a second person required to approve. Subsequent implementation added approved-opinion PDF issuance with a responsible reviewer, version and fingerprint, plus recovery of failed document readings. PDF issuance is distinct from an electronic-signing rollout; the real-data and signing gates remain explicit.

Evidence

  • 50+ operations cleared for a paying client.
  • 262 commits and 85 merged pull requests between 29 July and 11 September 2026.
  • 311 API tests (52 of them tenant-isolation tests) and 285 web tests at the last known-good run.
  • Private codebase under the client's confidentiality terms; a walkthrough is available on request.

Stack

Python · FastAPI · PostgreSQL · Next.js · React · TypeScript · Claude API · Cloudflare R2 · Render · Vercel