-
-
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 often contain important obligations hidden in dense language, long documents, and unfamiliar legal terms. I wanted to make the first review of a contract faster and more understandable by showing people exactly what to look at before they sign.
Technical Documentation
For the full architecture diagram, setup instructions, API documentation, deployment guide, environment variables, and project structure, visit the GitHub README: https://github.com/ML642/ClauseIQ
What it does
ClauseIQ lets a user upload a PDF, DOCX, text file, or contract image. It extracts document text, checks it against transparent legal-language rules, assigns a risk score, and shows the exact sentence and location connected to each finding.
The platform also includes registration, login, personal analysis history, document previews, and a visual review experience that keeps the original document next to the flagged language.
How I built it
I built the frontend with React and Vite, with separate pages for the homepage, prototype, FAQ, authentication, dashboard, history, and account views.
The backend uses FastAPI and MongoDB for authentication, user profiles, and analysis history. The parser supports PDFs, DOCX files, plain text, and images using local extraction and OCR tools. The baseline contract analysis uses deterministic rules and regular expressions, so it works without requiring an external AI key.
I also added an optional OpenAI reasoning layer. When a key is configured, it explains parser findings in plain English while keeping the local parser as the source of truth for scores, matches, and locations.
Challenges I ran into
One major challenge was making document analysis explainable. Instead of returning vague warnings, I needed every finding to connect to a concrete sentence in the uploaded document.
I also had to handle different file formats, OCR for image-based documents, Docker builds with native dependencies, persistent authentication, and deployment configuration across MongoDB Atlas, Render, and Vercel.
Accomplishments that I'm proud of
- Built a working end-to-end contract analysis flow.
- Showed the original uploaded document beside the exact flagged language.
- Created rule-based checks that work without an AI API key.
- Added secure account registration, login, logout, and per-user analysis history.
- Containerized the backend, parser, frontend, and database workflow.
- Prepared the app for cloud deployment with MongoDB Atlas, Render, and Vercel.
What I learned
I learned that explainability matters as much as detection in legal-tech tools. A useful result must show where a concern came from, not just assign a score.
I also gained experience with OCR, FastAPI, MongoDB, Docker Compose, CORS, environment-variable security, and deploying a full-stack application across multiple cloud services.
What's next for ClauseIQ
Next, I want to improve clause detection with more contract types, add side-by-side clause comparison, support multi-page PDF highlighting, improve AI explanations, add exportable reports, and let users organize analyses by project or company.
Log in or sign up for Devpost to join the conversation.