DealWithIt— Our Story

What Inspired Us A $50,000 vendor contract. A missed auto-renewal clause. $6,800 gone quietly, legally, invisibly. That's what happened to a founder we know personally. No bad faith, no fraud. Just an unreadable contract and no one in his corner. We asked ourselves: what if anyone not just a $500/hour lawyer could instantly know exactly what their contract was costing them? That question became DealWithIt.

What We Learned We learned that contract risk isn't abstract it's mathematical. Industry data from WorldCC and Ironclad (2025–2026) shows that organizations leak an average of: Revenue Leakage=xˉ≈8.6% of contract value annually

For a typical $50K sales agreement, that translates to:

Annual Leakage=$50,000×0.086=$4,300 – $9,000 With leakage rates ranging up to 9%, the realistic exposure window is: Leakage Range=[$4,300, $4,500]

We learned that the gap isn't legal expertise it's accessibility. The insights exist. They just live behind language no one outside a law firm can parse.

How We Built It

We built a TypeScript-native GraphRAG pipeline — no Python, no shortcuts. LayerTechnologyVector StoreSupabase pgvectorLLMGPT-4.2 via Lava.soGraph TraversalLangGraph.jsEmbeddingsOpenAI text-embedding-3-smallFrontendNext.js + shadcn + TailwindDeploymentVercel

The core pipeline follows a confidence-gated agentic loop:

The pipeline enforces a confidence-gated re-query loop. For any generated answer: If CS<0.80⇒re-query with expanded graph context CS denotes the Confidence Score returned by the Answer Generation node.

Router Node classifies each question as simple or complex. Complex questions trigger a full graph traversal across clause relationships surfacing risks a pure vector search would miss entirely. Henry's finance layer ensures every dollar figure is grounded in real deal math, not hallucinated estimates. George's pipeline makes it fast enough for production. Thomas made it feel like a $10M product.

Challenges We Faced

  1. Making numbers trustworthy Early prototypes returned fantasy figures like $2M in risk on a $50K contract. We rebuilt every prompt from scratch with CFO-grade constraints forcing the model to show its math explicitly.
  2. Graph traversal in pure TypeScript LangGraph.js is powerful but young. We hit undocumented edge cases in the state machine, especially around the confidence re-query loop. We solved it by treating graph state as immutable and rebuilding context at each node.
  3. Designing for two audiences simultaneously A Citadel analyst and a first-time freelancer need the same answer formatted completely differently. The UI had to hold both without condescending to either.
  4. Keeping latency under 3 seconds GraphRAG is expensive. We solved this with aggressive query routing simple questions never touch the graph at all, keeping median response time well under: We enforce strict latency budgets across both query paths: tsimple​<1.2sandtcomplex​<3.0s

The Bottom Line DealWithIt isn't a chatbot on top of a PDF. It's the first tool that makes contract intelligence genuinely accessible to the CFO closing a $10M deal and the freelancer protecting a $5K retainer equally. We built it in a weekend. We built it to last

Built With

Share this project:

Updates