Skip to content
tejas-coder28Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

240 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PRAMAAN-X

AI-Powered Regulatory Decision-Support Framework for AICTE Approval Document Scrutiny

Python 3.12 FastAPI 0.115.6 React 19 Vite 8 Tailwind CSS 3.4 Tests: 182 Passing Status: Advisory Only

Quick Links: Live Demo β€’ Presentation Pitch Deck β€’ Presentation Outline β€’ Full Evaluation Report β€’ 154-Element Audit Report β€’ Deployment Guide β€’ OCR Setup Guide


🌐 Live Production Demo

The PRAMAAN-X platform is live and operational on Render across three decoupled tiers:

Operational Tier Service Component Live Endpoint Health & Telemetry Technology Stack
Frontend Scrutiny Console pramaan-frontend.onrender.com Active React 19 + Vite + Tailwind CSS
Backend API Core Regulatory Gateway pramaan-backend-y3bl.onrender.com /health FastAPI + PostgreSQL + NetworkX
Mock Authority Statutory Issuer Service pramaan-mock-issuer.onrender.com /health FastAPI + 510-Record Registry

πŸ”‘ Demo Login Credentials: To evaluate immediately, log in as Scrutiny Officer using scrutiny.officer@aicte-india.org / AicteOfficer@2025 (additional roles detailed in Demo Accounts).


⚑ In 30 Seconds

  • The Problem: Over 10,000 technical institutions submit multi-document regulatory dossiers annually for AICTE Extension of Approval (EoA). Manual committee review faces an assumed baseline of 180 minutes per dossier, creating backlogs while struggling to catch cross-institution fraud (e.g. "ghost faculty" claimed concurrently in multiple colleges or facilities sharing identical photos across states).
  • Our Solution: PRAMAAN-X is an advisory decision-support platform that audits compliance dossiers in 2.03 seconds, highlights discrepancies with exact PDF bounding boxes, cross-references digital twins, and never automatically rejects an institution. Final statutory authority stays strictly with human scrutiny officers.
  • What Makes It Different:
    1. Regulation-as-Code: AICTE Approval Process Handbook (APH) clauses codified as declarative YAML with cohort "What-If" impact dry-runs.
    2. Impossibility Engine (NetworkX): Multi-institutional knowledge graph uncovering dual-employment collisions, land overlap, and chronological impossibilities.
    3. Photo Reuse Radar & Digital Forensics: 64-bit perceptual hashing (pHash), Error Level Analysis (ELA), and copy-move forgery detection.
    4. Tamper-Evident Verification Ledger: Append-only SHA-256 Merkle chain with asymmetric Ed25519 digital signatures and database triggers.
    5. Pluggable OCR Layer: Transparent multi-engine text extraction (lossless PyMuPDF text layer for digital vector PDFs; RapidOCR with OpenCV deskew/CLAHE for scans and images).

πŸ“Έ Screenshots Gallery & Interactive UI Tour

1. Primary Operational Scrutiny Views

Screen & Focus Screen & Focus
Scrutiny Dashboard
Risk-Ranked Scrutiny Queue: Real-time triage queue, KPI cards, anomaly severity distribution, and instant filter by deficiency type.
Evidence Lens
Evidence Lens (Split-Viewer): Synchronized PDF canvas with bounding-box OCR highlights, regulatory clause citations, and officer action drawer.
Pre-Flight Scorecard
Pre-Flight Readiness Scorecard: Self-service institutional portal with deficit radar, mandatory checklist tracking, and corrective hints.
Photo Reuse Radar
National Photo Reuse Radar: Interactive cluster graph discovering identical campus facilities and lab equipment claimed across separate colleges.

2. Deep Regulatory & Forensic Intelligence Views

