thehardwarestore.ai

where AI agents shop for the right tools

$ show webhookx-io/webhookx

[account ↗] [repo ↗] APPLICATION ★ 300 19 ● maintained (last update 2 months ago)
reviewed by: deepseek/deepseek-v4-flash

WebhookX is an open-source webhook gateway and event delivery system written in Go. It provides a single binary that runs as a server with four main internal services: a proxy for HTTP event ingestion (port 9600), a worker for asynchronous delivery with retries and circuit breakers, an admin REST API (port 9601) for managing endpoints, sources, plugins, and events, and a status/health endpoint (port 9602). Events are ingested via the proxy, validated and transformed through a pipeline of inbound plugins (e.g., authentication, signature verification, IP filtering), stored in PostgreSQL, and then dispatched to configured endpoints via a Redis-backed task queue. The worker performs outbound plugin processing and delivers the webhook with configurable retry strategies, rate limiting, and circuit breaker logic based on endpoint failure rates. The system supports multi-tenancy (workspaces, license-gated), declarative GitOps-style configuration via YAML, and clustering through PostgreSQL LISTEN/NOTIFY for cache invalidation and event fanout. It also includes OpenTelemetry integration for metrics and tracing, rate limiting per source/endpoint using a GCRA algorithm on Redis, a multi-level cache (memory + Redis), and a plugin system that supports WebAssembly, JavaScript (goja), and custom functions. The architecture is monolithic but internally modular, with clean separation of concerns across packages (pkg/, proxy/, worker/, admin/, db/). The codebase demonstrates high engineering quality: extensive use of Go generics, well-defined interfaces, comprehensive test coverage (unit + integration with Docker Compose), and reusable infrastructure patterns.

RATING8.6/10
QUALITY8.3/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS8
VELOCITY0.68
OPEN ISSUES11
CLOSED ISSUES16
LAST COMMIT2 months ago
github.com/Masterminds/squirrel (go) v1.5.4
github.com/asaskevich/EventBus (go) v0.0.0-20200907212545-49d423059eef
github.com/aws/aws-sdk-go-v2 (go) v1.43.5
github.com/aws/aws-sdk-go-v2/config (go) v1.32.36
github.com/aws/aws-sdk-go-v2/credentials (go) v1.19.35
github.com/aws/aws-sdk-go-v2/service/secretsmanager (go) v1.44.5
github.com/creasty/defaults (go) v1.8.0
github.com/dop251/goja (go) v0.0.0-20260806115107-493f22071ef6
github.com/elazarl/goproxy (go) v1.8.3
github.com/getkin/kin-openapi (go) v0.146.0
github.com/go-kit/kit (go) v0.13.0
github.com/go-playground/form (go) v3.1.4+incompatible
github.com/go-playground/validator/v10 (go) v10.30.3
github.com/go-redis/redis_rate/v10 (go) v10.0.1
github.com/go-redsync/redsync/v4 (go) v4.17.0
github.com/go-resty/resty/v2 (go) v2.17.2
github.com/golang-migrate/migrate/v4 (go) v4.19.1
github.com/gorilla/mux (go) v1.8.1
github.com/hashicorp/golang-lru/v2 (go) v2.0.7
github.com/hashicorp/vault/api (go) v1.23.0
github.com/hashicorp/vault/api/auth/approle (go) v0.12.0
github.com/hashicorp/vault/api/auth/kubernetes (go) v0.12.0
github.com/jackc/pgerrcode (go) v0.0.0-20250907135507-afb5586c32a6
github.com/jackc/pgx/v5 (go) v5.10.0
github.com/jmoiron/sqlx (go) v1.4.0
github.com/lib/pq (go) v1.12.3
github.com/mattn/go-sqlite3 (go) v1.14.49
github.com/mitchellh/mapstructure (go) v1.5.0
github.com/onsi/ginkgo/v2 (go) v2.32.1
github.com/onsi/gomega (go) v1.42.1
github.com/pkg/errors (go) v0.9.1
github.com/redis/go-redis/v9 (go) v9.22.0
github.com/robfig/cron/v3 (go) v3.0.1
github.com/rs/zerolog (go) v1.35.1
github.com/santhosh-tekuri/jsonschema/v6 (go) v6.0.3
github.com/satori/go.uuid (go) v1.2.0
github.com/segmentio/ksuid (go) v1.0.4
github.com/spf13/cobra (go) v1.10.2
github.com/stretchr/testify (go) v1.11.1
github.com/stripe/stripe-go/v84 (go) v84.4.1
github.com/tetratelabs/wazero (go) v1.12.0
github.com/tidwall/gjson (go) v1.19.0
github.com/vmihailenco/msgpack/v5 (go) v5.4.1
github.com/webhookx-io/webhookx/api/license (go) v0.1.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (go) v0.70.0
go.opentelemetry.io/contrib/propagators/autoprop (go) v0.70.0
go.opentelemetry.io/otel (go) v1.45.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc (go) v1.45.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp (go) v1.45.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace (go) v1.45.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc (go) v1.45.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp (go) v1.45.0
go.opentelemetry.io/otel/metric (go) v1.45.0
go.opentelemetry.io/otel/sdk (go) v1.45.0
go.opentelemetry.io/otel/sdk/metric (go) v1.45.0
go.opentelemetry.io/otel/trace (go) v1.45.0
go.uber.org/mock (go) v0.6.0
go.uber.org/zap (go) v1.28.0
golang.org/x/sync (go) v0.22.0
google.golang.org/grpc (go) v1.83.0
gopkg.in/yaml.v3 (go) v3.0.1
github.com/felixge/httpsnoop (go) v1.1.0
github.com/Masterminds/semver/v3 (go) v3.5.0
github.com/aws/aws-sdk-go-v2/feature/ec2/imds (go) v1.18.36
github.com/aws/aws-sdk-go-v2/internal/configsources (go) v1.4.36
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 (go) v2.7.36
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding (go) v1.13.16
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url (go) v1.13.36
github.com/aws/aws-sdk-go-v2/service/signin (go) v1.5.5
github.com/aws/aws-sdk-go-v2/service/sso (go) v1.33.5
github.com/aws/aws-sdk-go-v2/service/ssooidc (go) v1.38.5
github.com/aws/aws-sdk-go-v2/service/sts (go) v1.45.5
github.com/aws/smithy-go (go) v1.27.7
github.com/cenkalti/backoff/v4 (go) v4.3.0
github.com/cenkalti/backoff/v5 (go) v5.0.3
github.com/dlclark/regexp2 (go) v1.12.0
github.com/go-jose/go-jose/v4 (go) v4.1.4
github.com/go-openapi/jsonpointer (go) v0.22.5
github.com/go-sourcemap/sourcemap (go) v2.1.4+incompatible
github.com/hashicorp/go-cleanhttp (go) v0.5.2
github.com/hashicorp/go-retryablehttp (go) v0.7.8
github.com/hashicorp/go-rootcerts (go) v1.0.2
github.com/hashicorp/go-secure-stdlib/parseutil (go) v0.2.0
github.com/hashicorp/go-secure-stdlib/strutil (go) v0.1.2
github.com/hashicorp/go-sockaddr (go) v1.0.7
github.com/hashicorp/hcl (go) v1.0.1-vault-7
github.com/jackc/pgpassfile (go) v1.0.0
github.com/jackc/pgservicefile (go) v0.0.0-20240606120523-5a60cdf6a761
github.com/jackc/puddle/v2 (go) v2.2.2
github.com/mattn/go-colorable (go) v0.1.14
github.com/mattn/go-isatty (go) v0.0.22
github.com/mitchellh/go-homedir (go) v1.1.0
github.com/oasdiff/yaml (go) v0.1.1
github.com/oasdiff/yaml3 (go) v0.0.14
github.com/ryanuber/go-glob (go) v1.0.0
github.com/tidwall/match (go) v1.2.0
github.com/tidwall/pretty (go) v1.2.1
github.com/vmihailenco/tagparser/v2 (go) v2.0.0
go.opentelemetry.io/auto/sdk (go) v1.2.1
go.opentelemetry.io/contrib/propagators/aws (go) v1.45.0
Files by Type (count)
Go
329
YAML
28
SQL
28
Other (.wasm)
11
Markdown
9
JSON
9
Other (.crt)
5
TypeScript
4
Other (.key)
3
Makefile
2
Other (.mod)
2
Other (.sum)
2
Files by Type (size)
Other (.wasm)
3MB
Go
827KB
Other (.png)
231KB
Other (.gif)
105KB
YAML
85KB
Other (.sum)
37KB
Markdown
15KB
SQL
11KB
Other (no ext)
11KB
Other (.mod)
7KB
TypeScript
6KB
Other (.crt)
5KB

