How themukesh-dev/nometra works
Nometra is a mobile-oriented Legal Metrology inspection application. Inspectors capture package-label images, review image quality and extracted evidence, inspect compliance findings, record decisions, and access reports and inspection history. The backend scan endpoint coordinates image checks, dual-method extraction and rule evaluation, then returns a compliance report and persists inspection data. The README documents this API workflow; source excerpts do not expose every frontend request or report/history route, so those links are shown only where documented or directly evidenced.
Components 25
Inspector app
- Screen router
src/App.tsx - Inspection state
src/context/AppContext.tsx - Inspection history
src/screens/InspectionsScreen.tsx - Product history
src/screens/ProductHistoryScreen.tsx
Capture and evidence
- Image capture
src/screens/CaptureScreen.tsx - Image quality UI
src/screens/ImageQualityScreen.tsx - Evidence review
src/screens/EvidenceReviewScreen.tsx - Image quality checks
backend/ingestion/image_quality.py - Gemini extraction
backend/extraction/gemini_vision.py - OCR extraction
backend/extraction/ocr.py - Evidence fusion
backend/extraction/evidence_fusion.py
Compliance analysis
- Analysis screen
src/screens/AnalysisScreen.tsx - Category selection
src/screens/CategoryScreen.tsx - Compliance result
src/screens/ComplianceResultScreen.tsx - Inspector review
src/screens/InspectorReviewScreen.tsx - Report view
src/screens/ReportScreen.tsx - Commodity classification
backend/classification/categories.py - Rule evaluator
backend/engine/evaluator.py - Rule applicability
backend/applicability/conditions.py - Mandatory declarations
backend/rules/packaged_commodities/mandatory_declarations.py
Scan API and persistence
- Scan API
backend/api/scan.py - Compliance report
backend/reports/compliance_report.py - Inspection store
backend/database/inspections.py - Report API
backend/api/reports.py
Other components
- Inspector
Connections 31
- Inspector → Screen router: uses
src/App.tsx - Screen router → Inspection state: provides state
src/App.tsx - Screen router → Image capture: routes to
src/App.tsx - Screen router → Image quality UI: routes to
src/App.tsx - Screen router → Evidence review: routes to
src/App.tsx - Screen router → Analysis screen: routes to
src/App.tsx - Screen router → Category selection: routes to
src/App.tsx - Screen router → Compliance result: routes to
src/App.tsx - Screen router → Inspector review: routes to
src/App.tsx - Screen router → Report view: routes to
src/App.tsx - Screen router → Inspection history: routes to
src/App.tsx - Screen router → Product history: routes to
src/App.tsx - Image capture → Inspection state: updates
src/screens/CaptureScreen.tsx - Image quality UI → Inspection state: uses
src/screens/ImageQualityScreen.tsx - Evidence review → Inspection state: reads evidence
src/screens/EvidenceReviewScreen.tsx - Inspector review → Inspection state: uses decisions
src/screens/InspectorReviewScreen.tsx - Inspector review → Scan API: saves review
src/screens/InspectorReviewScreen.tsx - Inspection state → Scan API: submits scan
- Scan API → Image quality checks: checks image
backend/api/scan.py - Scan API → Gemini extraction: extracts fields
backend/api/scan.py - Scan API → OCR extraction: verifies text
backend/api/scan.py - Scan API → Evidence fusion: fuses evidence
backend/api/scan.py - Scan API → Commodity classification: classifies product
backend/api/scan.py - Scan API → Rule evaluator: evaluates rules
backend/api/scan.py - Rule evaluator → Rule applicability: checks applicability
backend/engine/evaluator.py - Rule evaluator → Mandatory declarations: evaluates declarations
- Scan API → Inspection store: stores inspection
backend/api/scan.py - Report API → Inspection store: reads inspections
backend/api/reports.py - Report view → Report API: requests report
- Inspection history → Scan API: loads history
- Product history → Scan API: loads product history