An AI-powered tool that analyzes lease agreements and contracts to identify risky clauses, explain them in plain English, and provide actionable recommendations.
DEMO VIDEO HERE -> https://youtu.be/PtyG8UHksWg
Fineprint includes a Next.js App Router endpoint at POST /api/analyze.
- Accepts either:
- JSON body with
contractText multipart/form-datawith uploadedfile(.txtor.pdf) orcontractText
- JSON body with
- Uses Google Gemini model
gemini-2.5-flash - Returns structured JSON clause analysis with:
clause_textmeaningrisk_levelwhy_riskysuggested_action
This repo includes a standalone Python demo analyzer that now works directly from the repo root.
- Accepts pasted contract text or a
.txtfile - Splits messy contracts into clauses
- Uses Gemini structured output plus schema validation
- Returns clause-level risk explanations and suggested actions
Quick start:
pip install -r requirements.txt
cp .env.example .env
python main.py --sampleThe same analyzer source is also available in python/leaselens if you want it separated from the web app.
- Install dependencies:
npm install- Add env:
GEMINI_API_KEY=your_google_gemini_api_key- Run:
npm run devmain <- dev <- feature/*
main: final stable version (only working code)dev: where all features get mergedfeature/*: where each person works
Examples:
feature/ai-extractionfeature/risk-analysisfeature/frontend-uifeature/integration
git clone <repo-url>
cd <repo>
git checkout dev
git checkout -b feature/your-branch
git push origin feature/your-branchBefore starting work:
git checkout dev
git pull origin dev
git checkout feature/your-branch
git merge devDo your work:
git add .
git commit -m "short description"
git push origin feature/your-branchWhen your feature is done:
- Open a Pull Request ->
dev - Get it reviewed
- Merge
Manual:
git checkout dev
git pull origin dev
git merge feature/your-branch
git push origin devOnly when everything is working, tested, and demo-ready:
git checkout main
git pull origin main
git merge dev
git push origin main