qhook 0.2.1

Lightweight webhook gateway and workflow engine with queue, retry, and signature verification.
Documentation

qhook

Lightweight event-to-action engine. Turn webhooks and API events into reliable HTTP actions — single binary, no Redis, no Kubernetes.

License Rust CI

Documentation | Examples | Why qhook?


What qhook Does

  1. Receive events — webhooks (with signature verification), AWS SNS, or internal API
  2. Execute HTTP actions reliably — one call or a multi-step pipeline
  3. Handle failures — retry, error routing, rollback, Dead Letter Queue
Simple:                           Multi-step:
  event → POST /billing             event → build → deploy → notify
  (with retry + DLQ)                             ↓ fail
                                             rollback → alert

Why qhook?

  • Zero infrastructure. Single binary, SQLite for dev, Postgres for production. No Redis, no message broker.
  • Webhook verification built in. GitHub, Stripe, Shopify, PagerDuty, Grafana, Terraform Cloud, GitLab, HMAC, AWS SNS X.509.
  • From one action to a pipeline. Start with a single HTTP call; grow into multi-step workflows with branching, parallelism, and rollback — same YAML, same engine.
  • Production ready. Prometheus metrics, health checks, Slack/Discord alerts, rate limiting, structured logging.

See Why qhook? for detailed comparisons and use cases.

Quick Start

cargo install qhook
# Or: docker run -p 8888:8888 -v $(pwd)/qhook.yaml:/data/qhook.yaml ghcr.io/totte-dev/qhook

Simple: one event, one action

# qhook.yaml
database:
  driver: sqlite

sources:
  github:
    type: webhook
    verify: github
    secret: ${GITHUB_WEBHOOK_SECRET}

handlers:
  deploy:
    source: github
    events: [push]
    url: http://deployer:3000/deploy
    filter: "$.ref == refs/heads/main"
    retry: { max: 5 }

Multi-step: event triggers a pipeline

workflows:
  deploy-pipeline:
    source: github
    events: [push]
    timeout: 600
    steps:
      - name: build
        url: http://ci:3000/build
        retry: { max: 2, errors: [5xx, timeout] }
      - name: deploy-staging
        url: http://deployer:3000/deploy
        catch:
          - errors: [all]
            goto: rollback
      - name: smoke-test
        url: http://tester:3000/smoke
        catch:
          - errors: [all]
            goto: rollback
      - name: deploy-prod
        url: http://deployer:3000/deploy
        end: true
      - name: rollback
        url: http://deployer:3000/rollback
        end: true
qhook start

See the Getting Started guide for a full walkthrough.

Step Types

Type Description
HTTP (default) Call a URL with custom headers, chain response to next step
Choice Conditional branching based on payload values
Parallel Execute multiple branches concurrently
Map Iterate over an array, processing each element
Wait Pause for a duration or until a timestamp
Callback Pause, notify external service, wait for POST /callback/:token

See the Workflows guide for details.

Installation

cargo install qhook                    # From crates.io
docker pull ghcr.io/totte-dev/qhook    # Docker image

Or build from source:

git clone https://github.com/totte-dev/qhook.git && cd qhook
cargo build --release

CLI

qhook start                        # Start server
qhook init                         # Generate default config
qhook validate                     # Validate config
qhook jobs list --status dead      # List dead-letter jobs
qhook jobs retry                   # Retry all dead jobs
qhook events list                  # List received events
qhook workflow-runs list           # List workflow runs
qhook workflow-runs redrive <ID>   # Redrive a failed workflow

See the CLI Reference for all commands.

Documentation

Full documentation at totte-dev.github.io/qhook.

Topic Link
Getting Started getting-started
Configuration Reference configuration
CLI Reference cli
Webhook Verification guides/webhook-verification
CloudEvents guides/cloudevents
AWS SNS guides/sns
Workflows guides/workflows
Filtering & Transformation guides/filtering
gRPC Output guides/grpc
Monitoring & Alerts guides/monitoring
Security guides/security
Deployment deploy
Why qhook? why-qhook

Examples

Example Description
quickstart Minimal setup, no Docker needed
github-webhook GitHub push/PR with signature verification
filter-transform Event filtering + payload transformation
stripe-checkout Stripe checkout with dual handlers
workflow Multi-step pipeline with catch routing
tenant-provision Tenant provisioning with rollback and auth headers
alert-remediation PagerDuty alert → triage → remediate → escalate

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.