RedlineIQ screenshot
← All Projects
ShippedLegal Tech

RedlineIQ

A privacy-first, client-side document comparison tool built for legal professionals.

100% client-side — zero data transmission
DOCX, PDF, and plain text support
Move detection with Jaccard similarity scoring

The Problem

Legal professionals compare documents constantly — contract redlines, deposition exhibit comparisons, regulatory submission diffs. The existing tools are either expensive desktop software, cloud services that upload confidential documents to third-party servers, or Word's built-in compare function which is brittle and limited.

There was no good privacy-first, browser-based option that handled both DOCX and PDF inputs without sending anything to a server.

Approach

RedlineIQ is a single-file HTML application — no build step, no framework, no server-side processing for the core diff. Everything runs in the browser. The architecture centers on a two-level diff engine:

Level 1 (structural) — paragraph-level alignment using a custom LCS algorithm that understands document structure rather than treating text as a flat string.

Level 2 (inline) — character-level diff within aligned paragraph pairs, producing the familiar redline highlighting legal professionals expect.

Additional features built across 30+ development sessions include:

  • Move detection — relocated paragraphs are highlighted in purple using Jaccard similarity scoring, distinguishing them from deletions and insertions
  • Progressive rendering — Phase A (synchronous) renders visible content immediately; Phase B (async) processes the rest in the background
  • Jump-to-change navigation — keyboard shortcuts and toolbar buttons for navigating between changes
  • Proportional scroll sync — both documents scroll in sync, accounting for different content lengths
  • DOCX→PDF conversion — via Gotenberg on Railway with a Vercel serverless parse-docx function for server-assisted rendering when needed

Outcome

Deployed and in active use. The tool handles real legal documents including complex DOCX files with headers, footers, tables, and tracked changes. Being rebranded as RedlineIQ with redlineiq.io as the target domain.

Stack

Core diff engine is vanilla JavaScript for maximum portability. PDF.js handles PDF rendering. Gotenberg (self-hosted on Railway) provides DOCX→PDF conversion via a Vercel serverless function. No npm, no bundler — the entire tool is a single HTML file you can open locally or deploy to Vercel in seconds.

What I Learned

The jump-to-change navigation bug took several sessions to isolate — the fix was counterintuitive: removing a scroll listener rather than adding one. Scroll listener interference is a class of bugs worth designing against from the start.