Screen & Focus Screen & Focus
Impossibility Engine Graph
Impossibility Engine (vis-network): Relational twin graph flagging concurrent faculty dual-employment and spatial land plot overlap.
Document Intelligence
Document Ingestion & Forensics: Live PyMuPDF text parser, Error Level Analysis (ELA) heatmap scanner, and certificate integrity check.
Rules Catalog & What-If
Regulation-as-Code & What-If Simulator: Declarative YAML handbook rule editor with hot reload and cohort-wide failure simulation.
Geospatial Inspection Planner
Geospatial Inspection Planner: Risk-prioritized regional inspection itinerary clustering high-deficit colleges for surprise physical visits.
Manual Review Queue
Manual Review Queue: Dedicated workflow for ambiguous or degraded certificates requiring officer secondary determination.
Theme & Accessibility
National Institutional Design System: Accessible UI meeting WCAG 2.1 AA contrast standards with seamless Dark Mode support.

3. Live Pluggable OCR Scrutiny Evidence

Live Digital PDF (Text Layer) Live Scanned PDF (RapidOCR)
Live Digital PDF
PyMuPDF Text Layer: Vector text extraction displaying Engine: PyMuPDF text layer (mean confidence 99.0%).
Live Scanned PDF
RapidOCR on Degraded Scan: Raster PDF rendered at 250 DPI with OpenCV deskew displaying Engine: RapidOCR (mean confidence 96.7%).
Live Standalone Image (PNG / JPG) Live Institutional Pre-Flight Portal
Live Image Upload
RapidOCR on Image: Pure PNG certificate extracted via ONNX Runtime displaying Engine: RapidOCR (mean confidence 97.3%).
Live Pre-Flight
Pre-Flight Institutional Portal: Live backend connectivity (Live Backend green pill) showing active file ingestion.

4. Cryptographic Tamper-Detection Demonstration

PRAMAAN-X features an active mathematical verification ledger. The interactive tamper demo proves immediate severed-link detection if any record is mutated:

Step 1: Pristine Hash Chain Verified Step 2: Adversarial Mutation Trigger
Step 1: Pristine Hash Chain
All Blocks Authentic: SHA-256 Merkle chain and Ed25519 digital signatures verify authentic across all blocks.
Step 2: Adversarial Mutation Trigger
Tamper Simulation Modal: Evaluator injects an adversarial payload modification into Block #2.
Step 3: Cryptographic Link Breach Pinpointed Step 4: Pristine Ledger Restored & Re-Verified
Step 3: Cryptographic Link Breach Pinpointed
Link Severed: Modifying Block #2 payload instantly invalidates downstream Block #3 parent hash in red.
Step 4: Pristine Ledger Restored & Re-Verified
Restoration Verified: Re-verifying pristine ledger plays green validation animation and restores integrity.

5. Mobile Responsive Experience (Phones & Tablets)

PRAMAAN-X provides full responsive access across mobile viewports (360px–430px) and tablets (768px), with off-canvas navigation drawers, touch targets $\ge 44\times 44\text{px}$, responsive card transformations for triage queues, and zero horizontal scroll:

Mobile Dashboard & Triage Cards Off-Canvas Navigation Drawer
Mobile Dashboard
Mobile Scrutiny Dashboard: Compact 2-column KPI grid, mobile risk pills, and adaptive application cards with full touch targets.
Mobile Navigation Drawer
Mobile Slide-Out Drawer: Instant category navigation, active tab indicator, role badge, and backdrop-blur overlay.
Mobile Evidence Lens Mobile Photo Radar & Clustering
Mobile Evidence Lens
Mobile Evidence Lens: Stacked split-view with synchronized PDF viewport, clause citations, and one-tap officer actions.
Mobile Photo Radar
Mobile Photo Radar: Responsive reuse cluster analysis with comparative thumbnail cards and similarity metrics.

βš™οΈ How It Works: The 4-Step Pipeline

  1. INGEST & EXTRACT           2. MULTI-ENGINE SCRUTINY        3. AUTHORITY LOOKUP         4. RECEIPT & DECISION
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Compliance Dossier   β”‚ ───► β”‚ β€’ Regulation-as-Code      β”‚ ─►│ Mock Statutory Issuer │──►│ β€’ Ed25519 Signed Receipt β”‚
β”‚ β€’ 5 Statutory PDFs   β”‚      β”‚ β€’ Impossibility Engine    β”‚   β”‚ β€’ State Fire Services β”‚   β”‚ β€’ Bounding Box Evidence  β”‚
β”‚ β€’ Pluggable OCR Layerβ”‚      β”‚ β€’ Photo Radar & Forensics β”‚   β”‚ β€’ Land Revenue        β”‚   β”‚ β€’ Officer Review & Actionβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Document Ingestion & Field Extraction (backend/app/services/ocr/, backend/app/services/):
    Ingests statutory compliance PDFs and images (Fire NOC, Land Deed, Affiliation, Building Plan, Affidavit). The pluggable OCR layer routes digital PDFs through PyMuPDF text layer (lossless vector extraction) and scans/images through RapidOCR (rapidocr-onnxruntime with OpenCV deskew/CLAHE). Deterministic regex extractors parse sanctioned intake, carpet areas, survey numbers, and validity dates with bounding boxes ($F_1: 0.9013$ on held-out Seed 7; $F_1: 0.969$ on scanned benchmark).
  2. Multi-Engine Scrutiny & Cross-Institution Analysis (backend/app/rules/, backend/app/services/):
    • Evaluates 12 declarative APH handbook rules (FSR 1:20, carpet area $\ge 10.5\text{ m}^2/\text{student}$, cadre ratios).
    • Projects colleges into an in-memory NetworkX digital twin to detect faculty sharing (Ghost Faculty) and pre-dated certificates.
    • Computes 64-bit image perceptual hashes (pHash) to discover identical campus facilities claimed across institutions.
  3. Statutory Authority Cross-Verification (mock_issuer/, backend/app/services/connectors/):
    Dispatches record lookups against state authorities (Fire Services, Affiliating University, Land Revenue/Bhoomi, NBA). Performs QR payload parsing (pyzbar) and PDF digital signature byte-range structural inspection.
  4. Receipt Minting & Human Officer Determination (backend/app/services/, backend/app/api/):
    Mints an asymmetric RFC 8032 Ed25519-signed verification receipt appended to a SHA-256 Merkle chain. Surfaces findings on the Evidence Lens for officer determination; mandatory justification comments are enforced on any adverse action.

πŸ—οΈ System Architecture

Logical Service Blueprint & Dataflow Live Multi-Tier Architecture & Node Inspector
Logical Service Blueprint
Analytical Core Topology: FastAPI gateway orchestrating the 6 statutory engines, SQLite/PostgreSQL persistence, and local mock statutory issuer.
Live Multi-Tier Architecture
Interactive System Inspector: Live tier inspection with performance SLAs, service interfaces, technology stacks, and statutory safeguards.
flowchart TB
    subgraph CLIENT["Presentation Layer"]
        UI["React 19.3.1 + Tailwind CSS + Vite<br/>11 Scrutiny Views β€’ Evidence Lens β€’ vis-network"]
    end

    subgraph API["API Gateway & Security"]
        GATEWAY["FastAPI 0.115.6 Gateway<br/>85 Endpoints β€’ JWT Bearer β€’ RBAC β€’ Tenant Isolation"]
    end

    subgraph ENGINES["6 Analytical & Forensic Engines"]
        direction TB
        E1["Checklist Engine<br/>Application Category Schemas"]
        E2["Pluggable OCR & Extraction Engine<br/>PyMuPDF Text Layer + RapidOCR (eng)"]
        E3["Regulation-as-Code Engine<br/>12 APH Rules & Cohort What-If Sim"]
        E4["NetworkX Impossibility Engine<br/>Multi-Campus Twin & Ghost Faculty"]
        E5["Forensics & Photo Radar<br/>ELA, Copy-Move, 64-bit pHash (Hamming <= 10)"]
        E6["Verification Ledger Engine<br/>Ed25519 Receipts & SHA-256 Merkle Chain"]
    end

    subgraph ISSUER["Statutory Verification Gateway"]
        MOCK["Mock Statutory Issuer (Port 8001)<br/>510 Authority Records (Fire, University, Revenue, NBA)"]
    end

    subgraph DATA["Data & Persistence Layer"]
        DB[("SQLite Local / PostgreSQL Compose<br/>Append-Only DB Triggers")]
        RULES["Declarative YAML Packs<br/>aicte_aph_2025.yaml"]
        GRAPH["In-Memory Twin Graph<br/>NetworkX MultiDiGraph"]
    end

    UI -->|HTTP / JSON REST| GATEWAY
    GATEWAY --> ENGINES
    E1 & E2 & E3 & E4 & E5 & E6 <--> DATA
    E1 & E3 & E6 <-->|Local Authority Verification| MOCK
Loading

Evidence Lens Regulatory Traceability Flow

sequenceDiagram
    autonumber
    actor Officer as Scrutiny Officer
    participant UI as Evidence Lens UI
    participant Core as Scrutiny Pipeline
    participant Rule as Regulation-as-Code
    participant Issuer as Mock Statutory Issuer
    participant Ledger as Receipt Ledger

    Officer->>UI: Selects Institutional Dossier
    UI->>Core: Fetch Extracted Claims & Bounding Boxes
    Core->>Rule: Evaluate APH Handbook Rules (FSR, Density, NOC Age)
    Core->>Issuer: Query Authority Record (/verify/authority/id)
    Issuer-->>Core: Registry Match (Verified / Mismatch / Expired)
    Core->>Ledger: Mint Ed25519 Signed Verification Receipt
    Ledger-->>Core: Block Appended to SHA-256 Merkle Chain
    Core-->>UI: Render Claim βž” Evidence βž” Rule Citation βž” Source Status
    Officer->>UI: Select Action (Approve / Reject / Seek Clarification) + Mandatory Comment
    UI->>Ledger: Commit Officer Determination (No Auto-Rejection)
Loading

πŸ“Š Benchmark Results & Performance Charts

All quantitative figures below are extracted directly from evidence_pack/metrics.json and docs/evaluation_report.md.

Metric Dimension Measured Value Benchmark Context
Held-Out Test Set 100 institutions / 500 documents Seed 7 held-out test split (calibrated on Seed 42)
Planted Defect Cases 240 positive cases Distributed across 20 distinct statutory violation categories
Clean Control Cases 57 clean cases 55 True Negatives, 2 False Positives (conservative flags on noisy scans)
True Positives (TP) / False Negatives (FN) TP: 240 / FN: 0 100.0% Recall across all 20 statutory defect categories
False Positives (FP) / True Negatives (TN) FP: 2 / TN: 55 0.0351 False-Positive Rate (FPR: 3.51%)
Defect Detection Precision 0.9917 (99.17%) $240 / (240 + 2)$
Defect Detection F1-Score 0.9959 Harmonic mean of precision (0.9917) and recall (1.0000)
Held-Out Field Extraction Macro F1 0.9013 Macro average across 6 statutory certificate fields on Seed 7
Held-Out Field Extraction Micro F1 0.8596 Global micro $F_1$ ($TP: 199, FP: 38, FN: 27$)
Scanned/OCR Path Macro F1 (20-Doc Benchmark) 0.969 (Digital: 0.982) RapidOCR evaluated on pure raster degraded scans vs PyMuPDF vector text
Automated Test Suite Status 182 / 182 passing (100%) 15 test suites across backend/tests and mock_issuer (+ 7 in backend/test_api.py = 189 tests total)
Automated Pipeline Processing Time 2.03 seconds Measured mean runtime across 6 evaluation stages
Alert Dispatch Latency Mean: 3.21 ms / Median: 3.20 ms In-app WebSocket notification and event bus latency

⚠️ Important Disclosure: Synthetic benchmark (calibrated on Seed 42, evaluated on locked held-out Seed 7), not field accuracy on live production AICTE filings. The 180-minute manual scrutiny baseline is an assumed operational comparison, not an empirically timed study.

Slide-Ready Evaluation Visualizations

Extraction Accuracy per Field Defect Accuracy Across 20 Categories
Field Extraction
Macro $F_1$: 0.9013 across certificate numbers, dates, acreage & surveys.
Defect Detection
100.0% Recall across all 20 planted defect categories (240/240).
2.03s vs 180m Manual Baseline Photo Radar & Anomaly Distribution
Processing Speedup
Automated pipeline turnaround of 2.03s per full dossier.
Radar & Anomaly
pHash precision: 0.8824, recall: 1.0000; anomaly precision: 0.9917.
Click to view Complete 20-Category Defect Coverage Breakdown (from evidence_pack/defect_coverage.csv)
# Defect Identifier Planted Detected Missed Accuracy Detection Module & Mechanism
1 expired_document 19 19 0 100.0% Rule Engine: RULE_FIRE_NOC_VALIDITY (Cl 6.3.2) cutoff date check
2 missing_signature_field 22 22 0 100.0% Forensics / Connector: DigitalSignatureConnector notary check
3 wrong_institution_name 15 15 0 100.0% Rule Engine: RULE_NAME_MATCH_AFFIDAVIT_NOC (token similarity < 0.85)
4 shared_document_reference_number 3 3 0 100.0% Impossibility Engine: Multi-dossier reference ID collision
5 faculty_duplicate_across_institutions 21 21 0 100.0% Impossibility Engine: Ghost Faculty cross-college PAN/Aadhaar collision
6 area_too_small_for_intake 17 17 0 100.0% Rule Engine: RULE_BUILT_UP_AREA_PER_STUDENT (< 10.5 sqm/student)
7 date_before_issuer_existed 21 21 0 100.0% Impossibility Engine: Temporal causal check (issue date predates issuer)
8 inverted_validity_interval 3 3 0 100.0% Forensics: Temporal validator (issue date postdates expiry date)
9 reused_photo 42 42 0 100.0% Photo Reuse Radar: 64-bit pHash Hamming distance ($\le 10$)
10 missing_exif_metadata 21 21 0 100.0% Forensics: EXIF inspector (camera make, timestamp, GPS tags missing)
11 pdf_metadata_producer_anomaly 3 3 0 100.0% Forensics: PDF structural scan (Ghostscript/iText trailer tampering)
12 font_inconsistency_in_region 3 3 0 100.0% Forensics: Typography uniformity scan (font family and size anomaly)
13 error_level_analysis_spliced_patch 3 3 0 100.0% Forensics: Error Level Analysis compression artifact variance (> 0.65)
14 copymove_cloned_seal 3 3 0 100.0% Forensics: ORB keypoint duplicate stamp and seal matcher
15 qr_ocr_reference_mismatch 3 3 0 100.0% Forensics: QrDecodeConnector (pyzbar) vs OCR extracted certificate ID
16 sun_shadow_angle_discrepancy 3 3 0 100.0% Proof-of-Reality: sun_shadow_service (pvlib solar ephemeris vs shadow)
17 built_up_area_footprint_discrepancy 3 3 0 100.0% Proof-of-Reality: built_up_area_service (satellite polygon vs claim)
18 lab_equipment_inconsistent 2 2 0 100.0% Impossibility Engine: Equipment inventory serial number collision
19 mismatched_reference_number 20 20 0 100.0% Rule Engine: RULE_SURVEY_NUMBER_CONSISTENCY (Cl 7.2.1) cross-check
20 edited_amount 13 13 0 100.0% Rule Engine / Forensics: Leasehold tenure (< 30 years) and area statement

πŸ›‘οΈ Statutory Safeguards & Verifying Tests

PRAMAAN-X strictly upholds statutory administrative fairness principles. Automated checks never issue punitive verdicts.

Safeguard Policy Code Implementation Verifying Test Suite & File Path
No Automatic Rejection
Adverse determination requires officer action with mandatory comment
models.py:140-155
Empty comment rejected with HTTP 400
test_no_automatic_rejection_rule
backend/tests/test_rbac_and_endpoints.py:182
test_adverse_status_impossible_without_officer_action
backend/tests/test_rectification_and_features.py:263
RBAC & Tenant Isolation
5 roles; colleges cannot see other colleges' dossiers
security.py, auth.py
Institutional query scoping
test_login_all_5_roles
backend/tests/test_rbac_and_endpoints.py:70
test_institution_user_cannot_view_other_institution_data
backend/tests/test_rbac_and_endpoints.py:112
PII Data Masking
Masks national PAN / Aadhaar for officers and auditors
field_extraction.py:32
mask_pan and mask_aadhaar
test_pii_masking_for_officers_and_auditors
backend/tests/test_rbac_and_endpoints.py:284
Sensitive Access Logging
Audit log entry recorded on all sensitive reads
models.py
AuditLog table with timestamp
test_access_logging_for_sensitive_reads
backend/tests/test_rbac_and_endpoints.py:320
Advisory Language Mandate
Strict non-punitive wording ("Indicator for review")
Hardcoded policy in pipeline services
Prohibits verdict terms
test_mandatory_advisory_caveat
backend/tests/test_sun_shadow_plausibility.py:199
Tamper-Evident Ledger Security
Append-only ledger with cryptographic hash chaining
verification_receipts.py
Ed25519 signatures, DB triggers
test_tamper_detection_content_modification
backend/tests/test_verification_receipts.py:90
test_database_trigger_blocks_direct_sql_mutation
backend/tests/test_verification_receipts.py:130

πŸ” What is Real vs. Simulated

We believe in complete technical transparency with Hackathon evaluators.

Component / Capability Implementation Reality Current Repository State
Text Stream Extraction REAL PyMuPDF (fitz) direct stream parsing + deterministic regex boundary normalizers.
Regulation-as-Code REAL Declarative YAML parser, JSON Schema pack validator, and cohort What-If simulation.
Impossibility Engine REAL In-memory NetworkX graph analyzing dual employment, spatial overlap, and chronology.
Photo Reuse Radar REAL (pHash) / SIMULATED (Vector) Perceptual 64-bit imagehash (pHash/dHash) is real. OpenCLIP 512-dim cosine similarity is simulated via projection matrices.
Digital Forensics REAL Error Level Analysis (ELA), copy-move keypoint matching, and PDF metadata inspection.
QR Code Extraction REAL Native 2D barcode rasterization and decoding via pyzbar and OpenCV.
Digital Signatures HYBRID PDF /ByteRange structural integrity inspection is real. X.509 PKI trust anchor chain validation is a stub.
Verification Receipts REAL Asymmetric Ed25519 digital signatures (RFC 8032) and SHA-256 Merkle chain with SQLite/Postgres DB triggers.
Statutory Authority Gateways SIMULATED Local Mock Statutory Issuer (127.0.0.1:8001) with 510 pre-seeded JSON records. Live API Setu and DigiLocker are not integrated.
OCR for Scans & Images REAL (PyMuPDF + RapidOCR English-only) Installed and verified on this machine: PyMuPDF text layer (digital vector PDFs) + RapidOCR (rapidocr-onnxruntime==1.4.4, English only) with OpenCV preprocessing. Tesseract binary is NOT installed on this host (optional fallback when tesseract.exe is found).
APH 2025-26 Rule Parameters PLACEHOLDERS All 12 rule parameters in aicte_aph_2025.yaml are engineering placeholders awaiting gazetted sign-off.
Docker Compose VALIDATED / NOT VERIFIED docker-compose.yml validates syntactically; runtime container build was not verified locally due to inactive daemon.
Manual Scrutiny Baseline ASSUMED The 180.0 min manual review baseline is an assumed benchmark figure, not an empirical time study.

πŸ” Pluggable OCR Architecture for Scans & Images

PRAMAAN-X features a unified pluggable OCR layer (backend/app/services/ocr/):

  1. PyMuPDF Text Layer: Used when a PDF page contains embedded vector text (lossless character stream, 0.990 confidence).
  2. RapidOCR (rapidocr-onnxruntime==1.4.4): Pip-installable deep learning OCR engine (installed & verified on this host, English only), requiring zero external native C++ binary installers. Includes OpenCV preprocessing (deskew via minAreaRect, CLAHE contrast enhancement).
  3. Tesseract 5.x: Autodetected via TESSERACT_PATH, Windows default (C:\Program Files\Tesseract-OCR\tesseract.exe), or system PATH. Note: Tesseract binary is NOT installed on this Windows host; RapidOCR provides the primary image extraction.
  4. Graceful Fail-Safe: If no engine is available for an image, returns status: "ocr_unavailable" with an explicit error banner rather than silent empty text. Low-confidence extractions automatically route to the Manual Review Queue.

