Skip to content

dynamicfeed/dynamicfeed-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Feed Starter

Build a live-data agent that can prove its data is real — in one serverless function, with zero npm dependencies.

This is the smallest possible app on Dynamic Feed: a static page + one function that pulls keyless live data (earthquakes, US Treasury yields, exploited CVEs, hazards near any point) and then verifies an Ed25519 signature in your browser — so you can watch a green ✓ signature VALID — verified in your browser badge light up on data that was measured seconds ago.

Deploy with Vercel

One click. No API key. No environment variables.


What it demonstrates

  1. Keyless live dataapi/feed.js makes a single POST https://dynamicfeed.ai/v1/batch call that fans out to three tools server-side (earthquakes, treasury_yields, exploited_vulnerabilities), plus an optional GET /v1/nearby?lat&lon signed hazard scan around any point. No key, no signup, no SDK.
  2. In-browser signature verification — the page fetches a fresh signed attestation from GET https://dynamicfeed.ai/v1/attest, strips the signature block, re-canonicalizes the envelope byte-for-byte (json-sorted-compact — see the standard), and verifies the detached Ed25519 signature against the published key at /.well-known/keys using @noble/ed25519. Verification happens in your browser — you are not trusting this app, or even Dynamic Feed's web server, to tell you the data is genuine.
  3. Tamper evidence — hit the “run tamper test” button: it flips a single digit of the data and re-verifies. The signature fails instantly. That is the whole point — signed data cannot be quietly altered between source and agent.

Run locally

Zero-install (Node ≥ 18, nothing to npm install):

node dev-server.js
# → http://localhost:3000

Or with Vercel's emulator:

npx vercel dev

Try the function directly:

curl http://localhost:3000/api/feed | python3 -m json.tool
curl "http://localhost:3000/api/feed?lat=-33.87&lon=151.21"   # + signed hazards near Sydney

Files

File Purpose
api/feed.js the entire backend — one Vercel serverless function, global fetch, no deps
index.html the dashboard + in-browser verification UI
verify.js Ed25519 verifier (adapted from the official dynamicfeed.ai/verify.js for cross-origin use)
canon.js the json-sorted-compact canonicalization — lossless number-preserving parse, Python-ensure_ascii escaping
style.css dark, minimal, mono
dev-server.js optional zero-install local server (node dev-server.js)

Why canonicalization is fussy (and why that's in canon.js)

A naive JSON.parseJSON.stringify round-trip silently changes bytes — float representation (151.21 can become 151.20999999999998) and non-ASCII escaping (the signer escapes the arrow character → to the six ASCII bytes \u2192) — and a single changed byte breaks an Ed25519 signature. canon.js parses losslessly (numbers kept verbatim as wire text) and re-serializes exactly the way the signer does. The full recipe is published at dynamicfeed.ai/standard.

Make it yours

  • Swap the tools in api/feed.js — there are 50+ keyless tools (weather, flights, satellites, sanctions, shipping, AI-model pricing, …). The full self-describing catalog: dynamicfeed.ai/llms-full.txt
  • Point the nearby-hazards card at your own coordinates
  • Need higher rate limits or key-gated REST? dynamicfeed.ai

Links

  • dynamicfeed.ai — the live-data layer for AI agents
  • /standard — the signed-envelope + canonicalization spec
  • /proof — verify a live envelope yourself, right now
  • /llms-full.txt — every tool, self-describing, agent-readable

MIT — fork it, ship it.

About

Deploy-in-one-click starter: a live, Ed25519-VERIFIED data dashboard on Dynamic Feed — keyless world data, signature checked in your browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors