-
-
A simple three-step flow: upload a contract, detect clauses, and review evidence.
-
Analysis view showing flagged clauses beside the original uploaded document.
-
ClauseIQ homepage introducing transparent, rule-based contract review.
-
Personal dashboard with contract analysis history and a quick-start review workflow.
Inspiration
Contracts affect everyday decisions, but understanding them can be difficult.
Important obligations such as automatic renewal, termination conditions, liability, arbitration, or confidentiality clauses are often hidden inside long documents and unfamiliar legal language. For someone without legal experience, even knowing what deserves attention can be difficult.
I built ClauseIQ to make the first review of a contract faster, clearer, and more transparent.
The goal was not to replace lawyers or automatically decide whether a contract is "good" or "bad." Instead, I wanted to build a tool that helps users identify important language, understand why it was flagged, and decide what they should examine more carefully before signing.
What I Built
ClauseIQ is a document-analysis platform that turns contracts into an evidence-based review.
Users can upload PDF, DOCX, TXT, or image-based documents. The system extracts the content, performs OCR when necessary, analyzes the text, and highlights clauses that may deserve additional attention.
For every finding, ClauseIQ shows the actual sentence and location that triggered it.
This creates a simple review flow:
upload → detect → show evidence → explain → review
The platform also includes:
- document previews next to detected findings,
- a structured risk assessment,
- account registration and authentication,
- private analysis history,
- support for scanned documents through OCR,
- optional plain-English AI explanations.
Who It Helps
ClauseIQ is designed for people who need a better first understanding of a contract before deciding what to do next.
Potential users include:
- freelancers reviewing client agreements,
- students reading rental or employment documents,
- founders and small businesses reviewing contracts,
- individuals who do not have immediate access to legal support.
ClauseIQ is not intended to replace professional legal advice. Its purpose is to help users understand where they should look and what questions they may need to ask.
How I Built It
I built the frontend with React and Vite and the backend with FastAPI.
MongoDB stores user accounts and analysis history.
The document-processing pipeline supports multiple formats and uses tools such as PyMuPDF, python-docx, Pillow, and Tesseract OCR to extract content from both digital and scanned documents.
The most important architectural decision was how the analysis itself works.
Instead of sending every document directly to an AI model, ClauseIQ uses a deterministic rule engine as its primary analysis system.
The engine looks for transparent legal-language patterns and keeps track of the exact text and position connected to each result.
This gives the system several advantages:
- findings are reproducible,
- every result can be traced back to visible evidence,
- the core product works without an external AI API,
- users can understand why something was flagged.
I then added an optional OpenAI explanation layer.
AI receives findings that have already been discovered by the deterministic engine and explains them in simpler language. It does not secretly generate additional findings or replace the underlying score.
The application is containerized with Docker and Docker Compose and deployed using Vercel, Render, and MongoDB Atlas.
What Makes ClauseIQ Different
A common approach to document analysis is:
document → AI model → answer
I wanted ClauseIQ to work differently.
Its architecture is:
document → deterministic analysis → evidence → optional AI explanation
That distinction matters because an important document-analysis tool should not only produce an answer. It should also make it possible to understand where that answer came from.
ClauseIQ combines automation with visible evidence instead of treating AI output as a black box.
Challenges I Faced
The biggest challenge was making findings explainable.
Detecting a phrase with a rule is one problem. Reliably connecting that result back to the correct sentence and position in the original document is another.
I had to preserve enough information throughout the processing pipeline so the frontend could show users exactly what caused each finding.
Another challenge was supporting different document types.
A normal PDF may contain directly extractable text, while a scanned agreement may contain only images. The system therefore needed both traditional text extraction and OCR while still producing a consistent analysis format.
I also worked through several infrastructure challenges:
- running OCR and native dependencies inside Docker,
- securely managing environment variables and API keys,
- maintaining authentication and user-specific history,
- configuring CORS between separately deployed services,
- deploying different parts of the application across multiple platforms.
Accomplishments I'm Proud Of
The part I am most proud of is that ClauseIQ became more than a prototype that simply sends text to an AI API.
I built a complete flow from document upload to evidence-backed analysis, including:
- multi-format document processing,
- OCR support,
- deterministic rule-based detection,
- precise evidence linking,
- optional AI explanations,
- user authentication and history,
- containerized infrastructure,
- a working cloud deployment.
Most importantly, the application can still perform its core analysis even when no AI API is available.
What I Learned
Building ClauseIQ changed the way I think about AI products.
I learned that adding AI is not always the most important part of an application. Sometimes the harder engineering problem is deciding where AI should not be used.
For ClauseIQ, deterministic rules were better suited for producing transparent and reproducible findings, while AI was useful for translating those findings into language that is easier for users to understand.
I also gained experience with:
- FastAPI,
- MongoDB,
- OCR and document processing,
- Docker and Docker Compose,
- cloud deployment,
- authentication,
- CORS,
- environment-variable security,
- integrating AI as one component of a larger system.
Potential Impact
The long-term goal of ClauseIQ is to reduce the gap between receiving a contract and understanding what deserves attention.
It cannot replace legal expertise, but it can make the first step of contract review more accessible.
Instead of presenting users with another opaque score, ClauseIQ aims to give them something more useful:
the evidence, the context, and a better starting point for making an informed decision.
What's Next
The next steps for ClauseIQ include:
- supporting more contract types and clause patterns,
- comparing clauses across different versions of a contract,
- highlighting findings directly inside multi-page PDFs,
- generating exportable review reports,
- improving contextual AI explanations,
- organizing analyses by project or company,
- adding richer relationships between clauses and detected risks.
Log in or sign up for Devpost to join the conversation.