Inspiration
Procurement, privacy, legal ops, and vendor-risk teams review the same high-impact clauses over and over liability, security, privacy, retention, breach notice, governing law, renewal, termination, indemnity, subprocessors, audit rights, service levels. Generic AI summaries make review faster but don't create a defensible decision. Teams still need exact source evidence, a named accountable reviewer, conflict-safe collaboration, and a record that can be verified independently later.
What it does
Proofline validates and fingerprints an uploaded agreement, extracts page-aware document elements, and evaluates a semantic-versioned policy pack. Deterministic checks create review candidates only when they can cite real source text and coordinates never a generated summary. A reviewer opens a finding beside the original document, jumps to the precise region, compares the source against the policy requirement, and confirms, dismisses, amends, reassigns, or reopens it with a mandatory rationale.
How I built it
Proofline is a modular Node.js monolith with a responsive vanilla web client and SQLite for relational transactions, migrations, and durable single-instance state. Documents live on a filesystem adapter locally and an S3-compatible adapter in production. Authentication uses scrypt-hashed passwords, signed opaque HttpOnly sessions, CSRF tokens, role checks, and organization-scoped queries.
Document extraction is spatial and page-aware: Nutrient DWS's Data Extraction API (/extraction/parse, structure mode with spatial + word output and automatic OCR language detection) is the live provider. A free, fully local fallback mode covers the same ground without any paid API PDF.js for PDFs, mammoth for DOCX text, and tesseract.js OCR (with real per-word bounding boxes and confidence) for images — and is visibly labeled as local, never presented as Nutrient provenance.
The deterministic policy engine keeps extraction confidence separate from analysis confidence and exposes its risk-score formula. The in-app PDF.js viewer scales provider render-space coordinates onto the rendered page, including a highlight overlay for both PDF and image sources. Canonical event hashing plus database append-only triggers protect workflow history, and Ed25519 signs the completed manifest.
Challenges we ran into
The hardest boundary was preserving the difference between an extraction signal and a supported decision. Nutrient confidence is a relative source signal, not a probability, so Proofline shows it separately and treats missing confidence as "not scored." Deterministic policy matching produces a review candidate, not a legal conclusion.
I also found a real concurrency bug the hard way: finding IDs were derived only from a hash of the rule, page, and excerpt with no review ID in the hash while the findings table's primary key is global, not scoped per review. Processing the same document twice (exactly what a demo "process sample" button encourages) produced identical finding IDs across two different reviews and crashed with a primary-key collision. Fixing it meant threading the review ID into the identity hash so IDs stay unique per review while remaining deterministic within one review's analysis run.
Accomplishments that we're proud of
A real, working pipeline end to end: upload → fingerprint → spatial extraction → deterministic policy analysis → in-source human review → completion gate → signed, independently verifiable evidence not a mockup. A genuinely free local extraction path (PDF, DOCX, and OCR'd images) so the product works without anyone paying for a document API. An append-only, hash-chained audit log and Ed25519-signed evidence package with a standalone verification CLI that doesn't trust the server. A full automated test suite unit, provider-contract, API, security, concurrency, and a real headless-Chrome browser test that drives upload through evidence export all passing.
What we learned
Auditability has to shape the data model from the start. Reviewer rationale, version predicates, immutable document hashes, provider operation IDs, and canonical event fields can't be bolted onto a summary screen afterward. I also learned to verify claims by actually running the app end to end in a real browser rather than trusting that the code "should" work — that's exactly how I caught the primary-key collision bug above.
What's next for Proofline
Before multi-instance production: a PostgreSQL adapter, organizational OIDC/MFA, KMS/HSM-backed signing, an approved deletion workflow, and an Office-to-PDF preview so DOCX sources render in-app with the same highlight overlay PDFs and images already get.
Log in or sign up for Devpost to join the conversation.