Back to Projects
Fullstack

Rehook

Keep one stable inbound webhook URL, then route events to whichever local machine, staging service, or teammate environment is active right now.

Rehook

About This Project

Rehook is a webhook ingress and routing platform built for the messy reality of local and staging development. Instead of changing provider configuration every time your tunnel URL rotates or your team switches environments, Rehook gives you one stable inbound URL and handles dynamic downstream routing for you.

At runtime, inbound events are persisted, evaluated against route conditions, and delivered to one or many destinations depending on the source routing mode. The platform supports SINGLE priority routing and MATCH_ALL fan-out, with delivery history, status tracking, and replay support for fast debugging.

The system is built as a Bun monorepo: a Next.js dashboard for source/session management and logs, a Fastify API with Prisma/Postgres persistence, and BullMQ workers for async route evaluation and outbound delivery execution.

Key Features

  • Stable ingest URL per source, independent from changing destination environments
  • Conditional route matching (headers, JSONPath, regex) with priority-based routing
  • Routing modes for first-match delivery (`SINGLE`) or fan-out (`MATCH_ALL`)
  • Event and delivery logs with live updates over SSE for real-time debugging
  • Replay tooling to resend logged events with optional override payloads/headers
  • TTL-based dev sessions for temporary local tunnel targets
  • OTP auth with multi-organization switching in the dashboard

Technical Challenges

  • Designing reliable route evaluation and delivery pipelines with async workers
  • Preventing unsafe header forwarding while preserving useful request context
  • Balancing fast local iteration with durable event and delivery audit history
  • Handling replay edge cases when prior deliveries are still pending

Tech Stack

Next.jsFastifyBullMQPostgreSQLRedisTypeScriptDockerGitHub Actions

Impact

Removes repeated provider reconfiguration and speeds up webhook debugging