Making complex legal docs simple, clear, and accessible for everyone. 🚀
LegalEase is a web application that helps users upload legal documents (like rental agreements, loan contracts, ToS, etc.) and instantly receive:
✅ Simplified summaries in plain language
✅ Visual flowcharts of key terms and clauses
✅ Highlighted risk flags (legal, financial, compliance, privacy)
Built for the Google Cloud Hackathon, this project leverages Google Cloud Generative AI (Gemini API) + custom ML agents to make legal knowledge accessible.
User Authentication → Signup/Login with a clean, modern UI PDF Upload Support → Upload contracts, agreements, and other docs
📄 PDF Reader Agent → Extracts text (OCR via pytesseract + pdf2image)
✍️ Summarization Agent → Clause-level summaries + TL;DR
📊 Flowchart Agent → Generates an easy-to-follow flowchart of key terms
Chatbot Interface → Users can ask questions about their document
Light Brown Aesthetic → Minimal, warm UI for clarity
Frontend: Next.js / React TailwindCSS (Gemini CLI-generated base UI, with agent integration placeholders)
Backend / AI Agents: Python (FastAPI/Flask for APIs) Pytesseract + pdf2image (OCR for PDFs) Google Cloud Storage (for raw & processed docs) Gemini API (for summarization, structuring, flowchart generation)
1️⃣ Clone the repo
cd legalease
2️⃣ Setup Frontend
npm install
npm run dev
3️⃣ Setup Backend
pip install -r requirements.txt
uvicorn app:main --reload
/components → UI components (chatbot, auth, upload)
/pages → login, signup, dashboard
/styles → Tailwind config
/backend
/agents → PDF Reader, Summarizer, Structurer, Flowchart
/utils → GCS helpers, error handling
app.py → FastAPI entry point
- User signs up / logs in
- Uploads PDF → saved in Google Cloud Storage
- PDF Reader Agent extracts text → saves to processed bucket
- Summarization Agent simplifies text
- Structuring Agent flags risks → JSON output
- Flowchart Agent creates visual explanation
- User views simplified doc + flowchart in chatbot UI