Inspiration

4 billion people can't afford a lawyer. We've all signed contracts we didn't fully understand — rental agreements, job offers, loan docu

What it does

LegalEase analyzes any legal contract in seconds. Upload a PDF and get risky clauses flagged, safe clauses confirmed, a plain English summary, and a clear verdict — Sign, Negotiate, or Avoid. The Telegram bot adds instant legal Q&A in Hindi, Tamil, Telugu, Bengali and English

How we built it

used Flask for the backend, PyPDF2 to extract text from PDFs, and Google Gemini AI to analyze contracts and return structured results. The frontend is pure HTML and CSS with a glassmorphism design. The Telegram bot runs on python-telegram-bot with langdetect for automatic language detection.

Challenges we ran into

Getting Gemini to return consistent structured JSON was tricky it sometimes wrapped responses in markdown. Handling scanned PDFs that have no extractable text was another challenge. Making the multilingual detection accurate across Indian languages took extra tuning.

Accomplishments that we're proud of

Building a fully working product in hackathon time that solves a real problem for real people. The multilingual Telegram bot supporting Indian languages felt like a meaningful achievement for accessibility.

What we learned

How to prompt AI models to return structured data reliably, how to build end-to-end Flask applications, and how to make legal technology accessible to non-English speakers.

What's next for LegalEase

LegalEase will expand OCR support for scanned PDFs, grow to 50+ languages globally, and launch a mobile app for instant contract photography. A browser extension will warn users before clicking "I Agree" on any website. An Enterprise version will help startups vet contracts automatically, and a Lawyer Connect feature will link users to affordable lawyers when serious red flags are found. The ultimate goal becoming the world's legal infrastructure layer for the 4 billion people who can't afford a lawyer.

Built With

  • css3
  • flask
  • geminiapi
  • google-genai
  • html5
  • langdetect
  • pypdf2
  • python
  • python-dotenv
  • python-telegram-bot
  • render
  • telegrambot
  • werkzeug
Share this project:

Updates