A modern, full-stack application designed to capture, inspect, and automatically generate TypeScript handlers for webhook requests. Features real-time visualization with AI-powered handler code generation.
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Running
- API Documentation
- Architecture
- Webhook Capture: Real-time webhook request logging and inspection
- AI Handler Generation: Automatically generate TypeScript/Zod handlers from webhook payloads using Claude AI
- Interactive Dashboard: Modern React UI for viewing and managing webhooks
- Type-Safe API: End-to-end type safety with Zod validation
- Database Persistence: Store and retrieve webhook history
- Auto-Generated Docs: Interactive API documentation with Scalar
- React 19 - Latest UI framework with newest features
- Vite - Lightning-fast build tool and dev server
- TypeScript - Full type safety
- Tailwind CSS - Utility-first styling
- TanStack Router - Modern routing
- TanStack Query - Data fetching & caching
- Lucide React - Beautiful icons
- Fastify - High-performance Node.js web framework
- Drizzle ORM - Type-safe SQL ORM
- PostgreSQL - Relational database
- Zod - Schema validation
- Claude AI API - Handler generation
- Docker - Database containerization
- @fastify/type-provider-zod - Fastify + Zod integration
- Scalar - Interactive API docs at
/docs - UUIDv7 - Time-sortable identifiers
- Biome - Fast linter & formatter
.
├── api/ # Fastify backend
│ ├── src/
│ │ ├── db/ # Drizzle schemas & migrations
│ │ ├── routes/ # API endpoints
│ │ ├── server.ts # Server setup
│ │ └── env.ts # Environment variables
│ └── package.json
├── web/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── routes/ # Page routes
│ │ ├── http/ # API client
│ │ └── main.tsx # Entry point
│ └── package.json
└── pnpm-workspace.yaml # Monorepo configuration
-
Clone the repository
git clone <repository-url> cd webhook-inspector
-
Install dependencies
pnpm install
-
Setup environment variables
cd api cp .env.example .env # Configure with your credentials
-
Start PostgreSQL
docker-compose up -d
-
Run database migrations
pnpm db:generate pnpm db:migrate
Terminal 1 - Backend:
cd api
pnpm devBackend runs on http://localhost:3000
Terminal 2 - Frontend:
cd web
pnpm devFrontend runs on http://localhost:5173
pnpm build
pnpm startInteractive API documentation is available at:
http://localhost:3000/docs
POST /webhooks/:id/capture- Capture webhook payloadGET /webhooks- List all webhooksGET /webhooks/:id- Get webhook detailsDELETE /webhooks/:id- Delete webhookPOST /api/generate- Generate TypeScript handler from webhook payloads
- Webhook Capture → External service sends POST to
/webhooks/:id/capture - Storage → Payload persisted to PostgreSQL with UUIDv7
- Dashboard → React UI displays captured webhooks in real-time
- Handler Generation → AI analyzes payloads and generates TypeScript + Zod handlers
- Code Output → Generated handlers returned for implementation
- Zod schemas for all API contracts
- TypeScript inference from Zod
- End-to-end type checking with Fastify type provider
- Database types auto-generated from Drizzle schemas
By Ana678