Smart OIML R-76 Statutory Testing & Legal Metrology Automation Platform
SIH 2026 Prototype · Legal Metrology · Non-Automatic Weighing Instruments · OIML R-76Measure • Validate • Verify • Report
Metri-Report is a full-stack statutory testing and reporting platform designed for Non-Automatic Weighing Instruments (NAWI).
The platform digitizes the workflow from:
Instrument Registration → Test Configuration → Observation Entry → OIML Calculation → Compliance Evaluation → Evidence Sealing → Review → PDF/DOCX Report → Finalization
The system is designed around OIML Recommendation R 76-1:2006 (E) and the Legal Metrology (General) Rules, 2011.
It brings statutory testing, metrological calculations, evidence management, role-based workflows and report generation into one unified platform.
| Field | Details |
|---|---|
| Organization | Department of Consumer Affairs, Ministry of Consumer Affairs, Food & Public Distribution, Government of India |
| Problem Statement | Development of a Software Program/Application for Generation of Test Reports for Non-Automatic Weighing Instruments (NAWI) as per OIML Recommendation R-76 |
| Domain | Legal Metrology |
| Standard | OIML R 76-1:2006 (E) |
| Instrument Type | Non-Automatic Weighing Instruments (NAWI) |
| Project | Metri-Report |
| Status | SIH 2026 Prototype |
|
|
|
|
Quick overview of the problem, solution and platform. |
Walkthrough of the working Metri-Report prototype. |
Traditional statutory weighing-instrument testing involves multiple disconnected activities:
- Manual instrument registration
- Manual test configuration
- Physical observation recording
- Repeated metrological calculations
- Manual compliance interpretation
- Evidence handling
- Review and approval
- Preparation of statutory reports
- Maintaining audit history
This creates a workflow where data, calculations, evidence and reports can become fragmented across different systems or manual records.
Metri-Report brings these activities into one structured digital workflow.
|
REGISTER InstrumentSpecifications Manufacturer |
TEST ConditionsObservations Applicable Tests |
CALCULATE MPETurning Point Error Analysis |
REPORT PDFDOCX Compliance |
|
EVIDENCE SHA-256Photos Test Artifacts |
REVIEW RBACApproval Technical Review |
AUDIT EventsTimestamps Immutable Logs |
FINALIZE Report LockVersioning Integrity |
| Challenge | Metri-Report Solution |
|---|---|
| 📄 Manual report preparation | Automated PDF & DOCX report generation |
| 🧮 Repetitive calculations | Automated OIML calculation engine |
| ⚖️ Complex metrological rules | Versioned OIML rule engine |
| 🔍 Difficult traceability | Clause-level result explainability |
| 📷 Scattered evidence | Centralized evidence vault |
| 🔐 Evidence integrity concerns | SHA-256 cryptographic hashing |
| 👥 Multiple user responsibilities | Role-Based Access Control |
| 📝 Manual review workflow | Digital review and approval workflow |
| 🕒 Limited audit visibility | Immutable chronological audit trail |
| 📚 Changing standards | Versioned statutory rule architecture |
| ⚖️ METROLOGY | 🧮 CALCULATION | 🔐 INTEGRITY | 📄 REPORTING |
|---|---|---|---|
| NAWI Testing | MPE Calculation | SHA-256 Hashing | PDF Generation |
| OIML R-76 Rules | Turning Points | Evidence Vault | DOCX Generation |
| Accuracy Classes | Error Analysis | Audit Trail | Report Versioning |
| Verification Workflow | Compliance Logic | Immutable State | Statutory Format |
flowchart TD
USER["👤 Legal Metrology Officer / Engineer"]
UI["🖥️ Metri-Report Web Interface<br/>HTML + CSS + JavaScript + Three.js"]
GATEWAY["⚙️ Node.js Gateway<br/>Port 3000"]
API["🚀 FastAPI Backend<br/>Port 8000"]
AUTH["🔐 Authentication & RBAC"]
VALIDATION["✅ Validation Layer"]
RULES["📚 OIML R-76<br/>Versioned Rule Engine"]
CALC["🧮 Metrological<br/>Calculation Engine"]
REPORT["📄 PDF / DOCX<br/>Report Engine"]
EVIDENCE["🔒 Evidence Vault<br/>SHA-256"]
AUDIT["📜 Audit Trail"]
DB[("🗄️ SQLite / PostgreSQL")]
STORAGE["📁 File Storage<br/>Evidence + Reports"]
USER --> UI
UI --> GATEWAY
GATEWAY --> API
API --> AUTH
API --> VALIDATION
API --> RULES
API --> CALC
API --> REPORT
API --> EVIDENCE
API --> AUDIT
AUTH --> DB
VALIDATION --> DB
RULES --> DB
CALC --> DB
REPORT --> DB
EVIDENCE --> DB
AUDIT --> DB
EVIDENCE --> STORAGE
REPORT --> STORAGE
Metri-Report is structured around OIML Recommendation R 76-1:2006 (E) and associated statutory testing requirements.
The platform implements the changeover turning point calculation:
Where:
P= calculated turning pointI= indicated valuee= verification scale intervalΔL= additional load
Corrected error:
Where:
E= errorL= applied loadE₀= zero errorE_c= corrected error
The platform organizes statutory requirements into a versioned rule system covering areas including:
- Accuracy classes
- Verification scale interval
- Maximum Permissible Error
- Turning point / changeover calculations
- Zero error
- Repeatability
- Eccentricity
- Creep
- Discrimination
- Tare
- Influence factors
- Evidence integrity
- Report generation
The system is designed so that ambiguous or unconfigured requirements can be surfaced instead of silently producing unsupported results.
MANUAL REVIEW REQUIRED and NOT CONFIGURED states are used where applicable.
flowchart LR
A["⚖️ Instrument<br/>Specifications"]
B["🧪 Test<br/>Observations"]
C["📚 Applicable<br/>OIML Rules"]
D["🧮 Calculation<br/>Engine"]
E["📊 Error + MPE<br/>Evaluation"]
F{"Compliance<br/>Check"}
G["🟢 PASS"]
H["🔴 FAIL"]
I["🟡 MANUAL REVIEW"]
A --> D
B --> D
C --> D
D --> E
E --> F
F -->|Within Limit| G
F -->|Outside Limit| H
F -->|Ambiguous / Missing| I
| Module | Purpose |
|---|---|
| 🏠 Homepage | 3D WebGL interface, navigation and platform overview |
| ⚖️ Instrument Registry | Register NAWI instruments and metrological specifications |
| 🧪 Evaluation Workspace | Execute the statutory evaluation workflow |
| 📊 Report Archive | Store, verify and retrieve generated reports |
| 🔐 Evidence & Vault | Store evidence and generate cryptographic hashes |
| 👥 User Privileges & RBAC | Manage user roles and permissions |
| 📜 Audit Trail Log | Inspect chronological system events |
| 📚 OIML Rule Engine | Inspect and manage statutory rules |
| 📖 Swagger API Docs | Explore backend REST APIs |
The Evaluation Workspace provides a structured statutory testing workflow.
Instrument
↓
Test Conditions
↓
Applicable Tests
↓
Observations
↓
Calculations
↓
Compliance
↓
Evidence
↓
Review
↓
Report Generation
↓
Finalization
The system supports:
- Instrument specification entry
- Environmental conditions
- Applicable test selection
- Observation entry
- Metrological calculations
- Compliance evaluation
- Evidence upload
- Reviewer observations
- PDF/DOCX generation
- Report finalization
Metri-Report includes an evidence workflow designed around cryptographic integrity.
flowchart LR
A["📷 Test Evidence"]
B["📁 Upload"]
C["🔐 SHA-256"]
D["🗄️ Evidence Vault"]
E["📜 Audit Event"]
F["🔒 Finalized Record"]
A --> B
B --> C
C --> D
D --> E
E --> F
Evidence can include:
- Calibration certificates
- Test photographs
- Raw testing artifacts
- Supporting documents
- Other statutory evidence
The generated cryptographic digest can be used to detect unexpected evidence modification.
Metri-Report uses role-based access control for different statutory responsibilities.
| Role | Primary Responsibility |
|---|---|
| ADMIN | Administration, roles, configuration and finalization |
| LAB_MANAGER | Instrument management, test assignment and workflow approval |
| TEST_ENGINEER | Test execution, observations and evidence |
| REVIEWER | Calculation review and technical approval |
| VIEWER | Read-only access to repository and audit information |
Metri-Report provides automated generation of:
- Structured statutory test report
- Metrological tables
- Compliance results
- Testing information
- Evidence references
- Disclaimers
- Editable evaluation package
- Structured laboratory record
- Test information
- Calculation results
- Review information
The report engine is based on:
- ReportLab
- python-docx
The Audit Trail provides chronological visibility into system activity.
Captured information can include:
- Event type
- Timestamp
- User
- Action
- Test/report context
- Event payload
- Related system state
This supports traceability across the evaluation lifecycle.
MetriReport/
│
├── backend/
│ ├── app/
│ │ ├── api/
│ │ ├── calculations/
│ │ ├── compliance/
│ │ ├── core/
│ │ ├── models/
│ │ ├── reports/
│ │ ├── schemas/
│ │ ├── services/
│ │ └── tests/
│ │
│ └── requirements.txt
│
├── frontend/
│ ├── index.html
│ ├── evaluation-workspace/
│ ├── instrument-registry/
│ ├── report-archive/
│ ├── evidence-&-vault/
│ ├── user-privileges-&-rbac/
│ ├── audit-trail-log/
│ ├── OIML-Rule-Engine/
│ ├── server.js
│ ├── subpage-shell.css
│ ├── fonts/
│ └── assets/
│
├── docs/
│
└── README.md
| Layer | Technology |
|---|---|
| Frontend | HTML5, CSS3, JavaScript |
| 3D / Graphics | Three.js, WebGL, GLTF |
| Frontend Gateway | Node.js |
| Backend | FastAPI |
| Language | Python |
| Validation | Pydantic |
| ORM | SQLAlchemy 2.0 |
| Database | SQLite / PostgreSQL |
| Reports | ReportLab, python-docx |
| Security | JWT, Password Hashing |
| Integrity | SHA-256 |
| Testing | Pytest |
| Deployment | Docker / Docker Compose |
| Prototype Hosting | Vercel |
- Python 3.9+
- Node.js 18+
- npm
- Git
- Docker (optional)
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
PYTHONPATH=. uvicorn app.main:app --reload --port 8000Backend:
http://localhost:8000
Swagger:
http://localhost:8000/docs
cd frontend
npm install
node server.jsFrontend:
http://localhost:3000
Run the backend test suite:
cd backend
python3 -m pytest app/tests/ -vThe test suite covers areas such as:
- Calculation logic
- Boundary conditions
- Compliance
- Security
- Report generation
- Integration behavior
Build and start the complete stack:
docker compose up --buildServices:
| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Backend | http://localhost:8000 |
| Swagger | http://localhost:3000/docs |
| Backend Swagger | http://localhost:8000/docs |
A concise demonstration can follow this sequence:
Use one of the available demo roles.
Inspect platform metrics and navigation.
Select or create a NAWI instrument.
Launch a statutory evaluation.
Configure conditions and applicable tests.
Enter or load test observations.
Run the OIML calculation engine.
Review permissible limits, calculated values and status.
Upload supporting evidence and generate SHA-256 hashes.
Reviewer verifies calculations and observations.
Generate the PDF/DOCX evaluation report.
Finalize and lock the statutory record.
flowchart TD
A["⚖️ Instrument"]
B["🧪 Statutory Test"]
C["📊 Observations"]
D["🧮 OIML Calculation"]
E["📋 Compliance"]
F["🔐 Evidence"]
G["👥 Review"]
H["📄 PDF / DOCX"]
I["🔒 Finalized Record"]
A --> B
B --> C
C --> D
D --> E
E --> F
F --> G
G --> H
H --> I
Metri-Report includes responsive interface work for compact mobile viewports.
- Compact navigation
- Responsive module layouts
- Touch-friendly controls
- Responsive evaluation forms
- Mobile-friendly evidence upload
- Horizontal scrolling for large statutory tables
- Adaptive spacing and typography
- Compact dashboard components
The frontend architecture is designed to preserve usability across desktop and mobile layouts.
Metri-Report incorporates several security-oriented mechanisms:
- 🔑 JWT authentication
- 👥 Role-Based Access Control
- 🔐 Password hashing
- 🌐 CORS controls
- 🧾 Audit logging
- 🔒 SHA-256 evidence hashing
- 🗄️ Controlled report storage
- 🔒 Finalized report immutability workflow
- 🧩 Environment-based configuration
Never commit production credentials, secrets, private keys or sensitive deployment configuration to the repository.
|
MEASURE Capture statutory test observations |
VALIDATE Apply OIML rules and calculations |
EXPLAIN Expose values, limits and references |
REPORT Generate structured statutory documents |
Metri-Report
│
├── ⚖️ Metrology
│ ├── Expanded statutory rule coverage
│ ├── Additional test workflows
│ └── Extended instrument support
│
├── 🧮 Calculation Engine
│ ├── More verification scenarios
│ ├── Extended boundary testing
│ └── Additional mathematical validation
│
├── 📄 Reporting
│ ├── More statutory report templates
│ ├── Enhanced report versioning
│ └── Digital verification workflows
│
├── 🔐 Integrity
│ ├── Stronger evidence lifecycle
│ ├── Advanced audit controls
│ └── Extended verification mechanisms
│
└── ☁️ Deployment
├── Production database support
├── Scalable storage
└── Cloud deployment
IMPORTANT NOTICE: Metri-Report is a prototype system developed for SIH 2026. It is intended to demonstrate digital automation of NAWI testing and report-generation workflows based on configured OIML R-76 requirements.
The prototype does not by itself constitute statutory Legal Metrology Model Approval, certification or gazette notification under applicable Indian law.
Actual statutory decisions, approvals and certifications remain subject to the competent authority, applicable legislation, notified rules, standards and authorized metrological procedures.
OIML R-76 · Legal Metrology · Statutory Testing · Digital Reporting
⭐ If you find Metri-Report useful, consider starring the repository.
𓍝 Metri-Report
Smart OIML R-76 Statutory Testing & Legal Metrology Automation Platform


