How samarjeetbisen-22/sih-26035 works
Metrolab is a web-based NAWI testing and verification platform. Inspectors enter instrument details, test conditions, and readings; the system calculates OIML compliance, supports reviewer approval, and generates official reports. Owners and administrators also use fleet, dashboard, and audit capabilities. The README documents these backend workflows, while the sampled source confirms parts of the frontend, API bridge, authentication, and browser-side computation; unsampled backend wiring is not shown where it cannot be established.
Main entry points: App.tsx Web application · apiClient.ts API client · server.py HTTP API server · oimlEngine.ts OIML calculations
Components 19
Testing Workbench
- Web application
frontend/src/App.tsx - Instrument intake
frontend/src/components/InstrumentIntakeForm.tsx - Testing dashboard
frontend/src/components/DataEntryDashboard.tsx - OIML calculations
frontend/src/utils/oimlEngine.ts - Results preview
frontend/src/components/ComputationPreview.tsx
Application Services
- API client
frontend/src/utils/apiClient.ts - HTTP API server
server.py - Authentication security
auth_security.py - Backend validation
backend_oiml.py
Review and Oversight
- Review queue
frontend/src/components/ReviewerQueueModal.tsx - Owner fleet portal
frontend/src/components/OwnerPortalModal.tsx - Role switcher
frontend/src/components/AuthRoleSwitcher.tsx
Records and Reporting
- Application database
db.py - Evidence attachments
frontend/src/components/AttachmentUploadModal.tsx - Audit history
frontend/src/components/AuditHistoryModal.tsx - Official report
frontend/src/components/OfficialReportDocument.tsx
Other components
- Inspector
- Reviewer
- Fleet owner
Connections 21
- Inspector → Web application: uses
- Web application → Instrument intake: presents
- Web application → Testing dashboard: presents
- Web application → OIML calculations: calculates
- OIML calculations → Results preview: supplies results
- Web application → API client: requests data
- API client → HTTP API server: calls API
- HTTP API server → Authentication security: authenticates
- HTTP API server → Application database: reads and writes
- HTTP API server → Backend validation: validates readings
- Reviewer → Review queue: uses
- Review queue → API client: requests reviews
- Fleet owner → Owner fleet portal: uses
- Owner fleet portal → API client: requests fleet data
- Web application → Evidence attachments: opens
- Evidence attachments → API client: uploads evidence
- Web application → Audit history: opens
- Audit history → API client: requests history
- Results preview → Official report: renders document
- Role switcher → API client: logs in
- Web application → Official report: requests PDF