How ritz2607/sih-26035 works
Metrolab is a browser-based NAWI verification workbench with a Python HTTP/SQLite bridge. The inspector profiles an instrument and its test conditions, enters load-test readings, reviews OIML computations and certificate output, then can save an audit record or request a PDF. The graph reflects documented capabilities such as eccentricity, repeatability, uncertainty, and history; the excerpts do not establish every internal backend calculation or UI callback, so uncertain wiring is omitted.
Main entry points: App.tsx Workflow app · server.py HTTP API server · InstrumentIntakeForm.tsx Instrument intake · apiClient.ts API client
Components 15
Verification workflow
- Workflow app
frontend/src/App.tsx - Instrument intake
frontend/src/components/InstrumentIntakeForm.tsx - Test ledger
frontend/src/components/DataEntryDashboard.tsx - Preset profiles
frontend/src/data/mockData.ts - Metrology data types
frontend/src/types/metrology.ts
Metrology computation
- OIML engine
frontend/src/utils/oimlEngine.ts
Reports and audit
- Computation preview
frontend/src/components/ComputationPreview.tsx - Official certificate
frontend/src/components/OfficialReportDocument.tsx - Audit history
frontend/src/components/AuditHistoryModal.tsx - Generated PDF
server.py
Backend services
- API client
frontend/src/utils/apiClient.ts - HTTP API server
server.py - Audit and report logic
prototype_sih26035.py - SQLite audit database
nawi_audit.db
Other components
- Inspector
Connections 16
- Inspector → Instrument intake: profiles instrument
- Workflow app → Instrument intake: renders intake
- Workflow app → Test ledger: renders ledger
- Instrument intake → Workflow app: updates profile
- Test ledger → Workflow app: updates readings
- Workflow app → Preset profiles: loads presets
- Workflow app → OIML engine: computes results
- Workflow app → Computation preview: provides results
- Computation preview → Official certificate: renders certificate
- Workflow app → API client: requests backend
- Audit history → API client: requests history
- API client → HTTP API server: sends API requests
- HTTP API server → Audit and report logic: invokes audit logic
- Audit and report logic → SQLite audit database: reads and writes
- HTTP API server → Generated PDF: generates PDF
- Workflow app → Generated PDF: opens generated PDF