Skip to content

examples: webhook dashboard (receiver + live page) - #7

Closed
0xFantomMenace wants to merge 8 commits into
masterfrom
examples/webhook-dashboard
Closed

0xFantomMenace wants to merge 8 commits into
masterfrom
examples/webhook-dashboard

Conversation

@0xFantomMenace

@0xFantomMenace 0xFantomMenace commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Webhook dashboard example

examples/webhook-dashboard: a dependency-free Node receiver plus a live dashboard for 0xArchive webhooks.

  • Verifies 0xa-signature (HMAC-SHA256 over <t>.<raw body>, both secrets accepted during a rotation, five minute replay window), acknowledges with 200 before doing any work, deduplicates on the event id.
  • Keeps the recent events in memory (optional JSONL file), streams them to the browser over server-sent events.
  • Shows block-to-your-server latency split at observed_at, per-event-type counts, deliveries per minute, and the late flag on catch-up deliveries.
  • README walks through running it behind a tunnel, creating the endpoint and a few subscriptions with curl, and deploying it with the included Dockerfile.

Plain Node 18+, no SDK dependency, so it works as a starting point for any receiver.

A dependency-free Node receiver for 0xArchive webhooks with a live
dashboard: verifies the 0xa-signature HMAC over the raw body (both
secrets during a rotation), acknowledges before processing, dedups on
event id, streams events to the browser over server-sent events, and
shows block-to-server latency, per-type counts, deliveries per minute
and the late flag. README covers the tunnel, endpoint and subscription
setup with curl.
The page is now a time-axis tape with four rails (plant, oracle/chain,
market, watched accounts). Open incidents (gap, ingest stall, oracle or
chain stall) draw as torn segments until the close edge with the same
incident_id arrives; liquidations scale with notional, bursts ring out,
watched-account events sit on their own rail, late deliveries are
ringed. Live mode scrolls the last 2, 10 or 60 minutes of real
deliveries; the demo loop replays a scripted 28 second incident
through the same renderer for a pitch.
Events are placed at chain time, so a delivery that arrives two minutes
after the fact sat outside the default two minute window and never
showed. The window now defaults to ten minutes, anything received inside
the window stays on the tape (clamped to the left edge when its chain
time is older), fresh arrivals pulse in their rail colour wherever they
land, and the caption says how long after the chain the delivery came.
Replaces the sparse rail tape with a dense control room, every panel fed
by webhooks: plant health per venue (optionally enriched from the
data-quality endpoints), live liquidation flow with long/short split,
top markets and a cascade badge, oracle and chain status per HIP-3 dex,
market structure, watched wallets, a 60 minute incident strip and the
raw tape with per-delivery latency. The demo mode replays a scripted
40 s incident through the same panels.
Accepts deliveries that fail the signature check when the flag is set,
marks them verified=false and shows an unverified chip on the tape, so a
receiver can be pointed at before the secret is wired in.
@0xFantomMenace

Copy link
Copy Markdown
Member Author

Moved to the examples repository: https://github.com/0xArchiveIO/examples/tree/main/webhook-dashboard. This repository has no examples directory, so the dashboard now lives next to the other example projects.

@0xFantomMenace
0xFantomMenace deleted the examples/webhook-dashboard branch September 29, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant