Skip to content

About

Portable Digital Product Passport (DPP), repairability index and bill-of-materials graph with cryptographic source provenance: local-first, zero-dependency.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

ProductGraph

CI License Node Core LOC

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


ProductGraph CLI inspection demo


The Problem

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.

The Solution: ProductGraph

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), and community_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.

Quickstart

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.html

Or install globally:

npm install -g productgraph

CLI Usage

1. Initialize a new Product Passport

Scaffold an EU ESPR-compliant passport with custom parameters:

productgraph init passport.json --name "Framework 13" --brand "Framework" --category laptop --gtin 0850041234001

2. Inspect a Passport

Display 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 --json

3. Verify Cryptographic Integrity

Validate the JSON Schema and check that the canonical SHA-256 digest matches the data:

productgraph verify fixtures/fairphone-5.json

4. Export to Standalone HTML, Markdown, CycloneDX, or SPDX

Produce 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.json

5. Physical QR Labels & GS1 Digital Link

Generate 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.json

6. Cryptographic Signatures (Ed25519 / ECDSA)

Generate 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.json

7. Circularity Indicators & Directory Audit

Compute modularity by weight, critical raw materials, and lint entire directories for barcode collisions:

productgraph metrics fixtures/fairphone-5.json
productgraph lint fixtures/

8. Compare Models or Revisions (diff) & Local Preview Server (serve)

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 3000

Programmatic API

ProductGraph 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);

Boundaries & Scope

Note

ProductGraph structures claims, disassembly guides, and source digests. It does not claim formal regulatory certification or OEM authority without verified cryptographic signatures.

Donations & Sponsorship

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:

License

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.

About

Portable Digital Product Passport (DPP), repairability index and bill-of-materials graph with cryptographic source provenance: local-first, zero-dependency.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages