How parts345/metrologyguard-v2-sih2026 works
MetrologyGuard is a packaged-commodities compliance platform for enforcement and review teams. An officer creates an inspection, supplies product details and package-image evidence, then starts analysis; the API persists the record and image, calls the internal OCR/model service, and applies compliance rules. The resulting evidence and violations can be reviewed by an authorised user and exported as traceable PDF or editable DOCX reports. The web app also supports dashboards, calendars, comparison, and product, violation, report, and rules repositories. Unsampled routes and pages are included only where the README or tree establishes their role.
Main entry points: App.tsx React application · server.ts HTTP orchestration · api.ts API client · main.py Inference gateway
Components 17
Operations interface
- React application
apps/web/src/App.tsx - Inspection workflow
apps/web/src/pages/NewInspectionPage.tsx - Inspection evidence
apps/web/src/pages/InspectionDetailPage.tsx - Operational views
apps/web/src/pages/DashboardPage.tsx - Compliance repositories
apps/web/src/pages/RepositoryPages.tsx - Calendar and comparison
apps/web/src/pages/CalendarPage.tsx - Navigation and search
apps/web/src/components/AppShell.tsx - API client
apps/web/src/services/api.ts
Compliance API
- HTTP orchestration
apps/api/src/server.ts - Compliance rules
apps/api/src/rules.ts
Image assessment
- Inference gateway
services/ml-service/main.py - OCR and field extraction
services/ml-service/model_bundle/predictor.py
Records and outputs
- SQLite records
apps/api/src/db.ts - Image evidence files
storage/uploads - Report generation
apps/api/src/reporting.ts - Generated reports
storage/reports
Other components
- Officer or reviewer
Connections 21
- Officer or reviewer → React application: uses
- React application → Inspection workflow: routes to
- React application → Inspection evidence: routes to
- React application → Operational views: routes to
- React application → Compliance repositories: routes to
- React application → Calendar and comparison: routes to
- React application → Navigation and search: renders
- Inspection workflow → API client: submits requests
- Inspection evidence → API client: loads records
- Compliance repositories → API client: loads records
- Navigation and search → API client: searches records
- API client → HTTP orchestration: sends HTTP requests
- HTTP orchestration → SQLite records: reads and writes
- HTTP orchestration → Image evidence files: stores and reads images
- HTTP orchestration → Inference gateway: sends image for analysis
- Inference gateway → OCR and field extraction: runs prediction
- Inference gateway → HTTP orchestration: returns inference result
- HTTP orchestration → Compliance rules: evaluates results
- HTTP orchestration → Report generation: requests reports
- Report generation → SQLite records: reads report data
- Report generation → Generated reports: writes documents