#84
Monthly Rank
#211
Lifetime Rank
Share
11 September 2026
NyayaTrace™ Audit Workbench

NyayaTrace™ Audit Workbench

"Turning thousands of scanned court documents into instant, organised and searchable reports for planning criminal defence

Arnav MathurGitHubWebsite
Open Source

Gallery

About the Project

NyayaTrace processes scanned, multi-page trial court files (like FIRs, Seizure Memos, and Panchnamas) and automatically checks them for procedural legal mistakes and physical impossibilities. It cleans up poor-quality document scans using OCR, extracts key dates, times, and places, and runs the entire case timeline through a rule-engine based on Indian statutory laws (BNSS, NDPS, IPC, BSA) and Supreme Court rulings.

The Problem It SolvesPiles of Messy Paperwork: Defense lawyers usually have to spend days reading hundreds of scanned paper pages to find timeline gaps. NyayaTrace extracts and organizes the whole bundle in seconds.

Overlooked Legal Violations: Human eyes miss subtle procedural slips. NyayaTrace automatically flags critical issues like seizures registered before an FIR, missing mandatory videography, or broken chain-of-custody seals.

Impossible Timelines: Proving that an officer couldn't physically be in two places at once usually requires manual distance tracking. NyayaTrace maps event locations automatically and calculates travel speeds to expose impossible movements.

Ready for Court documents and guides: Instead of dumping raw data, it generates clean Excel audit sheets and ready-to-use cross-examination guides for advocates in court.

Practice Areas

Key Features

Key Features

OCR Ingestion & Preprocessing (ingest.py): Ingests multi-page scanned PDFs and images, automatically deskewing and adjusting contrast to pull readable text from poor-quality trial court records.
ZIP

Timeline & Entity Parsing Engine (parser.py, legal_ai.py): Transforms raw text into structured event graphs, witness profiles, and chronological timelines stored in a local SQLite database (nyayatrace.db).
ZIP

21-Rule Deterministic Legal Audit Engine (rules.py): Evaluates case timelines against 21 statutory rules backed by landmark Supreme Court precedents:
ZIP

Critical Violations: Identifies pre-FIR seizures (CT-01), physical impossibility (CT-02), IO bilocation (CT-05), chain-of-custody seal breaks (CT-08), 24-hour magistrate production defaults (CT-09), NDPS Sec. 50 search consent defects (CT-12), Sec. 52A inventory certification gaps (CT-13), and statutory default bail breaches (CT-16).
ZIP

High/Medium Violations: Flags independent panch witness non-locality (CT-03), contraband weight discrepancies (CT-04), General Diary logging gaps (CT-06), FSL sample forwarding delays (CT-11), missing mandatory electronic videography (CT-19), and Test Identification Parade (TIP) delays (CT-21).
ZIP

Interactive GIS Bilocation Dashboard (app.py): Maps recorded event locations on an interactive visual dashboard, using Haversine formulas to compute travel times and highlight physically impossible speeds.
ZIP

Court-Ready Deliverable Exporter (export_report.py, generate_cheatsheet.py): Automatically exports styled Excel audit workbooks (NyayaTrace_Audit_Report.xlsx) and cross-examination cheat sheets (CrossExam_CheatSheet_*.md) for defense counsel.

Help Needed

Yes we are a team of one law student and one software engineer. While we had less than 2 days to create a demo for this competition. We do want to use our combined knowledge of the law and technology to make tools and products which can help law students, lawyers and academicians to research and organise their workflows better and help them in improving their efficiency. We are also in the process of making a legal-careers finder product which will help Indian law students find information and pathways about legal careers available within and outside India and make it easier for them to apply and connect with people who are already succesful in that field.

We would be grateful for feedback on Nyaya Assist and advice/collaboration on making the final product and we also request advice, collaboration and feedback on our future products.

About the Creator

AM
Arnav Mathur
Student at NLSIU
LinkedIn