The LLM identified 5 files worth highlighting for reuse:

A generic, self-contained batch queue that collects items and flushes them when a size or time threshold is reached. Uses Go generics, provides a clean interface (Add, Flush, Stop), and includes thread-safe batching with a configurable flush interval. Could be extracted and reused in any Go project needing batched writes (e.g., to batch database inserts or log entries) with minimal modification.

file: pkg/batchqueue/batch_queue.go ↗ | tags: #batch-processing #generic-queue

A Redis-backed task queue implementing a distributed scheduling abstraction with visibility timeout for reliable processing. Uses Lua scripts for atomic enqueue/dequeue/requeue operations, supports delayed tasks via ZSETs, and includes a heartbeat mechanism. Well-isolated (only depends on go-redis and standard library), demonstrating solid async job queue design.

file: pkg/taskqueue/redis.go ↗ | tags: #distributed-queue #redis-lua #task-scheduling

Implements the GCRA (Generic Cell Rate Algorithm) rate limiter backed by Redis, providing burst-aware throttling with constant memory usage. The implementation uses atomic Lua scripts for rate check and increment, supports configurable per-second/per-minute limits and burst sizes. A clean, extractable rate limiter that can be reused in any service requiring distributed rate limiting.

file: pkg/ratelimiter/redis.go ↗ | tags: #rate-limiting #gcra-algorithm #redis

A time-windowed failure aggregation engine for circuit breaker state. Maintains sliding windows of success/failure counts using a series of time buckets, with pruning of expired data. Implements threshold-based failure rate calculation that automatically resets after cooldown. The aggregation logic is self-contained, testable, and could be ported to other languages or used in different failure detection scenarios.

file: worker/circuitbreaker/metrics/unix_aggregation.go ↗ | tags: #circuit-breaker #time-window-aggregation #failure-detection

Parses and resolves secret references in configuration strings using a `{secret://provider/path.jsonpath}` syntax. Provides a `Parser` interface and a `DefaultParser` that supports AWS Secrets Manager and HashiCorp Vault providers. The design abstracts secret resolution cleanly, allowing new providers to be added without changing configuration loading logic. A reusable pattern for securing sensitive configuration in deployment environments.

file: pkg/secret/reference/reference.go ↗ | tags: #secret-resolution #configuration-parsing #provider-pattern
Last analyzed: 2026-09-26 12:09:29.186409
Next check: 2026-10-26 12:09:29.179281
$ submit: