Skip to content

RewriteToday/adapters

Rewrite Adapters

Official Rewrite adapters to receive Webhooks in a simple, secure and fully typed way across popular Node.js frameworks and edge runtimes.

This monorepo contains the framework-first packages maintained by the Rewrite team, focused on DX, TypeScript first and good security practices.

You can find the full Webhooks documentation here.

Rewrite Banner

Available adapters

Each adapter has its own README with framework-specific examples: Elysia · Express · Fastify · Hono · Edge

Installing

Choose the adapter that matches your stack:

npm install @rewritetoday/hono hono
# ou
pnpm add @rewritetoday/hono hono
# ou
bun add @rewritetoday/hono hono

Basic usage

import { Hono } from 'hono';
import { Webhooks } from '@rewritetoday/hono';

const app = new Hono();

app.post(
	'/webhooks/rewrite',
	Webhooks({
		secret: '...',
		onPayload({ id, type, data }) {
			console.log('Hey, a new webhook event:', type);
		},
	}),
);

Security by default

  • Automatic webhook signature verification
  • Secure webhook secret comparison
  • Payload validated before reaching your handler
  • No direct access to API key

Never expose your API key in webhooks.
Always use environment variables.

Made by the Rewrite team.
SMS the way it should be.