Vaibhav More Logo
VAIBHAVMORE
COMPLETED / AI TOOL•
2024

AI Legal Assistant

Automated Contract Review & Compliance Analysis Engine

AI-powered document analysis system automating contract review, risk clause detection, and compliance summaries from PDFs/DOCX using Google Gemini.

GitHub Repository
Category

AI & Machine Learning, Full-Stack Web

Timeline

2024 Development

Primary Core

Flask (Python) • Google Gemini API

Platforms

Cross-Platform

PROJECT OVERVIEW & STRATEGY

Problem, Solution & Engineering Scope

The Industry Friction

Operational Challenges & Cloud Fragility

Reviewing lengthy legal contracts, non-disclosure agreements, and service agreements manually is tedious, expensive, and prone to overlooking hidden liability clauses.

The Architectural Solution

Offline-First Zero Latency Local Engine

Built a targeted AI contract analyzer that extracts clause categories (indemnification, termination, liabilities) and benchmarks them against standard terms.

Core Project Objectives
  • 1Reduces contract first-pass review from 30-60 minutes down to under 2 minutes per document
  • 2Automated extraction and risk clause highlighting across complex legal agreements
  • 3Integrates Google Gemini multimodal API for structured legal clause classification
  • 4Handles multi-page PDF and DOCX uploads with byte-safe parsing via pdfplumber
Target End-Users
  • Automotive Service Centers & Independent Garages
  • Spare Parts Retailers & Inventory Managers
  • Offline POS Operators needing Zero-Cloud Dependability
Architecture & Modules

Key System Capabilities

Engineered features and deep architectural implementations.

3 Modular Features

Document Parsing (PDF & DOCX)

Extracts formatted text, tables, and headers reliably using pdfplumber and python-docx.

Risk Clause Highlighting

Flags one-sided indemnification clauses, hidden penalty fees, and restrictive covenants.

Executive Summaries

Produces plain-language executive briefs outlining obligations, deadlines, and key terms.

Topology & Pipeline

System Architecture & Engineering Design

Flask-based microservice architecture that ingests uploaded documents, cleans and chunks legal text, issues structured prompt payloads to Google Gemini API, and formats the output into categorized risk tiers.

High-Level Distributed System
Interactive Architecture Map
Frontend / UI

Presentation Layer

User interface, client-side state handling, input sanitization, and responsive views.

Main / API

Application Core

Core domain logic, transaction coordinator, validation pipeline, and IPC/API endpoints.

Database

Persistence Layer

Normalized persistence layer with indexing, foreign key constraints, and transactional ACID safety.

Integrations

External Services

Third-party APIs, asynchronous cloud synchronization, document generators, and external webhooks.

Frontend Layer

User interface, client-side state handling, input sanitization, and responsive views.

Backend / Logic

Core domain logic, transaction coordinator, validation pipeline, and IPC/API endpoints.

Database Layer

Normalized persistence layer with indexing, foreign key constraints, and transactional ACID safety.

Integration Layer

Third-party APIs, asynchronous cloud synchronization, document generators, and external webhooks.

Under The Hood

Technology Stack & Core Tooling

Selected languages, frameworks, runtime environments, and engines.

7 Technologies Identified
Flask (Python) logo
Backend

Flask (Python)

Dynamic programming language utilized for data modeling, statistical ARIMA forecasting, and machine learning pipelines.

Integratedpython
GO
Tools

Google Gemini API

Engineered architecture using Google Gemini API

Integratedgooglegeminiapi
PD
Tools

pdfplumber

Engineered architecture using pdfplumber

Integratedpdfplumber
python-docx logo
Backend

python-docx

Dynamic programming language utilized for data modeling, statistical ARIMA forecasting, and machine learning pipelines.

Integratedpython
Tailwind CSS logo
Frontend

Tailwind CSS

Utility-first CSS framework enabling design token consistency, responsive layouts, and dark mode theming.

Integratedtailwindcss
JavaScript logo
Backend

JavaScript

Type-safe, multi-threaded enterprise programming language powering core business algorithms and transactional logic.

Integratedopenjdk
RE
Tools

RESTful API

Engineered architecture using RESTful API

Integratedrestfulapi
Problem Solving

Engineering Challenges & Technical Solutions

Complex bottlenecks, concurrency hurdles, and architectural decisions resolved during development.

1 Critical Engineering Trade-offs
Technical Resolution

Utilized pdfplumber's layout-aware text extraction routines to preserve paragraph flow.

Authorship & Ownership

Individual Contributions & Architectural Ownership

Core development, system architecture, database schema, and delivery milestones.

Engineered the Flask REST API and file processing pipeline

Constructed structured Gemini prompt templates with JSON output constraints

Designed the user interface with interactive risk pill badges and collapsible clause cards

Results & Metrics

Project Outcomes & Benchmarks

Accelerated legal document turnaround time by 90%, enabling users to quickly identify critical clauses before signing.

Next Case Studies

Explore Other Architectures

All Projects & Case Studies →
Automation & Utilities

AutoBillDrive

Offline-first desktop billing application for Windows with SQLite persistence, automated PDF generation, Google Drive sync, and WhatsApp delivery.

Explore Architecture
Full-Stack Web

EventApp

Production-ready event registration platform with Spring Boot 3.2, React 18, JWT RBAC, QR-code ticket generation, and async email confirmations.

Explore Architecture