All projects

ClearDoc

Team Project โ€” Sathyabama ยท 2026

Completed โ€” Hackathon Project๐Ÿ† 2nd Runner-Up โ€” ZeroX: Hack the Planet Hackathon

An AI tool that translates dense legal documents into plain English and Tamil, flags risky clauses before you sign, and checks agreements against Indian law.

ClearDoc
PythonStreamlitGemini APITesseract OCR

Problem

People sign rental agreements, employment contracts, and NDAs without understanding the dense legal language inside them โ€” and risky clauses go unnoticed until it's too late.

Solution

ClearDoc extracts text from scanned or native PDFs via OCR, auto-detects the document type, runs it through a modular rule registry that flags clause-specific risks, and uses Gemini to summarize the document and answer follow-up questions in plain English and Tamil โ€” before the person signs anything.

Key Features

  • OCR + PDF pipeline extracts text from scanned and native documents
  • Modular rule registry โ€” new document types (rental, employment, NDA) plug in without touching core logic
  • Gemini-powered summarization, clause risk-flagging, and click-to-explain chat

Architecture

  • app.py โ€” Streamlit UI: upload, results display, click-to-explain chat
  • pipeline.py โ€” orchestrates the flow: detect document type โ†’ extract facts โ†’ run rules โ†’ summarize
  • doc_types.py โ€” the modular rule registry, one block per document type (rental, employment, NDA)
  • extraction.py โ€” PDF/OCR text extraction, kept in-memory only
  • llm_client.py โ€” the single point where the app talks to Gemini, so the rest of the app stays provider-agnostic

My Contribution

Team project built for a campus hackathon โ€” worked on the extraction pipeline and the plug-in style rule-registry design that lets a new document type (rental, employment, NDA, etc.) be added without touching the core pipeline logic.

Challenges

  • Extraction accuracy depends on document clarity โ€” heavily degraded scans can confuse auto-detection and need manual document-type selection as a fallback.
  • The rule sets encode specific, known checks โ€” they're not a substitute for legal advice, so the app says so visibly in the UI rather than overstating what it can catch.

What I Learned

  • Designing a rule registry as a plug-in system, so new document types are additive instead of requiring changes to shared pipeline code.
  • Isolating every LLM call behind one module (llm_client.py) so the rest of the app doesn't care which model is behind it.
View Code