Skip to content

varshini-botla/LexiCore

Repository files navigation

LEXICORE: Premium Document Intelligence Platform

A high-performance, AI-driven legal workspace designed for precision analysis, structured summarization, and global document oversight. Built on a modular React architecture and powered by Google Gemini 1.5 Flash.


🏛️ Project Specification

Specification Details
Engine Google Gemini 1.5 Flash (LLM)
Architecture Component-Based Modular React
Parsing Layers PDF.js (Vector) / Tesseract.js (OCR)
Primary Methodology Structured Prompt Engineering (SPE)
Export Formats Professional PDF (jsPDF) / Standard TXT
Intelligence Multi-Language Global Translation (7+ Languages)
Legal Compliance MIT Licensed

🚀 Vision & Mission

LexiCore bridges the gap between raw document data and actionable intelligence. By leveraging advanced LLM synthesis, the platform transforms multi-page contracts, leases, and agreements into a single "Source of Truth," allowing legal professionals to identify risks and responsibilities in seconds rather than hours.


🧠 AI Methodology & Prompt Engineering

The "LexiCore Engine" utilizes a multi-stage Structured Prompt Engineering (SPE) strategy to ensure zero-hallucination outputs and high legal fidelity:

1. Contextual Ingestion

Rather than simple text extraction, the system preserves document hierarchy. Large documents (up to 35,000 words) are processed with a 1M+ Token Context Window, ensuring no cross-clause dependencies are missed.

2. Strict Schema Enforcement

Using Gemini’s native JSON Schema mode, we enforce a strict data structure. This ensures the AI always returns:

  • Numerical Risk Score (1-100): Calculated based on detected liabilities.
  • Critical Keyword Tags: Ranked by frequency and legal weight.
  • Multilingual Synthesis: Real-time translation without context loss.

3. Chain-of-Thought Review

The AI is instructed to perform internal "Chain-of-Thought" validation—cross-referencing risks against the executive summary before the final response is generated.


🏗️ System Architecture

graph TD
    A[Document Source] -->|PDF / Image / Text| B{Parsing Unified Layer}
    B -->|pdfjs-dist| C[Vectorized Text Extraction]
    B -->|tesseract.js| D[OCR Graphic-to-Text]
    C --> E[SPE Logic Layer]
    D --> E
    E -->|Structured Prompt| F[Google Gemini 1.5 API]
    F -->|JSON Result Map| G[React Component Infrastructure]
    G --> H[Analyzer Subsystem]
    G --> I[Global Search / Browse]
    G --> J[Persistence History]
    H --> K[Risk Profiler]
    H --> L[Professional PDF Generator]
Loading

🛠️ Premium Feature Set

Important

LexiCore is not just a summarizer—it is an Analytical Workspace.

  • Global Localization: Analyze documents in English, Spanish, Hindi, French, German, Japanese, or Chinese with a single click.
  • Advanced OCR Integration: High-fidelity text extraction from scanned images and handwritten notes via Tesseract.js.
  • Numerical Risk Profiling: A Circular Risk Meter quantifies document danger based on AI-detected liabilities.
  • Analytical History: Persistent session tracking using LocalStorage with one-click restore.
  • Corporate Reporting: Professional-grade PDF generation featuring branding, structured sections, and time-stamping.

⚙️ Engineering & Setup

1. Core Dependencies

The system relies on high-performance libraries for document lifecycle management:

  • React 19: Frontend Infrastructure.
  • Google Generative AI SDK: LLM Interface.
  • jsPDF: Document Generation.
  • Lucide-React: Elite Vector Iconography.

2. Local Configuration

# Clone & Initialize
git clone https://github.com/varshini-botla/LexiCore.git
cd LexiCore
npm install

# Configuration
# 1. Obtain Gemini API Key from Google AI Studio
# 2. Add to .env file
VITE_GEMINI_API_KEY=your_key_here

# Launch Development
npm run dev

📄 License & Compliance

Distributed under the MIT License. Educational Disclaimer: LexiCore is a tool for synthesis and analysis. It does not constitute legal advice.


Developed for the next generation of Legal Intelligence.

About

LexiCore is an elite document intelligence platform. It transforms complex legal texts into structured summaries with instant translation across 7+ languages, high-precision OCR, and automated risk scoring. Featuring a modular React architecture and professional PDF exports, it delivers boardroom-ready insights in seconds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors