Skip to content
PradhapkumarPublic

About

AI-powered Legal Judgment & Compliance Decision Support System converting court judgment PDFs into structured directives, deadlines, and verified action plans — FastAPI + React + PyMuPDF

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

CasePulse

AI-Powered Legal Judgment & Compliance Decision Support System

Converts lengthy, unstructured court judgment PDFs into structured legal directives, department assignments, deadlines, and human-verified action plans.

Python FastAPI React TailwindCSS Vite SQLite
PyMuPDF License


Overview

CasePulse is a full-stack AI Legal Decision Support platform built to help government officers and legal compliance teams process court judgment PDFs rapidly and accurately. Rather than manually reading dense multi-page orders, CasePulse automates PDF text/OCR extraction, identifies legal directives, maps responsible departments, detects compliance deadlines and risk scores, generates structured action plans with source evidence highlights, and routes them through human-in-the-loop verification and QR-accessible public case tracking.


System Architecture

Court Judgment PDF
        │
        ▼
  Upload & Ingestion (/api/upload)
        │
        ▼
  PDF & OCR Extraction (PyMuPDF + ocr_service)
        │
        ▼
  AI Legal NLP Pipeline (ai/extract, ai/scoring, ai/action)
  ├── Entity & Legal Section Extraction
  ├── Directive, Department & Deadline Detection
  ├── Confidence & Risk Scoring
  └── Structured Action Plan Generation
        │
        ▼
  Human Verification & Audit Trail (/api/verify, /api/audit)
        │
        ▼
  React Analytics Dashboard & QR Public Tracking

Key Capabilities

  • PDF Ingestion & OCR Extraction: Processes digital and scanned court judgment PDFs via PyMuPDF (pdf_service.py, ocr_service.py) with source snippet highlighting.
  • AI Legal Intelligence Engine (ai/ & backend/app/services/): Extracts entities and legal sections, classifies directives and action types, maps responsible departments, computes confidence & risk scores, and detects deadlines.
  • Human-in-the-Loop Verification & Feedback Learning: Allows legal reviewers to inspect source evidence, verify or edit generated actions (verification.py), log full audit trails (audit.py), and capture feedback (feedback_learning_service.py).
  • Interactive React Dashboard (frontend/): Built with React 18, Tailwind CSS, Framer Motion, and Recharts, featuring 13 views (Dashboard, Upload, Processing, CaseDetail, CaseSummary, Review, VerifiedActions, SearchCase, PublicCase) plus multilingual UI support (i18n/translations.js) and QR code sharing (qrcode.react).
  • 14 Modular FastAPI Routers: Covers auth, upload, extraction, action_plan, verification, dashboard, cases, case_summary, search, public, legal_analyzer, translation, ml, and audit.

Tech Stack

Layer Technologies
Frontend React 18.2, React Router DOM 6, Vite 4.4, Tailwind CSS 3.3, Framer Motion, Recharts, Lucide React, Axios, qrcode.react
Backend Python 3.10+, FastAPI, Uvicorn, SQLAlchemy, Pydantic, SQLite, python-multipart
AI & Document Processing Custom NLP/Entity/Keyword/Confidence modules (ai/), PyMuPDF (fitz), Legal Section & Risk Analyzers

Project Structure

CasePulse/
├── ai/                         # Standalone AI modules (entity extraction, keyword detection, confidence scoring, action builder)
├── backend/
│   ├── app/
│   │   ├── constants/          # Domain constants & mappings
│   │   ├── routes/             # 14 FastAPI routers (upload, extraction, action_plan, verification, dashboard, ml, etc.)
│   │   ├── services/           # 21 legal NLP, OCR, risk, deadline, translation & verification services
│   │   ├── database.py         # SQLAlchemy engine & session config
│   │   └── main.py             # FastAPI application entrypoint & DB seeding
│   ├── database/               # Seed data & database helpers
│   └── requirements.txt        # Backend Python dependencies
├── frontend/
│   ├── src/
│   │   ├── components/         # Reusable UI components
│   │   ├── pages/              # 13 React pages (Dashboard, Upload, Review, CaseSummary, PublicCase, etc.)
│   │   ├── services/           # Axios API clients
│   │   ├── i18n/               # UI translations
│   │   └── qr/                 # QR code generation & public verification views
│   └── package.json            # Frontend dependencies & Vite scripts
├── sample_data/                # Sample judgments, extracted text & mock dashboard data
├── storage/                    # Uploads, processed outputs & highlight snippets
├── LICENSE                     # MIT License
└── README.md                   # Project documentation

Getting Started

1. Backend Setup (FastAPI)

git clone https://github.com/Pradhapkumar/CasePulse.git
cd CasePulse/backend

pip install -r requirements.txt
uvicorn app.main:app --reload
  • API Base URL: http://127.0.0.1:8000
  • Interactive Swagger Docs: http://127.0.0.1:8000/docs

2. Frontend Setup (React + Vite)

cd ../frontend
npm install
npm run dev

Team — Cryptic Coders

Name Role
Prajitha Mary J AI & Full Stack Developer
Pradhapkumar S Backend Developer
Sneha Sree S Frontend Developer
Ragashree R UI/UX & Frontend
Saathvika N S Documentation & Testing

License

This project is licensed under the MIT License — see the LICENSE file for details.

About

AI-powered Legal Judgment & Compliance Decision Support System converting court judgment PDFs into structured directives, deadlines, and verified action plans — FastAPI + React + PyMuPDF

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages