How vivekagent47/dstream works
dstream is a webhook gateway and developer console: senders post to an ingest URL, events are durably recorded and queued, and workers apply connection policy before delivering with retries and attempt visibility. The API and dashboard also manage sources, destinations, connections, outbound applications, endpoint portals, identity, and operational views; the CLI supports local forwarding. Edges cite excerpts or README statements; several dashboard and API capabilities are represented at their known paths, but unsampled internals and links are omitted where invocation evidence is unavailable.
Main entry points: router.go HTTP API router · dqueue.go Redis queues · ingest/handler.go Webhook ingest · deliver/handler.go Connection delivery
Components 24
Inbound pipeline
- Webhook ingest
internal/ingest/handler.go - Event store
internal/store/events.sql.go
Delivery runtime
- Redis queues
internal/dqueue/dqueue.go - Delivery worker
cmd/dstream/worker.go - Connection delivery
internal/deliver/handler.go - Filter engine
internal/filter/filter.go - Transform engine
internal/transform/transform.go
Outbound webhooks
- Publish and portal API
internal/api/outbound - Message fan-out
internal/webhook/handler.go - Application records
internal/store/applications.sql.go
API and identity
- HTTP API router
internal/api/router.go - Pipeline management
internal/api/pipeline - Identity and orgs
internal/api/identity - Authentication
internal/auth - Operations console
internal/admin/router.go - Metrics collector
internal/metrics/collector.go
Dashboard
- Dashboard routes
web/src/routeTree.gen.ts - Dashboard API client
web/src/lib/api.ts - Customer portal
web/src/routes/portal/route.tsx
Other components
- Webhook sender
- Webhook endpoint
- PostgreSQL
- dstream CLI
cmd/dstream/cli.go - Local app
Connections 28
- Webhook sender → Webhook ingest: posts webhook
- Webhook ingest → Event store: records request/events
internal/ingest/handler.go - Webhook ingest → Redis queues: enqueues delivery
- Delivery worker → Redis queues: consumes jobs
cmd/dstream/worker.go - Delivery worker → Connection delivery: processes deliveries
cmd/dstream/worker.go - Connection delivery → Filter engine: filters payload
internal/deliver/handler.go - Connection delivery → Transform engine: transforms payload
internal/deliver/handler.go - Connection delivery → Webhook endpoint: sends webhook
- HTTP API router → Pipeline management: routes pipeline
internal/api/router.go - HTTP API router → Identity and orgs: routes identity
internal/api/router.go - HTTP API router → Publish and portal API: routes outbound
internal/api/router.go - HTTP API router → Authentication: applies auth
internal/api/router.go - Identity and orgs → Authentication: uses auth services
internal/api/identity/handlers.go - Pipeline management → Redis queues: queues tests/replay
internal/api/pipeline/handlers.go - Pipeline management → Event store: manages pipeline data
internal/api/pipeline/handlers.go - Publish and portal API → Application records: stores applications
internal/api/outbound/applications.go - Message fan-out → Redis queues: schedules deliveries
internal/webhook/handler.go - Message fan-out → Filter engine: filters messages
internal/webhook/handler.go - Message fan-out → Transform engine: transforms messages
internal/webhook/handler.go - Dashboard routes → Dashboard API client: requests API
- Dashboard API client → HTTP API router: calls endpoints
- Customer portal → HTTP API router: uses portal API
- Operations console → Redis queues: inspects queues
internal/admin/router.go - Metrics collector → PostgreSQL: queries metrics
internal/metrics/collector.go - Delivery worker → PostgreSQL: loads delivery state
- Webhook ingest → PostgreSQL: persists events
- dstream CLI → HTTP API router: opens tunnel
- dstream CLI → Local app: forwards requests