Inspiration

Freelancers and independent contractors sign contracts constantly — from clients, from agencies, from one-off gigs — and almost never get a lawyer to review them. Standard contract language is written by (and for) the party with more leverage, and the party with less leverage usually finds out what they actually agreed to only after it's too late.

This isn't hypothetical for us. It's the daily reality of subcontracted development work sourced through intermediary agencies, where the contractor has the least negotiating power and the least visibility into what "standard" language actually costs them. ClauseGuard exists to close that access-to-justice gap: a first line of legal defense for the people who need it most and can afford it least.

What it does

ClauseGuard reads a contract — pasted in or uploaded as PDF/DOCX — and gives freelancers a plain-language risk breakdown in under a minute.

Every clause that falls into one of six high-stakes categories — IP/ownership, payment terms, termination, liability, non-compete, and jurisdiction — gets flagged with a risk level, a plain-English explanation of what it actually means for you, and a suggested redline you can copy and send back to the other party. The whole contract gets a single risk score, so you know at a glance whether you're looking at something standard or something worth pushing back on.

The differentiator: once you've reviewed a contract, you can seal your review. ClauseGuard hashes the contract text and the risk report and writes a timestamped, verifiable record to a public blockchain (Base Sepolia). Nothing about the contract's actual contents is ever made public — only a cryptographic fingerprint. If a dispute ever comes up later, you have tamper-proof, independently verifiable proof of exactly what you reviewed and when, without exposing a single word of the underlying document. Anyone can click Verify and watch it recompute the hashes live and confirm the on-chain match.

How we built it

  • Frontend — Next.js (App Router), TypeScript, Tailwind CSS, deployed on Vercel.
  • Contract parsing — PDF and DOCX extraction with line-rejoining so wrapped clauses stay intact as continuous text.
  • AI analysis — a free-tier-only LLM pipeline: Groq's gpt-oss-20b as primary, racing a pool of free OpenRouter models (Nemotron, Qwen, Nex) in parallel as fallback, with a sequential last-resort model behind that. On top of standard schema validation, we built three honesty guards: every quoted clause must match the source contract text verbatim or it's dropped, the overall risk score is computed from the findings rather than guessed by the model, and a "not legal advice" disclaimer is always included in the summary.
  • On-chain sealing — a minimal Solidity registry contract (ClauseGuardRegistry.sol) deployed to Base Sepolia, storing a contract hash, report hash, timestamp, and sender per review. viem handles a relayer-signed transaction so users don't need their own wallet to try it.
  • Design — a "paper and ink" visual language: warm parchment background, editorial serif for the actual contract text, ink-navy and rust accents. Deliberately built to avoid generic dark-mode-AI-SaaS defaults, because a tool about real legal documents should feel like one, not like a chatbot.

Challenges we ran into

Running entirely on free-tier LLM inference meant building real resilience, not just wiring up a single API call. We hit real limits along the way — output-token ceilings that were too conservative, per-model rate limiting, and even an account-wide daily quota on one provider — and worked through them with token-limit tuning, per-provider retry logic, and a shift from sequential fallback to parallel racing across models (since one slow model attempting a long contract could eat an entire request's time budget before a second model ever got a turn).

We deliberately chose to stay $0-cost end to end rather than fall back to a paid model, which meant designing around real free-tier variability instead of hiding it — including a bounded in-memory response cache keyed by contract hash, and a one-click Try again action in the UI for when a request does fail.

Accomplishments that we're proud of

A fully working, honestly-scoped product: real contract parsing, real (not mocked) AI analysis with verifiable quote-anchoring against the source text, and a real on-chain sealing and verification flow on a live testnet — not a simulated demo. The entire pipeline runs for $0.

What we learned

That "free" and "reliable" are in real tension with LLM APIs, and the right fix is architectural — parallel racing, caching, honest failure states — rather than just reaching for a bigger model. We also learned that a product's visual identity should follow from its actual concept: leaning into the paper/document metaphor did more for making ClauseGuard feel trustworthy than any generic "AI product" styling ever could have.

What's next for ClauseGuard

Jurisdiction-specific analysis beyond general U.S. contract law, a browser extension for reviewing contracts inline before you sign, and negotiation-assistant features that help draft a full counter-response rather than just per-clause redlines.

Built With

Share this project:

Updates

Submission history