DEVELOPER DOCUMENTATION

Inside Veridict.

A local-first legal document system with an independent static demonstration.

Operating editions

The Concept Edition runs the shared rules, retrieval, comparison and workflow engines inside the browser using a synthetic workspace. It accepts no uploads and has no server API. Demo changes last for the open tab.

The local edition uses a loopback-only Node.js server and SQLite. Each request authenticates a session and resolves membership and role before operating on workspace records. Original bytes and their SHA-256 digests are stored alongside extraction metadata.

Evidence pipeline

  1. Validate file signature, size and media type.
  2. Extract text in a bounded worker and preserve page or paragraph references where available.
  3. Segment clauses, inspect them with published policy rules and record human decisions.
  4. Export source passages, extraction quality, policy version and review history together.

REST API

Available from the local edition with an active session. The API accepts an HTTP-only browser cookie or a bearer token. Cookie-authenticated writes require X-Veridict-Request: 1.

POST /api/v1/auth/login
GET  /api/v1/workspaces/{id}/state
POST /api/v1/workspaces/{id}/documents
GET  /api/v1/workspaces/{id}/search?q=renewal
POST /api/v1/workspaces/{id}/actions/review.run
GET  /api/v1/workspaces/{id}/reports/{reviewId}.txt

Errors return a stable code and message in an error object. The source repository contains the full API and deployment runbooks.

Webhooks

The local workflow engine can post signed event metadata to an operator-configured destination. Subscribers can use the delivery ID for deduplication and verify HMAC-SHA256(timestamp + "." + raw_body) before acting.

Concept limitations

Synthetic documents illustrate policy verification. Real contractual interpretation requires review against the original. Public retrieval uses keyword ranking and a small, curated synonym index. Optional embedding search and cited extraction with Ollama are local capabilities.