Skip to content

Emadedin1/Fineprint

Repository files navigation

Fineprint

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

API (Current)

Fineprint includes a Next.js App Router endpoint at POST /api/analyze.

  • Accepts either:
    • JSON body with contractText
    • multipart/form-data with uploaded file (.txt or .pdf) or contractText
  • Uses Google Gemini model gemini-2.5-flash
  • Returns structured JSON clause analysis with:
    • clause_text
    • meaning
    • risk_level
    • why_risky
    • suggested_action

Python CLI Demo

This repo includes a standalone Python demo analyzer that now works directly from the repo root.

  • Accepts pasted contract text or a .txt file
  • 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 --sample

The same analyzer source is also available in python/leaselens if you want it separated from the web app.

Setup

  1. Install dependencies:
npm install
  1. Add env:
GEMINI_API_KEY=your_google_gemini_api_key
  1. Run:
npm run dev

Team Workflow

Branch Structure

main <- dev <- feature/*

  • main: final stable version (only working code)
  • dev: where all features get merged
  • feature/*: where each person works

Examples:

  • feature/ai-extraction
  • feature/risk-analysis
  • feature/frontend-ui
  • feature/integration

First Time Setup

git clone <repo-url>
cd <repo>
git checkout dev
git checkout -b feature/your-branch
git push origin feature/your-branch

Daily Workflow

Before starting work:

git checkout dev
git pull origin dev
git checkout feature/your-branch
git merge dev

Do your work:

git add .
git commit -m "short description"
git push origin feature/your-branch

Merging Into Dev

When your feature is done:

  1. Open a Pull Request -> dev
  2. Get it reviewed
  3. Merge

Manual:

git checkout dev
git pull origin dev
git merge feature/your-branch
git push origin dev

Merging Dev Into Main

Only when everything is working, tested, and demo-ready:

git checkout main
git pull origin main
git merge dev
git push origin main

About

An AI-powered tool that analyzes lease agreements and contracts to identify risky clauses, explain them in plain English, and provide actionable recommendations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors