How sustik78/sih_2026 works
PRAMAN AI is a government-facing legal-metrology inspection platform. An inspector signs in, submits a package image or sample in the scan studio, and receives extracted declarations, statutory rule findings, a score, and visual evidence; the completed inspection is stored for later review and report export. The graph preserves the documented product, rule-library, analytics, audit, accessibility, and role-based access capabilities. Pipeline ordering follows the scan-route documentation; unsampled route and page internals limit some finer-grained wiring.
Main entry points: api.js Frontend API client · App.jsx Application shell · scan_routes.py Scan orchestration · database.py Application database
Components 32
Inspector application
- Application shell
frontend/src/App.jsx - Sign-in
frontend/src/pages/LoginPage.jsx - Auth context
frontend/src/context/AuthContext.jsx - Accessibility settings
frontend/src/context/AccessibilityContext.jsx - Scan studio
frontend/src/pages/ScanStudioPage.jsx - Inspection views
frontend/src/pages/InspectionDetailPage.jsx - Dashboard
frontend/src/pages/DashboardPage.jsx - Inspection history
frontend/src/pages/InspectionHistoryPage.jsx - Product repository
frontend/src/pages/ProductRepositoryPage.jsx - Rule library
frontend/src/pages/RuleLibraryPage.jsx - Audit trail view
frontend/src/pages/AuditTrailPage.jsx - Frontend API client
frontend/src/utils/api.js
Inspection pipeline
- Image preprocessing
backend/app/ai_engine/preprocessor.py - OCR detection
backend/app/ai_engine/ocr_engine.py - Declaration extraction
backend/app/ai_engine/declaration_extractor.py - Rule evaluation
backend/app/compliance_engine/engine.py - Statutory rule definitions
backend/app/compliance_engine/rule_definitions.py - Compliance scoring
backend/app/compliance_engine/scoring.py - Visual evidence
backend/app/ai_engine/visual_evidence.py - Scan orchestration
backend/app/routes/scan_routes.py
Access and records
- Authentication API
backend/app/routes/auth_routes.py - Token and access control
backend/app/auth.py - Domain records
backend/app/models.py - Application database
backend/app/database.py - API application
backend/app/main.py
Review and outputs
- Inspection records API
backend/app/routes/inspection_routes.py - Products and rules API
backend/app/routes/product_routes.py - Analytics API
backend/app/routes/analytics_routes.py - Reports and audit API
backend/app/routes/report_routes.py - PDF report generator
backend/app/reports/pdf_report.py - DOCX report generator
backend/app/reports/docx_report.py
Other components
- Inspector
Connections 48
- Inspector → Application shell: uses
- Application shell → Sign-in: renders
- Application shell → Scan studio: routes to
- Application shell → Inspection views: routes to
- Application shell → Dashboard: routes to
- Application shell → Inspection history: routes to
- Application shell → Product repository: routes to
- Application shell → Rule library: routes to
- Application shell → Audit trail view: routes to
- Application shell → Auth context: provides context
- Application shell → Accessibility settings: provides context
- Sign-in → Auth context: signs in through
- Auth context → Frontend API client: submits credentials
- Scan studio → Frontend API client: submits scan
- Inspection views → Frontend API client: requests details
- Inspection history → Frontend API client: requests history
- Dashboard → Frontend API client: requests analytics
- Product repository → Frontend API client: searches products
- Rule library → Frontend API client: requests rules
- Audit trail view → Frontend API client: requests logs
- Frontend API client → Authentication API: calls
- Frontend API client → Scan orchestration: calls
- Frontend API client → Inspection records API: calls
- Frontend API client → Products and rules API: calls
- Frontend API client → Analytics API: calls
- Frontend API client → Reports and audit API: calls
- Scan orchestration → Image preprocessing: preprocesses image
- Scan orchestration → OCR detection: runs OCR
- Scan orchestration → Declaration extraction: extracts declarations
- Scan orchestration → Rule evaluation: evaluates compliance
- Scan orchestration → Compliance scoring: scores results
- Scan orchestration → Visual evidence: builds overlays
- Rule evaluation → Statutory rule definitions: evaluates against
- Scan orchestration → Domain records: persists inspection
- Scan orchestration → Application database: writes records
- Authentication API → Token and access control: authenticates
- Authentication API → Application database: reads and writes
- Inspection records API → Application database: queries records
- Products and rules API → Application database: queries catalog
- Products and rules API → Statutory rule definitions: serves rule library
- Analytics API → Application database: queries metrics
- Reports and audit API → Application database: loads inspection data
- Reports and audit API → PDF report generator: generates PDF
- Reports and audit API → DOCX report generator: generates DOCX
- Reports and audit API → Domain records: reads audit records
- API application → Authentication API: registers routes
- API application → Scan orchestration: registers routes
- API application → Inspection records API: registers routes