Restaq
Durable webhook execution platform for reliable, replayable, observable event-driven backends
Restaq is a durable webhook execution platform that helps developers build reliable, replayable, and observable event-driven backends. Receiving a webhook is easy—reliably processing everything that has to happen after it is the hard part.
Webhook handlers are usually a pile of if statements with no memory of what already happened. A provider retries, and you double-charge a customer. A step three-quarters through a handler fails, and you re-run everything from scratch—or worse, nothing at all, silently. Debugging means grepping logs, because there's no record of what actually executed.
npx restaq@latest initNothing to install first — scaffolds relay.ts + relay.handlers.ts and installs exactly what you choose. See Installation for the full walkthrough.
What You Get
Durable steps — ctx.step.run(name, fn) checkpoints each unit of work. A retry resumes past whatever already succeeded; it never re-runs a completed step's side effects.
Automatic retries — a failed execution schedules its own retry with exponential backoff, up to a configurable cap, with no polling or queue infrastructure to run.
Replay & restart — retryExecution resumes in place, restartExecution forces every step to re-run (for when the step logic itself was wrong, not just flaky), and replayExecution reprocesses a historical event as a brand-new execution without touching the original.
A real audit trail — every step attempt is a new row, never overwritten, so a step that failed twice before succeeding shows all three attempts. Every execution's log stream interleaves the runtime's own lifecycle events (retrying (attempt 2, scheduled)) with your handler's own logging, tagged so you can tell them apart.
Provider adapters with real signature verification — Stripe, GitHub, Clerk, Shopify, and Resend today, each doing actual HMAC verification against the raw request body, not a stub.
Fully-typed event catalogs — relay.on('stripe.charge.succeeded', ...) autocompletes every event of the plugins you registered, and event.data is typed per event (event.data.object is a real Stripe.Charge).
Postgres, SQLite, or MySQL, auto-detected — pass a raw client straight into restaq({ database }) and Restaq detects the dialect and applies its own prefixed tables (restaq_executions, etc.), so they never collide with your application's own.
First-class local dev tooling, bundled — the relay CLI ships inside restaq itself, no separate install. relay migrate applies the schema with one command; relay dev runs your app and tails live execution activity to the terminal.
Where Restaq Fits
| Category | |
|---|---|
| Better Auth | Authentication framework |
| Drizzle | ORM |
| Hono | Web framework |
| Restaq | Webhook execution platform |