Skip to content

Lambo-IITian/NoCourt

Repository files navigation

LegalAI Resolver

AI-powered pre-litigation dispute resolution system. Describe your dispute in plain English — get applicable law, analytics, and a signed settlement. No lawyers. No court.

Live Demo: nocourt-1.onrender.com


What It Does

A claimant submits a dispute in plain English. Five AI agents analyze it sequentially, invite the respondent via email, and mediate up to 3 rounds of negotiation. If both parties accept a proposal, a legally-structured settlement agreement is generated and emailed automatically. If 3 rounds fail, a court-ready case file is produced instead.


Agent Pipeline

Dispute Text
     │
     ▼
┌─────────────────┐     ┌──────────────┐     ┌───────────────────┐
│  Intake Agent   │────▶│  Legal Agent │────▶│ Analytics Agent   │
│ Classify type   │     │ Map statutes │     │ Win probability   │
│ Extract facts   │     │ Jurisdiction │     │ Settlement range  │
│ Detect severity │     │ Section nums │     │ Court cost est.   │
└─────────────────┘     └──────────────┘     └───────────────────┘
                                                       │
                              ┌────────────────────────┘
                              ▼
                   ┌──────────────────┐     ┌────────────────────┐
                   │ Document Agent   │────▶│ Negotiation Agent  │
                   │ 3 PDF generators │     │ 3-round mediation  │
                   │ Demand Letter    │     │ Accept/Reject FSM  │
                   │ Court File       │     │ Fair amount + logic│
                   │ Settlement Agmt  │     └────────────────────┘
                   └──────────────────┘

Tech Stack

Layer Technology
Backend FastAPI, Python 3.11
AI / LLM Groq API — LLaMA 3.3 70B Versatile
Database SQLite + nested JSON case schema
PDF Engine ReportLab (3 separate AI sub-agents)
Email Azure Communication Services
Frontend HTML, Tailwind CSS, Vanilla JS
Deployment Render

Project Structure

legal-resolver/
├── backend/
│   ├── main.py                  # 14 REST endpoints
│   ├── agents/
│   │   ├── intake_agent.py
│   │   ├── legal_agent.py
│   │   ├── analytics_agent.py
│   │   ├── document_agent.py    # 3 PDF sub-agents
│   │   └── negotiation_agent.py
│   └── services/
│       ├── openai_service.py    # Groq wrapper
│       ├── db_service.py
│       └── email_service.py
├── frontend/
│   ├── index.html               # Claimant portal
│   └── respond.html             # Respondent portal
├── outputs/                     # Generated PDFs
├── .env

Setup

1. Clone and install

git clone https://github.com/Lambo-IITian/NoCourt
cd NoCourt
pip install -r requirements.txt

2. Configure .env

GROQ_API_KEY=your_groq_key
GROQ_MODEL=llama-3.3-70b-versatile
AZURE_COMM_CONNECTION_STRING=endpoint=https://...;accesskey=...
AZURE_SENDER_EMAIL=DoNotReply@...azurecomm.net
BASE_URL=https://your-app.onrender.com

3. Run locally

cd backend
uvicorn main:app --reload

4. Deploy on Render

  • Set all .env variables as environment variables in the Render dashboard
  • Set BASE_URL to your Render service URL
  • Build command: pip install -r requirements.txt
  • Start command: uvicorn backend.main:app --host 0.0.0.0 --port $PORT

API Endpoints

Method Endpoint Description
POST /api/analyze Run all 5 agents, create case
POST /api/send-invite Email respondent invite
POST /api/negotiate Submit claimant offer, trigger AI mediation
POST /api/respondent-offer Submit respondent offer
POST /api/proposal-response Accept or Reject AI proposal
GET /api/proposal-status/{id}/{round} Poll both parties' decisions
GET /api/download/{case_id} Download demand letter PDF
GET /api/download-settlement/{id} Download settlement agreement
GET /api/download-court-file/{id} Download court-ready file
POST /api/my-cases Get all cases by email

Dispute Types Supported

Rental deposit · Unpaid salary · Consumer fraud · Contract breach · Physical assault · Harassment · Defamation · Property damage · Neighbor dispute · Domestic matter · Apology demand · Other


Known Limitations

  • No authentication — email-based case linking only
  • SQLite not suitable for concurrent multi-user production load
  • PDFs lost on server restart (ephemeral storage on Render free tier)
  • Groq free tier has per-minute rate caps
  • Legal accuracy not verified by attorneys — AI-generated drafts only

License

MIT

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors