Skip to content

Commit 161439e

Browse files
42atomysgitbook-bot
authored andcommitted
docs(gitbook): No subject
1 parent 035bb8b commit 161439e

21 files changed

+2205
-0
lines changed

docs/.gitbook/assets/ha.png

21.9 KB
Loading
56.4 KB
Loading
36.2 KB
Loading
18.5 KB
Loading
18.5 KB
Loading
36.5 KB
Loading
36.5 KB
Loading

docs/.gitbook/assets/untitled.png

34 KB
Loading

docs/README.md

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
---
2+
description: What is the Webhooked project ?
3+
icon: address-card
4+
---
5+
6+
# About
7+
8+
## What is Webhooked?
9+
10+
**Webhooked** is a high-performance, production-ready webhook gateway built in Go that acts as a universal receiver for incoming webhooks. It provides a robust pipeline for capturing, validating, transforming, storing, and responding to webhook events from any source.
11+
12+
Think of Webhooked as a smart proxy that sits between webhook providers (GitHub, Stripe, custom services) and your infrastructure (databases, message queues, applications), handling all the complexity of webhook processing while you focus on your business logic.
13+
14+
{% hint style="info" %}
15+
_Webhooked is actively developed and we welcome contributions. Join us in building the future of webhook processing!_
16+
{% endhint %}
17+
18+
## Why Webhooked?
19+
20+
### The Problem
21+
22+
Modern applications integrate with dozens of external services, each sending webhooks with different:
23+
24+
* Authentication methods
25+
* Payload formats
26+
* Retry mechanisms
27+
* Rate limits
28+
* Error handling requirements
29+
30+
Managing these individually leads to:
31+
32+
* **Scattered webhook logic** across multiple services
33+
* **Inconsistent security** implementations
34+
* **No unified monitoring** or observability
35+
* **Complex retry logic** and error handling
36+
* **Performance bottlenecks** in webhook processing
37+
38+
### The Solution
39+
40+
Webhooked provides a **centralized, declarative approach** to webhook management:
41+
42+
```yaml
43+
# One configuration to rule them all
44+
webhooks:
45+
- name: github-events
46+
entrypointUrl: /webhooks/github
47+
security:
48+
type: github
49+
specs:
50+
secret: ${{ env.GITHUB_SECRET }}
51+
storage:
52+
- type: redis
53+
- type: postgres
54+
response:
55+
statusCode: 200
56+
```
57+
58+
## Key Features
59+
60+
### 🚀 Extreme Performance
61+
62+
* **50,000+ requests/second** on [commodity hardware](#user-content-fn-1)[^1]
63+
* Built with `fasthttp` (10x faster than `net/http`)
64+
* Kernel-level load balancing with `reuseport`
65+
* Zero-allocation patterns for minimal GC pressure
66+
* Concurrent storage operations
67+
68+
### 🔐 Enterprise-Grade Security
69+
70+
* **Multiple built-ins** authentication providers
71+
* **Rate limiting** with token bucket algorithm
72+
* **Request validation** and sanitization
73+
* **Audit logging** for compliance
74+
75+
### 🔄 Powerful Data Transformation
76+
77+
* **Go template engine** with 100+ functions via [go-sprout](https://github.com/go-sprout/sprout)
78+
* **JSON manipulation** and parsing
79+
* **Custom formatting** per storage backend
80+
* **Request/response transformation**
81+
82+
### 💾 Multi-Backend Storage
83+
84+
* **Parallel writes** to multiple backends
85+
* **Support multiples backends**:
86+
* Message queuing
87+
* Persistent storage
88+
* More coming soon
89+
* **Per-backend formatting** and transformation
90+
* **Automatic retry** and error handling
91+
92+
### 📊 Observability
93+
94+
* **Prometheus metrics** out of the box
95+
* **Structured JSON logging**
96+
* **Request tracing** with correlation IDs
97+
* **Health check endpoints**
98+
* **Performance metrics** per webhook
99+
100+
### 🎛️ Zero-Code Configuration
101+
102+
* **Kubernetes-style YAML** configuration
103+
* **Environment variable** substitution
104+
* **File-based secrets** management
105+
* **Hot reload** configuration changes
106+
* **Validation** before applying changes
107+
108+
## Use Cases
109+
110+
### GitHub/GitLab CI/CD Integration
111+
112+
Receive repository events and trigger CI/CD pipelines:
113+
114+
```yaml
115+
webhooks:
116+
- name: ci-trigger
117+
entrypointUrl: /github/push
118+
security:
119+
type: github
120+
storage:
121+
- type: rabbitmq # Queue for CI workers
122+
```
123+
124+
### Payment Processing
125+
126+
Handle Stripe/PayPal webhooks for payment events:
127+
128+
```yaml
129+
webhooks:
130+
- name: payments
131+
entrypointUrl: /stripe/events
132+
security:
133+
type: stripe
134+
storage:
135+
- type: postgres # Audit trail
136+
- type: redis # Real-time processing
137+
```
138+
139+
### Multi-Tenant SaaS
140+
141+
Route webhooks to tenant-specific backends:
142+
143+
```yaml
144+
webhooks:
145+
- name: tenant-webhooks
146+
entrypointUrl: /tenants/{id}/webhooks
147+
storage:
148+
- type: postgres
149+
specs:
150+
query: INSERT INTO tenant_{{ .PathParams.id }}_events
151+
```
152+
153+
### Event Aggregation
154+
155+
Collect events from multiple sources into a data lake:
156+
157+
```yaml
158+
webhooks:
159+
- name: event-collector
160+
entrypointUrl: /events/{source}
161+
storage:
162+
- type: redis # Hot data
163+
- type: postgres # Warm data
164+
- type: s3 # Cold data (coming soon)
165+
```
166+
167+
### Webhook Debugging
168+
169+
Development and testing of webhook integrations:
170+
171+
```yaml
172+
webhooks:
173+
- name: debug
174+
entrypointUrl: /debug
175+
security:
176+
type: noop # No auth for testing
177+
response:
178+
formatting:
179+
templateString: |
180+
{
181+
"received": {{ .Payload }},
182+
"headers": {{ .Request.Header | toJSON }}
183+
}
184+
```
185+
186+
## Comparison with Alternatives
187+
188+
| Feature | Webhooked | Webhook.site | ngrok |
189+
| ------------------- | ---------- | ------------ | ------- |
190+
| Performance | 50K+ req/s | Limited | Limited |
191+
| Multi-storage | ✅ | ❌ | ❌ |
192+
| Security Providers | Multiple | Basic | Tunnel |
193+
| Data Transformation | Advanced | ❌ | ❌ |
194+
| Self-hosted | ✅ | ❌ | Partial |
195+
| Configuration | YAML | UI | CLI |
196+
| Monitoring | Built-in | Basic | Basic |
197+
| Rate Limiting | ✅ | Limited | ❌ |
198+
| Open Source | ✅ | ❌ | ❌ |
199+
200+
{% hint style="info" %}
201+
_Help is wanted to fullfil this section with more data._
202+
{% endhint %}
203+
204+
## When to Use Webhooked
205+
206+
**Webhooked is perfect when you need:**
207+
208+
* High-performance webhook processing
209+
* Multiple webhook sources with different auth methods
210+
* Data transformation before storage
211+
* Multiple storage backends
212+
* Production-grade reliability
213+
* Centralized webhook management
214+
* Compliance and audit requirements
215+
216+
**Consider alternatives when:**
217+
218+
* You only need temporary webhook testing (use webhook.site)
219+
* You need webhook tunneling to localhost (use ngrok)
220+
221+
## Core Philosophy
222+
223+
Webhooked follows these design principles:
224+
225+
1. **Performance First**: Every design decision prioritizes throughput and latency
226+
2. **Configuration over Code**: Declarative YAML configuration for all features
227+
3. **Security by Default**: Secure defaults with explicit opt-out
228+
4. **Cloud Native**: Kubernetes-ready, 12-factor app principles
229+
5. **Observable**: Metrics and logging built-in, not bolted-on
230+
6. **Extensible**: Plugin architecture for custom providers
231+
232+
## Project Status
233+
234+
* **Current Version**: v1alpha2
235+
* **Production Ready**: Yes, used in production by multiple companies
236+
* **API Stability**: Alpha (breaking changes possible)
237+
* **License**: Dual licensed (AGPL-3.0 / Commercial)
238+
* **Maintained by**: 42Atomys and community contributors
239+
240+
241+
242+
[^1]: _tested on Apple Macbook Pro Intel 2019_

docs/SUMMARY.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Table of contents
2+
3+
* [About](README.md)
4+
* [Roadmap to Webhooked v1.0](roadmap-to-webhooked-v1.0.md)
5+
* [Licensing](licensing.md)
6+
7+
## Introduction
8+
9+
* [Getting Started](introduction/getting-started.md)
10+
* [Troubleshooting](introduction/troubleshooting.md)
11+
12+
## Configuration
13+
14+
* [Sourcing (Valuable)](configuration/sourcing-valuable.md)
15+
* [Formatting](configuration/formatting.md)
16+
* [Security Layer](configuration/security-layer.md)
17+
* [Storage Layer](configuration/storage-layer.md)
18+
* [Response Layer](configuration/response-layer.md)
19+
* [Metrics](configuration/metrics.md)
20+
* [Throttling](configuration/throttling.md)
21+
22+
## Links
23+
24+
* [GitHub repository](https://github.com/42atomys/webhooked)

0 commit comments

Comments
 (0)