An open-source webhook proxy service that allows developers to test webhooks locally. Forward webhooks from the cloud to your local development environment with ease.
- 🔄 Real-time webhook forwarding - Forward webhooks to your local development environment
- 📊 Beautiful dashboard - Monitor webhooks in real-time with a modern React interface
- 🔧 CLI tool - Manage endpoints and view logs from your terminal
- 🔐 Secure - API key authentication and endpoint isolation
- 🚦 Reliable delivery - Automatic retries with exponential backoff
- 📝 Request/Response logging - Full visibility into webhook payloads and responses
- 🐳 Docker ready - Easy deployment with Docker Compose
- ⚡ High performance - Built with Fastify and optimized for speed
# Clone the repository
git clone https://github.com/ersinkoc/webhook-proxy.git
cd webhook-proxy
# Start all services
docker-compose up -d
# Access the dashboard
open http://localhost
- Node.js 18+
- PostgreSQL 15+
- Redis 7+
- pnpm 8+
# Clone the repository
git clone https://github.com/ersinkoc/webhook-proxy.git
cd webhook-proxy
# Install dependencies
pnpm install
# Setup environment variables
cp packages/server/.env.example packages/server/.env
# Edit .env with your configuration
# Run database migrations
pnpm db:migrate
# Seed the database (optional)
pnpm db:seed
# Start development servers
pnpm dev
npm install -g @ersinkoc/webhook-proxy-cli
# Initialize configuration
webhook-proxy init
# Login with your API key
webhook-proxy login whp_your_api_key_here
# Create an endpoint
webhook-proxy create "My App" "http://localhost:3000/webhook"
# List all endpoints
webhook-proxy list
# Follow webhook logs in real-time
webhook-proxy logs <endpoint-id> --follow
# Create a quick tunnel to a local port
webhook-proxy tunnel 3000
init
- Initialize webhook proxy configurationlogin <api-key>
- Authenticate with your API keylogout
- Clear authenticationcreate <name> <target-url>
- Create a new endpointlist
- List all endpointsdelete <endpoint-id>
- Delete an endpointinfo <endpoint-id>
- Show endpoint detailslogs <endpoint-id>
- Show webhook logsstatus
- Show connection statustunnel <port>
- Create a quick tunnel to a local porttest <endpoint-id>
- Send a test webhook
Include your API key in the request headers:
X-API-Key: whp_your_api_key_here
POST /api/endpoints
Content-Type: application/json
{
"name": "My Endpoint",
"targetUrl": "http://localhost:3000/webhook"
}
GET /api/endpoints
GET /api/endpoints/:id
PUT /api/endpoints/:id
Content-Type: application/json
{
"name": "Updated Name",
"targetUrl": "http://localhost:4000/webhook",
"isActive": true
}
DELETE /api/endpoints/:id
GET /api/webhooks?endpointId=:endpointId&page=1&pageSize=20
GET /api/webhooks/:id
POST /api/webhooks/:id/resend
The project is organized as a monorepo with the following packages:
packages/server
- Fastify API server with webhook forwardingpackages/web
- React dashboard built with Vitepackages/cli
- Command-line interface toolpackages/shared
- Shared types and utilities
- Backend: Node.js, Fastify, Prisma, PostgreSQL, Redis, BullMQ
- Frontend: React, TypeScript, Vite, Tailwind CSS, Zustand
- CLI: Commander.js, Inquirer, Chalk
- Real-time: Socket.io
- Infrastructure: Docker, Docker Compose
webhook-proxy/
├── packages/
│ ├── server/ # API server
│ ├── web/ # React dashboard
│ ├── cli/ # CLI tool
│ └── shared/ # Shared utilities
├── docker/ # Docker configurations
├── docs/ # Documentation
└── scripts/ # Build and deployment scripts
# Development
pnpm dev # Start all packages in dev mode
pnpm build # Build all packages
pnpm test # Run tests
pnpm lint # Lint code
pnpm typecheck # Type check
# Database
pnpm db:migrate # Run migrations
pnpm db:generate # Generate Prisma client
pnpm db:seed # Seed database
# Docker
docker-compose up # Start production stack
docker-compose -f docker-compose.dev.yml up # Start dev dependencies
Create a .env
file in packages/server/
:
NODE_ENV=development
PORT=3001
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/webhookproxy"
# Redis
REDIS_URL="redis://localhost:6379"
# Security
JWT_SECRET="your-super-secret-jwt-key"
API_KEY_SALT="your-api-key-salt"
# URLs
API_BASE_URL="http://localhost:3001"
WEB_BASE_URL="http://localhost:3000"
PUBLIC_WEBHOOK_URL="http://localhost:3001"
# Webhook Configuration
WEBHOOK_TIMEOUT_MS=30000
WEBHOOK_MAX_RETRIES=3
WEBHOOK_RETRY_DELAY_MS=1000
- Build and start the containers:
docker-compose up -d
- Run database migrations:
docker-compose exec server pnpm prisma migrate deploy
- Access the application:
- Dashboard: http://localhost
- API: http://localhost:3001
See DEPLOYMENT.md for detailed deployment instructions for various platforms.
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Never expose your API keys publicly
- Use HTTPS in production
- Regularly rotate API keys
- Report security vulnerabilities at GitHub Issues
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with ❤️ by the open-source community
- Inspired by ngrok, localtunnel, and similar tools
- Special thanks to all contributors
- 🐛 Issues: GitHub Issues