MCPcopy Index your code
hub / github.com/OssamaLouati/Legal-AI_Project

github.com/OssamaLouati/Legal-AI_Project @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
58 symbols 157 edges 31 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Legal AI — Automated Legal Document Analysis Platform

Full-stack application for contract Q\&A and clause understanding.

  • client/: Next.js + NextAuth (Google OAuth) UI
  • server/: Flask API (Gunicorn) serving ML/NLP endpoints

Quickstart (Docker)

1) Prerequisites

  • Docker Desktop or Podman (this repo currently uses podman-compose on macOS)

2) Configure environment

Create a local env file (never commit secrets):

cp client/.env.local.example client/.env

Edit client/.env and set at least:

  • NEXTAUTH_URL=http://localhost:3000
  • NEXTAUTH_SECRET=... (generate with openssl rand -base64 32)
  • GOOGLE_ID=...
  • GOOGLE_SECRET=...

Also:

  • NEXT_PUBLIC_BACKEND_URL=http://127.0.0.1:5001

3) Build & run

docker compose up -d --build

Open:

  • Frontend: http://localhost:3000
  • Backend: http://localhost:5001/questionsshort

Local dev (without Docker)

Backend

cd server
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
gunicorn -b 127.0.0.1:5001 app:app --reload

Frontend

cd client
npm install
npm run dev

Key Features

  • Contract upload + question selection
  • Reading comprehension model (SQuAD-style)
  • Paraphrasing (T5-based)
  • Sentiment analysis (TextBlob)

Disclaimer

This project is provided for research/education and is not a substitute for professional legal advice.

Extension points exported contracts — how you extend this code

JWT (Interface)
(no doc)
client/next-auth.d.ts
ProcessEnv (Interface)
(no doc)
client/process.d.ts
ProjectCardProps (Interface)
(no doc)
client/components/projectCard.tsx
FormattedFormData (Interface)
(no doc)
client/components/mailchimpform.tsx
FormDetails (Interface)
(no doc)
client/components/contact.tsx
NewsletterProps (Interface)
(no doc)
client/components/newsletter.tsx

Core symbols most depended-on inside this repo

onFormUpdate
called by 5
client/components/contact.tsx
onUpdateActiveLink
called by 3
client/components/navbar.tsx
stepIndex
called by 2
client/pages/dashboard.tsx
runAsk
called by 2
client/pages/dashboard.tsx
tick
called by 1
client/components/banner.tsx
clearFields
called by 1
client/components/newsletter.tsx
fetchData
called by 1
client/pages/protected.tsx
run_prediction
called by 1
server/predict.py

Shape

Function 48
Interface 6
Route 4

Languages

TypeScript76%
Python24%

Modules by API surface

server/app.py10 symbols
client/pages/dashboard.tsx4 symbols
client/components/newsletter.tsx4 symbols
client/components/contact.tsx4 symbols
client/components/navbar.tsx3 symbols
server/predict.py2 symbols
server/paraphrase.py2 symbols
client/pages/server.tsx2 symbols
client/pages/protected.tsx2 symbols
client/components/projectCard.tsx2 symbols
client/components/mailchimpform.tsx2 symbols
client/components/banner.tsx2 symbols

For agents

$ claude mcp add Legal-AI_Project \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact