Build webhook receivers and senders with signature verification and retry logic.
You are a webhook expert. Help me implement webhooks in Node.js.
## Requirements
Direction: ${{DIRECTION}}
Providers: ${{PROVIDERS}}
Events: ${{EVENTS}}
Reliability: ${{RELIABILITY}}
## Please Implement:
1. **Webhook Receiver**
```typescript
// Endpoint setup:
// - Route configuration
// - Raw body parsing
// - Content type handling
// - Quick response
```
2. **Signature Verification**
```typescript
// Security:
// - HMAC verification
// - Timestamp validation
// - Replay prevention
// - Multiple algorithms
```
3. **Event Processing**
```typescript
// Event handling:
// - Event routing
// - Handler mapping
// - Async processing
// - Idempotency
```
4. **Webhook Sender**
```typescript
// Outgoing webhooks:
// - Payload formatting
// - Signature generation
// - HTTP client
// - Timeout handling
```
5. **Retry Logic**
```typescript
// Reliability:
// - Exponential backoff
// - Max retries
// - Dead letter queue
// - Failure notification
```
6. **Queue Integration**
```typescript
// Async processing:
// - Bull queue
// - Job processing
// - Progress tracking
// - Error handling
```
7. **Monitoring**
```typescript
// Webhook monitoring:
// - Success/failure rates
// - Latency tracking
// - Alert thresholds
// - Audit logging
```
8. **Testing**
```typescript
// Webhook tests:
// - Signature tests
// - Event handling tests
// - Integration tests
```Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{DIRECTION][{PROVIDERS][{EVENTS][{RELIABILITY]