| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
WebhookBox is a Postgres-first webhook delivery service built in Rust.
It gives you:
docker compose up -dCreate .env in project root:
DATABASE_URL=postgres://webhookbox:webhookbox@localhost:5432/webhookbox
HOST=127.0.0.1
PORT=3000
API_KEY=change-me-admin-key
SECRETS_KEY=change-me-secrets-key
RUST_LOG=infoAPI_KEY protects admin routes. SECRETS_KEY encrypts endpoint secrets at rest.
sqlx migrate runcargo runIn a second terminal:
cargo run --bin workercurl -s -X POST http://127.0.0.1:3000/tenants \
-H "x-api-key: change-me-admin-key" \
-H "content-type: application/json" \
-d '{"name":"demo-tenant"}'Save tenant.id from the response.
curl -s -X POST http://127.0.0.1:3000/tenants/<TENANT_ID>/api-keys \
-H "x-api-key: change-me-admin-key" \
-H "content-type: application/json" \
-d '{"label":"demo"}'Save api_key.key from the response (returned once).
curl -s -X POST http://127.0.0.1:3000/endpoints \
-H "x-tenant-api-key: <TENANT_API_KEY>" \
-H "content-type: application/json" \
-d '{
"tenant_id":"<TENANT_ID>",
"url":"https://example.com/webhook",
"secret":"super-secret"
}'curl -s -X POST http://127.0.0.1:3000/events \
-H "x-tenant-api-key: <TENANT_API_KEY>" \
-H "content-type: application/json" \
-d '{
"tenant_id":"<TENANT_ID>",
"event_type":"user.created",
"payload":{"user_id":123},
"idempotency_key":"demo-123"
}'curl -s "http://127.0.0.1:3000/events/<EVENT_ID>/deliveries" \
-H "x-tenant-api-key: <TENANT_API_KEY>"curl -s "http://127.0.0.1:3000/deliveries/<DELIVERY_ID>/timeline" \
-H "x-tenant-api-key: <TENANT_API_KEY>"curl -s "http://127.0.0.1:3000/deliveries/<DELIVERY_ID>/curl" \
-H "x-tenant-api-key: <TENANT_API_KEY>"GET /metrics returns Prometheus-style text metrics (admin key required).
curl -s http://127.0.0.1:3000/metrics \
-H "x-api-key: change-me-admin-key"Example metrics:
Use these as initial Prometheus/Grafana panels:
cargo fmt --all --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --allIntegration tests use TEST_DATABASE_URL (or DATABASE_URL fallback).
TBD
| Back | FazBrowse Home | New Git URL |