AI-Powered Legal Intelligence & Statutory Grounding

LexGuard AI

Intelligent contract risk scoring, multi-statute Indian legal consultation, landmark precedent retrieval, and rapid emergency advisory powered by Gemini and Node.js.

System Overview

A full-stack legal intelligence platform engineered to demystify complex legal agreements and provide accessible legal awareness for individuals, startups, and SMBs under Indian law. Powered by Google Gemini 2.5 Flash via the official @google/genai SDK, LexGuard AI performs clause-by-clause contract risk auditing, multi-turn statutory consultations grounded in both modern and historical Indian legislation (BNS, BNSS, Indian Contract Act 1872, Consumer Protection Act), semantic search across 50 landmark judicial precedents, an emergency rights guide for law enforcement encounters, and automated emergency alert dispatching via SMTP, SMS, and Telegram.

The Problem

Legal documents, service contracts, and statutory compliance procedures in India are often opaque, dense, and prohibitively expensive for everyday individuals and early-stage founders to review. Citizens facing urgent situations (police detention, arbitrary FIRs, unfair tenant clauses) often lack immediate, actionable guidance on their statutory rights and landmark judicial protections.

The Solution

Architected a responsive, privacy-conscious legal copilot that parses raw contract text or uploaded documents to identify unfair terms, calculates a deterministic risk score (0–100), explains critical clauses in plain language, references relevant Indian statutes and Supreme Court precedents, and equips citizens with verified rights guides during emergencies — while maintaining a strict disclaimer that it serves as educational legal intelligence rather than licensed legal counsel.

Technologies Used

  • React 18
  • Vite 5
  • Tailwind CSS
  • Zustand
  • Lucide React
  • Axios
  • Node.js
  • Express
  • Helmet
  • CORS
  • express-rate-limit
  • Google Gemini API
  • @google/genai
  • Gemini 2.5 Flash
  • Structured JSON Output
  • Prompt Engineering
  • PostgreSQL
  • pg (node-postgres)
  • Connection Pooling
  • Relational Schemas
  • Nodemailer (SMTP)
  • Twilio / SMS Webhook
  • Telegram Bot API
  • Vercel Deployment