Operational Limitations & Caveats:

  • Handwriting: Handwritten signatures, marginalia, and endorsement notes are not recognized by the printed OCR models and are flagged for Scrutiny Officer manual review.
  • Extreme Scan Degradation: Severely crumpled, torn, or low-resolution scans (< 100 DPI) produce lower confidence and are safely diverted to manual review.
  • Regional Languages: Hindi (hin), Kannada (kan), and Tamil (tam) require their respective .traineddata models installed in Tesseract's tessdata directory. RapidOCR currently operates on default English recognition weights.
  • Synthetic Benchmark Caveat: Standard benchmark evaluations are conducted on synthetically generated certificates calibrated to AICTE APH 2025-26 statutory clauses.

πŸš€ Quick Start Guide

Prerequisites

  • Python 3.12+
  • Node.js 18+ and npm

1-Click Launch (Recommended)

Run the automated launcher from repository root:

# Windows:
run_all.bat

run_all.bat automatically launches the Mock Issuer (8001), FastAPI Backend (8000), and Vite Frontend (5173), then opens the browser.

Manual Step-by-Step Launch

If launching services individually across terminal windows:

# Terminal 1: Mock Statutory Issuer Gateway (Port 8001)
python -m uvicorn mock_issuer.app.main:app --host 127.0.0.1 --port 8001

# Terminal 2: FastAPI Backend API (Port 8000)
python -m uvicorn backend.app.main:app --reload-dir backend --host 127.0.0.1 --port 8000

# Terminal 3: Vite React Frontend (Port 5173)
cd frontend && npm run dev -- --host 127.0.0.1 --port 5173

Then open: http://localhost:5173

πŸ’‘ Troubleshooting: If you see ECONNREFUSED 127.0.0.1:8000, the FastAPI backend process has stopped or has not completed initialization. Confirm port 8000 is open.


πŸ‘₯ Demo Accounts (Synthetic Testing Credentials)

The system provides 5 mock role presets populated with synthetic data:

Role Title Email Credential Password Primary Accessible Scope
Scrutiny Officer scrutiny.officer@aicte-india.org AicteOfficer@2025 Desk scrutiny queue, Evidence Lens, bounding-box review
Regional Officer regional.officer@aicte-india.org AicteRegional@2025 Regional escalations, approvals, What-If cohort simulations
Central Admin admin@aicte-india.org AicteAdmin@2025 Rule catalog editor, handbook parameter hot-reload, users
Independent Auditor auditor@aicte-india.org AicteAuditor@2025 Read-only tamper-evident audit ledger and cryptographic receipts
Institution User registrar@apextech.edu.in ApexPass@2025 Apex Institute of Technology dossier, Pre-Flight Scorecard

Note: All credentials above are mock accounts intended for evaluation and demonstration.


πŸ’» Tech Stack & Repository Structure

Core Technologies

  • Frontend: React 19.3.1, Vite 8.3.4, Tailwind CSS 3.4.19, vis-network 10.1.3, Lucide Icons
  • Backend API: FastAPI 0.115.6, Uvicorn 0.34.0, Pydantic 2.10.4, SQLAlchemy 2.0.36
  • Analytical & Graph: NetworkX 3.4.2, PyMuPDF 1.25.1, RapidOCR 1.4.4, ONNX Runtime 1.31.1, imagehash 4.3.1, OpenCV, Shapely, pvlib
  • Security & Integrity: Asymmetric Ed25519 (cryptography), SHA-256 Merkle chain, SQLite DB triggers
  • Python Environment: CPython 3.12.8 (64-bit)

Repository Directory Tree

