A full-stack legal document review app with a pipeline of specialized agents (Summarizer, Clause Extractor, Risk Analyzer, Action Recommendation) that parse and analyze legal documents.
Runs entirely without paid AI APIs — analysis uses rule-based pattern matching and local NLP. Optional free local LLM via Ollama (USE_OLLAMA=1).
- Frontend: Vite, React, Tailwind CSS v3, Framer Motion, Axios
- Backend: Python, FastAPI, SQLAlchemy (SQLite), PyPDF, python-docx, PyJWT
Run both the backend API and the frontend UI.
cd server
pip install -r requirements.txt
python seed_data.py
uvicorn main:app --reload --port 8000- API: http://localhost:8000
- Swagger Docs: http://localhost:8000/docs
- Default login:
admin@lexagent.ai/admin123(created by seed script)
No API keys required.
cd .. # project root (ErrorOverdose-main)
npm install
npm run devFor richer clause classification without cloud costs:
- Install and run Ollama, then
ollama pull llama3 - Set environment variables before starting the server:
$env:USE_OLLAMA = "1" $env:OLLAMA_MODEL = "llama3"
Image uploads (JPG/PNG) use free Tesseract OCR when installed:
pip install pytesseract pillow
# Also install Tesseract: https://github.com/tesseract-ocr/tesseractWithout Tesseract, upload PDF, DOCX, or TXT instead.
cd server
pytest test_main.py -vImport server/postman_collection.json into Postman to test endpoints manually.
- Analysis is rule-based, not generative — it detects known risk patterns (liability, non-compete, indemnification, etc.) rather than deep semantic understanding.
- Chat agents return structured responses derived from the submitted text, not open-ended LLM conversation.
- Translation uses free Google Translate via
deep-translator(requires internet). - Image text extraction requires Tesseract to be installed locally.