A focused internal developer tool for receiving, inspecting, and replaying webhook traffic in real time.
Use it while integrating third-party providers, debugging failed events, or validating payload contracts during local development.
- Captures inbound requests from any HTTP method on a catch-all endpoint.
- Stores request method, path, headers, query params, body, and source IP.
- Auto-expires captured requests after 5 minutes.
- Provides a live inspector UI with filtering, sorting, deep detail tabs, and replay-ready cURL output.
npm installCreate .env.local in the project root:
MONGODB_URI=mongodb+srv://<user>:<password>@<cluster>/<database>?retryWrites=true&w=majoritynpm run devOpen http://localhost:3000.
curl -X POST http://localhost:3000/api/hook/sms \
-H "Content-Type: application/json" \
-d '{"from":"+1234","text":"hello world"}'Then inspect it in the dashboard.
- Capture endpoint:
/api/hook/* - Examples:
/api/hook/sms/api/hook/provider/stripe/api/hook/inbound?env=staging
- Each request receives an
expires_attimestamp (created_at + 5 minutes). - A MongoDB TTL index removes expired entries automatically.
GET,POST,PUT,PATCH,DELETE,OPTIONS,HEAD
- Live request inbox: refresh manually or use configurable auto-refresh.
- Filtering: server-side search by path, body text, IP, and content type.
- Method filter: scope to one HTTP method.
- Sort modes: newest, oldest, or path ordering.
- Pagination: server-side paging with adjustable page size.
- Operational stats: request count, recent traffic, unique paths, top method.
- Detail panel tabs:
- headers
- query params
- parsed/raw body
- replay cURL
- raw request payload
- Next.js App Router
- React client-side dashboard in
components/RequestInspector.tsx
app/api/hook/[...path]/route.ts: catch-all webhook capture routeapp/api/requests/route.ts: request listing API for the UI
lib/mongodb.ts: MongoDB connection cache + index setup- Collection:
api_requests
Each stored request includes:
methodpathheadersquery_paramsbody_rawbody_parsed(when JSON parsing succeeds)content_typeipcreated_atexpires_at
- This version intentionally runs in no-auth mode for internal/private environments.
- Do not expose publicly unless access controls are added.
- Designed for higher-throughput inbox browsing with server-side pagination and filters.
npm run dev- start development servernpm run build- production buildnpm run start- run production servernpm run lint- lint project
- Add optional shared-secret guard for dashboard access.
- Add request export archive for longer retention and auditing.
- Add SSE/WebSocket streaming instead of interval polling.