Portable Digital Product Passport (DPP), repairability score, and bill-of-materials graph with cryptographic source provenance: local-first, zero-dependency.
Italiano · Architecture · Roadmap · Launch Strategy
Product documentation, teardown schematics, spare parts availability, and material recyclability are notoriously fragmented. Under EU ESPR (Ecodesign for Sustainable Products Regulation) and global Right to Repair legislation, consumer electronics and appliances require verifiable, machine-readable Digital Product Passports. Today, consumers and repair technicians face paywalled manuals, broken links, and opaque greenwashing claims without clear provenance.
ProductGraph is a local-first, zero-runtime-dependency CLI and library that defines and validates portable, self-certifying Digital Product Passports:
- Hierarchical Bill of Materials (BoM): Track modular vs integrated components, critical raw materials (CRM), and recycled plastic content.
- Repairability Scoring & Disassembly: Standardized disassembly instructions, required tools, estimated repair times, and spare part catalogs.
- Three-Tier Provenance Confidence: Clear boundary between
manufacturer_certified,observed_fact(physical teardown), andcommunity_estimate. - Self-Certifying Canonical Hash: Deterministic SHA-256 digest (
provenanceDigest) computed across all metadata, components, and citations. - Portable Standalone HTML Export: Single-file, responsive, offline-first DPP viewer ready for QR codes, field technicians, and consumers.
Run directly with npx (zero install needed):
# Inspect Fairphone 5 fixture
npx productgraph inspect fixtures/fairphone-5.json
# Verify cryptographic integrity and schema compliance
npx productgraph verify fixtures/fairphone-5.json
# Export to standalone offline HTML passport
npx productgraph export fixtures/fairphone-5.json -o fairphone-passport.htmlOr install globally:
npm install -g productgraphScaffold an EU ESPR-compliant passport with custom parameters:
productgraph init passport.json --name "Framework 13" --brand "Framework" --category laptop --gtin 0850041234001Display a formatted terminal summary with repair score, fasteners, components, and provenance audit:
productgraph inspect fixtures/fairphone-5.json
# Or output full machine-readable JSON:
productgraph inspect fixtures/fairphone-5.json --jsonValidate the JSON Schema and check that the canonical SHA-256 digest matches the data:
productgraph verify fixtures/fairphone-5.jsonProduce an interactive HTML page, Markdown summary, or enterprise H-BoM:
productgraph export fixtures/fairphone-5.json --format html -o fairphone.html
productgraph export fixtures/fairphone-5.json --format cyclonedx -o fairphone.cdx.json
productgraph export fixtures/fairphone-5.json --format spdx -o fairphone.spdx.jsonGenerate a vector SVG QR code label or ASCII terminal code, and inspect GS1 Digital Links:
productgraph qr fixtures/fairphone-5.json -o label.svg
productgraph qr fixtures/fairphone-5.json --ascii
productgraph gs1 fixtures/fairphone-5.jsonGenerate keypairs, sign passports, and verify self-certifying manufacturer signatures:
productgraph keygen --algorithm ed25519 -o oem-key
productgraph sign fixtures/fairphone-5.json --key oem-key.priv.pem --embed-key
productgraph verify fixtures/fairphone-5.jsonCompute modularity by weight, critical raw materials, and lint entire directories for barcode collisions:
productgraph metrics fixtures/fairphone-5.json
productgraph lint fixtures/Compare two revisions or launch a local offline PWA preview server:
productgraph diff fixtures/fairphone-5.json fixtures/framework-laptop-13.json
productgraph serve fixtures/fairphone-5.json --port 3000ProductGraph can be imported as an ES module:
import {
validatePassport,
diffPassports,
exportPassportHtml,
stampPassportDigest,
type ProductPassport
} from "productgraph";
// Validate a passport object
const validation = validatePassport(passportData);
if (validation.valid) {
console.log("Canonical SHA-256:", validation.computedDigest);
}
// Generate standalone HTML
const html = exportPassportHtml(passportData);Note
ProductGraph structures claims, disassembly guides, and source digests. It does not claim formal regulatory certification or OEM authority without verified cryptographic signatures.
ProductGraph is open source and maintained independently. If it helps your organization or project comply with circular economy standards or repair workflows, please consider sponsoring:
- GitHub Sponsors: MRJonam91
- Ko-fi: mrjonam
- Buy Me a Coffee: mrjonam
- PayPal: https://paypal.me/manorollo
This project is licensed under the Apache-2.0 License. See the LICENSE file and NOTICE for details. Documentation is licensed under CC BY-SA 4.0.