convez.ai
PluginFinanceiroAvançado
chaudhariaditya994-arch

LexScan — Analisador de Risco Legal com IA

chaudhariaditya994-arch/lexscan-legal-risk-analyzer

Analisa contratos PDF com IA Claude, flageia riscos legais e oferece recomendações de negociação

Ver no GitHub
InicialPluginScore · de 0 a 100

Plugin que analisa documentos PDF de contratos usando Claude AI para identificar cláusulas de risco, armadilhas ocultas e explicar em linguagem clara. Detecta auto-renovação, rescisão unilateral, penalidades escondidas, arbitragem forçada e outros problemas legais críticos. Inclui busca web em tempo real para termos jurídicos desconhecidos e exporta relatório de risco em PDF.

Instalação

$npx convez-ai chaudhariaditya994-arch/lexscan-legal-risk-analyzer

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 8 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Advogados e juristas analisarem contratos rapidamente antes de assinar
  • Empresas avaliarem termos de SaaS, NDAs e acordos de fornecedor
  • Profissionais independentes validarem contratos de trabalho e ofertas

Veredito

Ferramenta sólida que combina Claude com análise estruturada de contratos. A integração de tool_use forçando resposta JSON estruturada é bem pensada. Stack robusto (FastAPI, MongoDB, React), mas requer investimento em setup e não substitui assessoria jurídica real — é complementar.

README

A tradução para o português deste README ainda está na fila.

? LEXSCAN — AI Legal Risk Analyzer

Python 3.11 FastAPI React MongoDB Anthropic Claude CI MIT License

AI-powered legal document risk analyzer — upload any PDF contract and Claude AI identifies risky clauses, flags hidden traps, and explains them in plain English.

Features

  • Upload any PDF contract (offer letter, lease, NDA, SaaS terms)
  • Claude AI reads the full document natively — no OCR needed
  • Identifies 6–15 risky clauses per document
  • Flags: Auto-renewal traps, One-sided termination, Hidden penalties, Forced arbitration, IP assignment, Non-compete clauses
  • Risk meter: HIGH / MEDIUM / LOW per clause
  • Plain English explanation + negotiation recommendation per clause
  • Web search tool — looks up unfamiliar legal terms in real time
  • In-memory MongoDB session history
  • Export PDF risk report

Tech Stack

LayerTechnology
FrontendReact, Vite
AI EngineClaude Sonnet via Anthropic API (tool_use + web_search)
BackendFastAPI, Python 3.11
DatabaseMongoDB (motor async driver)
CacheRedis (SHA256 PDF deduplication)
MobileExpo React Native
PDF GenerationReportLab
AuthGoogle OAuth 2.0 + JWT

How tool_use Works

LEXSCAN defines a custom client tool called analyze_legal_document. The backend forces Claude to finish by calling that tool and returning structured JSON instead of unstructured prose. The schema includes document metadata, overall risk, a clause list, searched legal terms, and negotiation guidance. Because the request also enables the web_search_20250305 server tool, Claude can look up unfamiliar legal terms before it submits the final tool payload.

Shared schema references live in:

  • frontend/src/utils/toolSchema.js
  • backend/models/analysis.py
  • backend/services/claude_service.py

Quickstart

Backend

cd backend
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env
uvicorn main:app --reload --port 8000

Frontend

cd frontend
npm install
npm run dev

Mobile

cd mobile
npm install
npm run start

Sample Contract Generator

python scripts/generate_sample_contract.py

Environment Variables

VariableRequiredDescription
ANTHROPIC_API_KEYYesAnthropic API key for Claude analysis
ANTHROPIC_MODELNoDefaults to claude-sonnet-4-20250514
MONGODB_URINoAsync MongoDB connection string
MONGODB_DATABASENoMongoDB database name
REDIS_URLNoRedis URL for SHA256 PDF deduplication
GOOGLE_CLIENT_IDNoGoogle OAuth client ID
JWT_SECRET_KEYYesSecret used to sign JWT access tokens
JWT_EXPIRE_MINUTESNoJWT expiration in minutes
CORS_ORIGINSNoComma-separated frontend origins
APP_ENVNoEnvironment label such as development or production

Author

Aditya Chaudhary (chaudhariaditya994-arch)

License

MIT License

Ver o original no GitHub

Bom para

Relacionados