Skip to content

Module: Webhooks

Composable webhook infrastructure. Receive webhooks with pluggable signature verification, send webhooks with exponential backoff retry, and log all events for debugging. Ships with HMAC-SHA256 and HMAC-SHA1 signature providers.

Namemodule-webhook-ts
Version0.1.0
Categorycomposable-modules
LicenseApache-2.0
Personaengineering
Tagswebhook, events, http, retry, typescript
Sourcetemplates/module-webhook-ts

Render it

Three front doors, one catalog. Pick whichever suits the caller.

# CLI
npx @nanohype/sdk render module-webhook-ts --out ./my-app

# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "module-webhook-ts", variables);

# MCP — from an agent
get_template({ name: "module-webhook-ts" })

Prerequisites

ToolVersionWhy
node>=22Node.js runtime for the webhook module

Variables

Required

ProjectName string
Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.

Optional

Description string — defaults to Webhook receiver and sender with retry
Short project description for package.json and README
SignatureMethod string — defaults to hmac-sha256
Default signature method (hmac-sha256, hmac-sha1, or a custom name)

What it produces

23 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.

.env.example
.gitignore
biome.json
package.json
README.md
src/webhook/__tests__/hmac-sha256.test.ts
src/webhook/__tests__/registry.test.ts
src/webhook/__tests__/sender.test.ts
src/webhook/__tests__/signature-providers.test.ts
src/webhook/bootstrap.ts
src/webhook/event-log.ts
src/webhook/index.ts
src/webhook/receiver.ts
src/webhook/sender.ts
src/webhook/signatures/hmac-sha1.ts
src/webhook/signatures/hmac-sha256.ts
src/webhook/signatures/index.ts
src/webhook/signatures/mock.ts
src/webhook/signatures/registry.ts
src/webhook/signatures/types.ts
src/webhook/types.ts
tsconfig.json
vitest.config.ts

Composes with