Skip to content

AI-assisted legal document editing platform for advocates. Enables to upload legal agreements, describe a case scenario, and receive clause-level AI suggestions (modify, add, or remove) to update the agreement automatically. Helps legal professionals avoid manual errors and streamline document customization.

Notifications You must be signed in to change notification settings

mulikruchi07/LegalEase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LegalEase

AI legal document assistant used by advocates to edit agreements and avoid manual errors. The system analyzes uploaded agreements, provides clause-level suggestions, and generates an updated document that solves a real problem in legal drafting and customization.

What it does

  • Upload a .docx legal template or choose a template from the library.
  • Provide base details via a guided form (e.g., licensor, licensee, period, rent).
  • Describe a case scenario; the AI returns clause-level suggestions: MODIFY, ADD, or REMOVE.
  • Review, accept, reject, or edit suggestions, then generate a final .docx agreement.

Problem solved

Advocates and legal professionals spend time manually editing agreements and are prone to drafting errors. LegalEase automates clause analysis and drafting, reducing manual effort and minimizing human error while producing a ready-to-use agreement.

Project structure

LegalEase/
├── frontend/        # React UI (App.js)
├── backend/         # Flask API (main.py)
├── venv/            # Python virtual environment
└── README.html

Tech stack

  • Frontend: React (Tailwind utility classes in UI), react-datepicker, file-saver, lucide-react icons
  • Backend: Python Flask
  • AI: Google Gemini via google.generativeai
  • Document handling: python-docx
  • Dev: REST API between frontend and backend

How it works (high level)

  1. User uploads or selects a .docx template.
  2. User fills base details and describes a scenario in the UI.
  3. Frontend sends the document, scenario and form data to the backend API.
  4. Backend parses the .docx into clauses, calls Gemini to get structured suggestions, and returns those suggestions to the UI.
  5. User reviews suggestions; accepted suggestions are applied to the original .docx and a new document is generated and downloaded.

Usage

Basic steps to run locally:

# Backend (python)
cd backend
python -m venv venv
# activate venv, then
pip install -r requirements.txt
# create .env with GEMINI_API_KEY
python main.py  # runs Flask on port 5001

Frontend (react)

cd frontend npm install npm start # runs React dev server on port 3000

Backend expects templates in a local templates/ directory. Frontend communicates with backend at http://localhost:5001.

Notes

  • Requires a valid GEMINI_API_KEY in .env for AI suggestions.
  • Current prototype supports a specific template in the frontend; extend template support by updating the React form schema and backend parsing as needed.
  • New clauses are appended to the document; paragraph styles are preserved where possible by python-docx.

Repository maintained by the project author. For setup questions, refer to main.py and App.js.

About

AI-assisted legal document editing platform for advocates. Enables to upload legal agreements, describe a case scenario, and receive clause-level AI suggestions (modify, add, or remove) to update the agreement automatically. Helps legal professionals avoid manual errors and streamline document customization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published