|
1 | 1 | # Webhook Router |
2 | 2 |
|
3 | | -Webhook Router normalizes incoming webhook payloads into Markdown and forwards them to one or more downstream targets. It includes a lightweight console UI and a basic API for managing endpoints and targets. |
| 3 | +A universal webhook adapter that normalizes incoming webhook payloads into Markdown and forwards them to multiple downstream targets with platform-specific formatting. |
4 | 4 |
|
5 | | -## What it does |
6 | | -- Accepts incoming webhooks and normalizes content to Markdown. |
7 | | -- Forwards events to multiple targets and records delivery results. |
8 | | -- Provides a console UI under `/console` and a Basic Auth protected API under `/console/api`. |
| 5 | +## Background |
| 6 | + |
| 7 | +Many monitoring and alerting tools (like GlitchTip, Sentry, etc.) only support a limited set of webhook targets such as Slack and Discord. However, teams often use different communication platforms (DingTalk, Lark, WeCom, etc.) that aren't on the supported list. This creates a gap when you need to receive alerts in your team's preferred tool. |
| 8 | + |
| 9 | +Webhook Router solves this problem by acting as a universal adapter that: |
| 10 | +- **Accepts webhooks from multiple platforms** (ingress compatibility) - supports various webhook formats including Slack, DingTalk, Lark, WeCom, and custom HTTP webhooks |
| 11 | +- **Forwards to multiple platforms** (egress compatibility) - converts and delivers messages to any supported target platform |
| 12 | +- **Normalizes content to Markdown** - provides a unified intermediate format for easy transformation |
| 13 | +- **Manages multiple targets** - send one webhook to many destinations simultaneously |
| 14 | + |
| 15 | +## Features |
| 16 | + |
| 17 | +- Accepts incoming webhooks and normalizes content to Markdown |
| 18 | +- Forwards events to multiple targets with platform-specific formatting |
| 19 | +- Records delivery results for each target |
| 20 | +- Provides a console UI under `/console` and a Basic Auth protected API under `/console/api` |
| 21 | +- Supports custom banner/footer for message customization |
9 | 22 |
|
10 | 23 | ## Docker |
11 | 24 | The container expects configuration through environment variables. |
@@ -87,19 +100,25 @@ pnpm install |
87 | 100 | Run the backend (builds the console as a dependency): |
88 | 101 |
|
89 | 102 | ```bash |
90 | | -pnpm exec nx run webhook_router:run:debug |
| 103 | +nx run webhook_router:run:debug |
91 | 104 | ``` |
92 | 105 |
|
93 | 106 | Run tests: |
94 | 107 |
|
95 | 108 | ```bash |
96 | | -pnpm exec nx run webhook_router:test |
| 109 | +nx test webhook_router |
| 110 | +``` |
| 111 | + |
| 112 | +Run e2e tests: |
| 113 | + |
| 114 | +```bash |
| 115 | +nx e2e console-e2e --outputStyle=static |
97 | 116 | ``` |
98 | 117 |
|
99 | 118 | Generate OpenAPI + API client: |
100 | 119 |
|
101 | 120 | ```bash |
102 | | -pnpm exec nx run @webhook-router/api-client:generate |
| 121 | +nx run api-client:generate |
103 | 122 | ``` |
104 | 123 |
|
105 | 124 | ## Docs |
|
0 commit comments