About

LegalEase AI is a comprehensive, AI-powered platform designed to demystify complex legal documents by translating them into plain English using Google's cutting-edge Gemini 2.0 model. The platform goes beyond static document analysis by offering a built-in Chrome extension for real-time Google Meet transcription, a RAG-enhanced interactive AI chat for contextual querying, and multilingual voice support. It effectively makes enterprise-grade legal analysis and risk assessment accessible to everyone.

Tech Stack

Next.js 15
TypeScript
Google Gemini 2.0 Flash
Vertex AI Vector Search
text-embedding-004
Firebase Firestore
NextAuth.js
Socket.IO
Google STT & TTS
Chrome Extension API (Manifest V3)

Features

RAG-Powered Document Analysis

Upload contracts and agreements for AI analysis, automatic risk assessment, and plain English translation.

Real-Time Meet Transcription

A custom Chrome extension captures Google Meet audio and streams it via WebSockets for live legal topic analysis.

Interactive Contextual Chat

Query your documents using Retrieval-Augmented Generation (RAG). The AI remembers uploaded documents and their semantic content.

Semantic Vector Search

Find highly specific legal clauses across your entire document library using advanced vector similarity search.

Multilingual Voice Capabilities

Ask questions naturally using Speech-to-Text and listen to AI responses via Text-to-Speech, optimized for complex legal terminology.

Architecture

01

Client Layer

A Next.js web dashboard paired with a custom Manifest V3 Chrome Extension that injects into Google Meet for live audio capture.

02

Real-Time Pipeline

Socket.IO manages low-latency WebSocket connections, streaming transcription data instantly from the extension to the user's dashboard.

03

AI & Retrieval Engine

Document text is chunked, vectorized using Google's text-embedding-004, and indexed in Vertex AI. User queries trigger a hybrid search to feed into Gemini 2.0 for generation.

04

Data Layer

Firebase Firestore stores user profiles, document metadata, and chat histories, operating in tandem with the Vertex AI vector index.

05

API Routing

Robust backend endpoints (/api/analyze, /api/rag-query, /api/vector-search) orchestrate the flow between the UI, the vector database, and the Gemini APIs.

Future Improvements

Automated Contract Generation

Introduce a feature to generate standard legal agreements based on conversational prompts and dynamically retrieve approved clauses.

Multi-User Collaborative Workspaces

Enable teams to simultaneously annotate, review, and interact with the AI on the same document in real-time.

External Legal Database Integration

Connect the RAG pipeline to public legal databases to cross-reference clauses with active laws and provide citation checking.