Read the Fine Print:不會上傳合約的自由工作者合約風險審查工具
Read the Fine Print: a contract red-flag reviewer for freelancers that never uploads your contract
Read the Fine Print 是一款面向自由工作者的合約風險審查網頁應用程式,使用 Gemma 4 E2B 在瀏覽器本機逐條標示條款風險。它透過 WebLLM 和 WebGPU 處理合約,不設伺服器、帳戶或 API key,並為標記條款提供解釋及議價訊息。首次使用需下載約 3 GB 模型,之後由瀏覽器快取;13 條條款的示範合約約 2.5 分鐘完成審查。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
Freelancers sign contracts written by the client's side. The traps are always the same: payment at Net 90, "unlimited revisions", IP transferred before you've been paid, no kill fee, a non-compete, unlimited liability, an auto-renewal you forget about. Most of us skim, sign, and find out later.
Read the Fine Print is a web app for that moment before you sign. Paste the contract or drop the PDF, and every clause gets a traffic light:
- 🔴 To change: don't sign it as it is.
- 🟡 To negotiate: common, but worth pushing back on.
- 🟢 Fine: nothing to do.
Each flagged clause comes with a plain-English explanation and a ready-to-send message asking for a fairer version. Copy email to client puts them all into one polite email.
The important part: the AI runs entirely in your browser. Client contracts are confidential and often under NDA, so the app never sends them anywhere. No server, no account, no API key.
Who would pay for it? Freelancers who sign a handful of contracts a year and can't justify a lawyer for each one. A lawyer's review costs more than many small gigs pay; a one-off purchase or a few dollars a month for a tool that catches the obvious traps is an easy sell.
Demo
Try it: virien84.github.io/read-the-fine-print (needs WebGPU: recent Chrome or Edge on a laptop/desktop). Click Try a sample contract to see it work without using a real one.
The first visit downloads the model (~3 GB) once; after that the browser caches it and it loads in about 11 seconds. Each clause takes 7–13 seconds on my NVIDIA Turing GPU, and the bundled 13-clause sample contract is reviewed in about 2.5 minutes, with live progress as each clause comes in.
On that sample, which I seeded with the classic traps, the app flags the payment terms, unlimited revisions, IP-before-payment, non-compete, liability and auto-renewal clauses. It's honest to say it isn't perfect: the termination clause only gets a yellow, and it leans strict (a fair IP clause sometimes comes back yellow instead of green). For a "read this before signing" tool, erring on the side of caution is the right failure mode.
I haven't put it in front of a paying freelancer yet, so no first-user story this week.
Code
Read the Fine Print
Spot the clauses that cost freelancers money, before you sign.
Paste or drop a client contract and every clause gets a traffic light:
- 🔴 To change: don't sign it as it is.
- 🟡 To negotiate: common, but worth pushing back on.
- 🟢 Fine: nothing to do.
Each flagged clause comes with a plain-English explanation and a ready-to-send message asking for a fairer version, and Copy email to client puts them all in one email.
The AI runs entirely in your browser. Client contracts are confidential and often under NDA, so Read the Fine Print never sends them anywhere: no server, no account, no API key.
How it works
| Piece | What it does |
|---|---|
| Gemma 4 E2B via WebLLM | Runs on your GPU through WebGPU, in a Web Worker. Downloaded once (~3 GB) and cached by the browser. Gemma 3 1B is the fallback for |
…
Vite + React, no backend.
How I Built It
PDF / pasted text ─► pdf.js (local) ─► split into clauses
│
▼
Gemma 4 E2B (WebLLM, WebGPU, Web Worker)
JSON-schema output, one clause at a time
│
▼
🔴🟡🟢 + explanation + pushback ─► email to client
-
Model: Gemma 4 E2B through WebLLM, in a Web Worker so the page stays responsive. Gemma 3 1B is the fallback for GPUs without
shader-f16. -
Constrained output: every answer follows a JSON schema, so parsing never fails. The trick that mattered most: putting
explanationbeforelevelin the schema. When the model has to explain the clause first and only then pick a colour, its verdicts got noticeably more accurate. - A checklist of known traps: the prompt lists the classic freelance traps, so a small model compares against a list instead of relying on its own judgement. I also had to add a rule that the pushback must actually be better than the original (an early version "negotiated" a 60-day notice period up to 90).
- Clause splitting: numbered clauses first, paragraph fallback, signature blocks skipped. PDFs are read locally with pdf.js.
-
Surviving a lost GPU: on long runs Chrome sometimes loses the WebGPU device and refuses it until reload. The app parks the review in
sessionStorage, reloads, and resumes where it left off.
One lesson: more is not always better. I tried "red lines" (user-defined deal-breakers), an enum of trap types and a second yes/no verification pass. On the full sample, accuracy got worse (the preamble got flagged, revisions got missed) and it cost twice the GPU time. I went back to the single, simple prompt.
I built it with Claude Code as my coding agent.
Why Does Open Innovation Matter?
- Privacy is the product. Many contracts forbid sharing them with third parties. A cloud API is a third party. An open-weight model running on your own GPU is not, so you can review an NDA-covered contract without breaking it.
- The economics work. No per-token bill means I can sell it cheaply (or give it away) without losing money on every review.
- No lock-in. If a better small open model ships next month, it's a one-line change.
Prior art and inspiration from the DEV community:
- The 5 contract clauses that quietly wreck freelancers by agentedeia: the clause → pushback format.
- The biggest mistake I made with client contracts by aldobarbosa: unlimited revisions in real life.
- OCR + LLM Pipeline for Contract Review by methezain.
- I built a local LLM that runs entirely in your browser by zaydmulani09.
- Building a Context-Aware Legal Contract Analyzer with Gemma and Gemini by __13_77. My angle: fully local, and focused on freelancers.
Not legal advice. For anything high-stakes, ask a lawyer.
Prize Categories
- Best Use of Gemma: Gemma 4 E2B runs fully in the browser through WebGPU and does the whole review, with JSON-schema constrained output per clause.
來源:DEV Community · dev.to