SIH_AKXY/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/             # 85 REST API endpoints across 10 routers
β”‚   β”‚   β”œβ”€β”€ core/            # JWT authentication, RBAC policy, DB session
β”‚   β”‚   β”œβ”€β”€ models/          # SQLAlchemy schemas (Dossiers, Receipts, AuditLog)
β”‚   β”‚   β”œβ”€β”€ rules/           # AICTE APH 2025-26 YAML rule packs & JSON schemas
β”‚   β”‚   └── services/        # 6 core engines (Extraction, OCR, Forensics, Radar, Twin)
β”‚   β”œβ”€β”€ tests/               # 14 automated test suites (173 tests)
β”‚   └── test_api.py          # Integration endpoint test suite (7 tests)
β”œβ”€β”€ mock_issuer/             # Mock Statutory Issuer service on port 8001 (9 tests)
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # EvidenceLens, PhotoRadar, Navbar, BoundingBoxViewer
β”‚   β”‚   β”œβ”€β”€ pages/           # 11 scrutiny screens (Dashboard, Preflight, Ledger)
β”‚   β”‚   └── services/        # API client and cold-start retry connectors
β”‚   └── package.json
β”œβ”€β”€ synthetic_generator/     # Synthetic dossier & photo defect generation tools
β”œβ”€β”€ generated_data/          # Ground truth CSVs, catalogs, and test PDFs
β”œβ”€β”€ evidence_pack/           # Ground truth metrics.json, defect_coverage.csv, reports
β”œβ”€β”€ docs/                    # Architecture diagrams, screenshots, reports, presentations
β”‚   β”œβ”€β”€ presentation/        # Slide deck (.pptx and .pdf)
β”‚   β”œβ”€β”€ DEPLOY.md            # Multi-tier deployment & operations guide
β”‚   └── AUDIT_REPORT.md      # 154-element end-to-end verification audit report
β”œβ”€β”€ tools/                   # Smoke verification & deployment testing scripts
β”œβ”€β”€ scripts/                 # Maintenance and demo database reset scripts
β”œβ”€β”€ docker-compose.yml       # Production multi-tier container composition
β”œβ”€β”€ render.yaml              # Infrastructure-as-Code blueprint for Render
β”œβ”€β”€ run_all.bat              # 1-click Windows full-stack launcher
└── README.md

Running the Test Suite

To execute the automated regression test suite:

# Run all tests across backend and mock issuer:
$env:PYTHONPATH="."; pytest backend/tests mock_issuer/test_mock_issuer.py -q

Expected Result: 182 passed in backend/tests and mock_issuer (+ 7 in backend/test_api.py = 189 tests passed total).


πŸ—ΊοΈ Phased Implementation Roadmap

  • Phase 1: Regulatory Calibration: Formal Gazette of India sign-off on the 12 Approval Process Handbook (APH) rule parameters and cutoff tolerances.
  • Phase 2: Authorized Scrutiny Pilot: Controlled pilot deployment on anonymized historical dossiers across select AICTE Regional Offices.
  • Phase 3: Production Authority Binding: Integration with live API Setu and DigiLocker production gateways; replacement of mock issuer.
  • Phase 4: Multilingual OCR Deployment: Packaging regional language traineddata (Hindi, Kannada, Tamil) with TrOCR/Tesseract models.
  • Phase 5: National Rollout: Phased migration across all regional scrutiny cells with HSM-backed Ed25519 signing keys.

πŸ† Team AnomalyX & Statutory Disclaimer

  • Hackathon: Smart India Hackathon (SIH) 2026
  • Problem Statement: SIH26261 β€” AI-Powered Regulatory Scrutiny & Compliance Automation
  • Organization: All India Council for Technical Education (AICTE), Ministry of Education, Govt. of India
  • Team: AnomalyX

βš–οΈ Statutory Notice & Disclaimer: PRAMAAN-X is an academic research prototype developed for Smart India Hackathon 2026. All evaluation data and institutional filings are synthetic. PRAMAAN-X operates strictly as an advisory decision-support system and does not issue final statutory accreditation determinations.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages