Inspiration
People sign apartment leases, job offers, and app terms every day without understanding the fine print. Legal wording is confusing, and hiring a lawyer for routine agreements is too expensive. We built ClauseCheck so anyone—especially students, renters, and job seekers—can spot hidden traps in plain English before signing.
What it does
Paste any contract (or click Try an example), choose the document type, and get a clear breakdown in seconds:
- Spot Risks Fast: Flags clauses as High Risk (red) or Worth Checking (yellow) for Rental, Job/Internship, and Website/App Terms.
- Plain-English Explanations: Tells you in simple words why a clause could cost you money or rights.
- Find the Exact Line: Shows the exact Line number and Section name on every card, plus a "Locate in text ↓" button that jumps straight to the highlighted sentence below.
- Know What to Ask: Gives you polite "What to ask for instead" questions to help you negotiate before signing.
How we built it
- Sentence & Line Tracker (
splitter.py): Python code splits pasted text into numbered sentences while recording exact line numbers and section headings. - AI Analysis (
ai_client.py): Uses the Google Gemini API (gemini-3.6-flashwithgemini-3.5-flash-litebackup) to check clauses against tailored risk checklists. - Safety Filter (
validator.py): Double-checks the AI's response to remove fake sentence IDs, block prompt injection, and keep wording neutral. - Web App: Built with Python, Flask, HTML, CSS, and JavaScript, and deployed on Render.
Challenges we ran into
- Broken PDF Line Breaks: Pasting from PDFs splits single sentences across multiple lines. We wrote custom rules to rejoin broken sentences while keeping accurate line numbers.
- Keeping the AI Grounded: We added a post-processing validator so the AI only flags real sentences from your text and never claims to give formal legal advice.
- Server Timeouts: We added automatic model fallback so the live app stays fast and reliable on free cloud hosting.
Accomplishments that we're proud of
- Making it effortless to find where a risky clause lives using Line/Section badges and the "Locate in text ↓" jump button.
- Turning scary legal jargon into simple, constructive questions anyone can ask.
What we learned
- Adding simple Python checks before and after an AI call makes the results much safer and more accurate.
- Clear visual highlights and line numbers make AI tools far easier for everyday users to trust.
What's next for ClauseCheck
- Direct PDF and Word (.docx) file uploads.
- A one-click Export Questions button to copy or email your negotiation checklist.
- New checklists for freelance contracts and NDAs.
How to Test the Live Demo
- Open https://clausecheck-okff.onrender.com/ (hosted on Render's free tier so if it takes ~30 seconds on the first load, it is waking up from sleep).
- Pick a Document type (Rental, Job/Internship, or Website/App Terms).
- Paste contract text, or click Try an example to load sample text.
- Click Check Contract.
- Read the Key Takeaways and Flagged Clauses, and click Locate in text ↓ to jump to that highlighted line below.
Privacy & Disclaimer: Please do not paste personal details like ID numbers, bank details, or home addresses. ClauseCheck provides plain-English guidance to help you ask better questions and is not formal legal advice.