Skip to content

camenduru/TostUI-webhook-standalone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webhook Server

A self-hosted webhook testing and debugging tool. Create webhooks to capture, inspect, and test HTTP requests with real-time updates and signature verification.

image

Features

  • Create Webhooks - Generate unique webhook endpoints instantly
  • Request Capture - View all incoming requests with headers, body, method, and status
  • Real-time Updates - Live updates via WebSocket when new requests arrive
  • Signature Verification - HMAC-SHA256 signature validation using x-webhook-signature header
  • Test Webhook - Built-in test interface to send requests with automatic signature generation
  • Dark UI - Clean, modern dark interface for easy viewing

Installation

npm install

Usage

Development

npm run dev

The server will start on http://localhost:3000.

Production Build

npm run build
npm start

How It Works

Creating a Webhook

  1. Open http://localhost:3000 in your browser
  2. Click "+ Create New Webhook"
  3. You'll receive a unique webhook URL (e.g., /webhook-id)

Receiving Requests

Any HTTP request sent to your webhook URL will be captured:

POST https://your-server.com/<webhook-id>

The request will appear in the dashboard with:

  • Timestamp
  • HTTP method
  • Status code
  • All headers
  • Request body

Signature Verification

Each webhook has a secret key. To verify signatures:

  1. Include the x-webhook-signature header with your request
  2. The signature is the HMAC-SHA256 hash of the request body using your webhook secret

Example signature generation:

const crypto = require('crypto');
const signature = crypto
  .createHmac('sha256', webhookSecret)
  .update(requestBody)
  .digest('hex');

Testing Webhooks

Use the built-in test form on any webhook page:

  1. Select HTTP method
  2. Enter JSON body
  3. Click "Send Request" - signatures are automatically generated
  4. View response and captured request

API Endpoints

Endpoint Method Description
/ GET Main dashboard
/create POST Create new webhook
/:webhookId * Capture requests
/view/:webhookId GET View webhook dashboard
/view/:webhookId/data GET Get requests JSON
/view/:webhookId/:idx/read POST Mark request as read
/view/:webhookId/:idx/delete POST Delete request

Environment Variables

Variable Description
VERCEL_URL Production URL (auto-detected on Vercel)
VERCEL_PROJECT_PRODUCTION_URL Alternative Vercel URL

Deploying to Vercel

npm run build
vercel deploy

Project Structure

├── server.js          # Main HTTP server
├── client.js          # Frontend JavaScript
├── api/webhook.ts     # Vercel API function
├── ui.html            # Standalone test UI
└── package.json       # Dependencies

License

MIT License

About

A self-hosted webhook testing and debugging tool. Create webhooks to capture, inspect, and test HTTP requests with real-time updates and signature verification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors