Home / Reference implementations

Reference implementations

Draft Annotated, runnable code against the Draft contracts. Illustrative reference — not production implementations.

Three reference implementations show the execution chain in code. Each is a single self-contained file with no dependencies beyond the Node.js standard library, annotated to map every step back to the spec. Copy them, run them, adapt them.

Draft

Governed webhook

An HTTP webhook receiver that runs every inbound event through the full chain: signature check, contract validation, tenant scoping, identity, policy decision, governed execution, and receipt issuance.

Draft

Approval inbox

A human approval gate for require-approval decisions: requests park in an inbox, an approver records a signed decision, expiries lapse automatically — and the decision becomes evidence.

Draft

Evidence receipt

Receipt issuance and verification: canonical JSON, SHA-256 hashing, hash-chained receipts, and the client-side verification protocol from the evidence spec.

Reference, not production. These implementations favor readability over hardening: in-memory stores, fixed local secrets, no rate limiting. They demonstrate the contracts correctly; a production deployment needs persistent storage, secret management, and the hardening your threat model requires.

Used by the quickstart: the quickstart guide walks through the governed-webhook reference end to end.