{
  "markdown": "# aiactradar-examples\n\nReference webhook receivers for [AI Act Radar](https://aiactradar.com).\nEach subdirectory is a self-contained, runnable example for one platform.\n\n## What every receiver does\n\n1. Reads the **raw** request body (signature is over the bytes, not the parsed JSON).\n2. Verifies `X-AIAR-Timestamp` is within 300 seconds of now.\n3. Verifies `X-AIAR-Signature` (`v1=<hex>`) using HMAC-SHA-256 over `<timestamp>.<raw_body>` in **constant time**.\n4. Checks an idempotency key (`event.id`) before doing real work — retries are normal.\n5. Returns 2xx within 5 seconds; otherwise the dispatcher retries with exponential backoff.\n\nThe verification is identical across platforms; only the platform glue differs.\n\n## Examples\n\n| Folder | Platform | Notes |\n|---|---|---|\n| [`cloudflare-workers/`](./cloudflare-workers) | Cloudflare Workers | Web Crypto API, KV for idempotency |\n| [`vercel-edge/`](./vercel-edge) | Vercel Edge Functions | Web Crypto API, Vercel KV for idempotency |\n| [`aws-lambda/`](./aws-lambda) | AWS Lambda + API Gateway | Node `crypto` module, DynamoDB for idempotency |\n| [`express-node/`](./express-node) | Plain Express on Node | Node `crypto`, in-process LRU (replace for prod) |\n| [`fastify-typescript/`](./fastify-typescript) | Fastify + TS | Typed body parser, raw-body capture |\n| [`deno-deploy/`](./deno-deploy) | Deno Deploy | Deno KV for idempotency |\n\n## Try it without signing up\n\nEach example has a `test.sh` that signs a sample event with a local secret and posts it to the running receiver. You can run the full loop on your laptop in under five minutes:\n\n```bash\ncd cloudflare-workers\ncp .dev.vars.example .dev.vars   # set AIA_SECRET to anything\nnpm install && npm run dev       # starts http://localhost:8787\n# in another terminal:\nbash test.sh                     # posts a signed sample event\n```\n\n## Going to production\n\n- Store `AIA_SECRET` in your platform's secret manager. Never commit it.\n- Rotate the secret in the AI Act Radar dashboard at least every 90 days.\n- Subscribe to the dispatcher's webhook health channel — bounced deliveries surface there before customers notice.\n- Idempotency stores need a TTL of at least 7 days; the dispatcher retries up to 24h.\n\n## License\n\nMIT.\n\n---\n\n*AI Act Radar is operated by ligea GmbH, Karlsruhe. Information only — not legal advice.*\n",
  "bytes": 2335,
  "sha": "afc88a6c63afa9052fc75e563ea57df1794fbdffa8fab4e90f7a539d0dd08cfb",
  "repo_slug": "ligea-gmbh/aiactradar-examples",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_aiactradar_ai_act_radar_da6d53e3/readme"
}