Skip to main content
Introducing packages.sweber.dev
All packages
StableMIT + Pro

VectorSelf-hosted webhooks for Node.js and TypeScript: Standard Webhooks signatures, retries, a delivery log and SSRF protection, in your own PostgreSQL, MySQL or SQLite.

pnpm add @sweberdev/vector

Sooner or later every SaaS product has to send webhooks to its customers. Doing it properly means signing every request, retrying for hours with backoff when a receiver is down, keeping a log your support team can read, refusing URLs that point into your own network and rotating secrets without downtime. Hosted services such as Svix or Hookdeck do this for you, from several hundred dollars a month, and every event and customer URL passes through their infrastructure.

Vector is the same building block as a library. It signs with the Standard Webhooks format that Svix uses, so receivers can verify with any Standard Webhooks or Svix library, retries eight times over about 27 hours, logs every message, delivery and attempt, and keeps all of it in your own PostgreSQL, MySQL or SQLite. It has no dependencies and runs on Node.js, Bun, Deno and in serverless functions.

Vector Pro adds an embeddable portal for your customers, a typed event catalog, operations tooling and verified inbound webhooks from Stripe, GitHub and others, messages in the format of Slack, Teams, Discord and Google Chat, and OpenTelemetry output. It is installed from a private GitHub Packages registry, licensed per person, with no licence key and no phone-home.

Example

A short exampleCopy it into your project.

lib/webhooks.ts

import { createVector } from "@sweberdev/vector"
import { createPostgresStore } from "@sweberdev/vector/postgres"

export const vector = createVector({
  store: createPostgresStore({ query: (text, params) => pool.query(text, params) }),
})

await vector.endpoints.create({
  tenant: "acme",
  url: "https://example.com/webhooks",
  eventTypes: ["invoice.*"],
})

await vector.send({ tenant: "acme", eventType: "invoice.paid", payload: { invoiceId: "inv_123" } })
vector.start() // delivers, retries for ~27 hours, logs every attempt

Features

What you getFree under MIT, with Pro on top.

Free, MIT

  • Signed webhooks following Standard Webhooks, with verify() for receivers
  • Per-tenant endpoints, retries with backoff and a delivery log
  • SSRF protection and secret rotation
  • Postgres, MySQL and in-memory stores; works on Node, Bun, Deno and edge
  • Transform, rate limit, ordering and payload filters

Pro

  • Everything in Free
  • Embeddable customer portal
  • Typed event catalog with generated docs
  • Alerts and circuit breaker, OpenTelemetry
  • Inbound webhooks from Stripe, GitHub, Shopify and more
  • Standalone server for PHP, Python and Go, with regions and limits
All features in detail

Free, MIT

  • Standard Webhooks signatures: HMAC-SHA256 in webhook-id, webhook-timestamp and webhook-signature, verifiable with the Standard Webhooks and Svix libraries
  • Ed25519 public-key signatures (v1a) as an option: receivers hold only a whpk_ public key and cannot forge webhooks
  • verify() and verifyRequest() for the receiving side, with replay protection and several secrets during a rotation
  • Endpoints per tenant with event type filters (invoice.*), custom headers and their own secret
  • Eight attempts over about 27 hours with exponential backoff, jitter, Retry-After and timeouts; dead endpoints are disabled automatically, also on 410 Gone
  • Delivery log of every message, delivery and attempt with status code and response; retry a delivery or resend a message with one call
  • SSRF protection: no localhost, private networks or cloud metadata, checked when an endpoint is created and again before every attempt
  • Secret rotation with a grace period, idempotency keys and test events
  • In-memory, PostgreSQL (pg, postgres.js, Neon, Supabase, PGlite), MySQL (mysql2) and SQLite (node:sqlite, better-sqlite3) stores, safe with several workers, or your own store
  • Long-running worker, or process() from a cron job with deliverNow for serverless
  • vector CLI: generate secrets and key pairs, sign, verify, send test events and receive webhooks locally
  • No dependencies; runs on Node.js, Bun, Deno and edge runtimes
  • transform hook: change the body per endpoint, add headers or skip a delivery, without touching the stored message
  • Rate limit per endpoint (requests per second, by option, function or endpoint metadata) that delays instead of failing, and egress through a proxy dispatcher for a fixed IP
  • hold hook: pause deliveries to an endpoint without using up retries, the building block for circuit breakers and maintenance windows
  • sendMany for up to 1000 events at once, and receiver dedupers (memory, Postgres, SQLite, MySQL) that skip repeated webhook ids
  • Ordered delivery per key: send with an orderingKey and later messages wait for earlier ones at each endpoint, while other keys keep flowing
  • Payload filters per endpoint (eq, in, gte, prefix, contains and more, combined with and, or, not), replay of a time range, prune for old messages and a versioned database schema that upgrades itself

Pro

  • Embeddable customer portal: a tenant-scoped REST handler (adapters for Express, Hono, Fastify and plain Node) and React components for endpoints, secrets, a searchable message log (id, payload text, status, endpoint), retries, test events and an event catalog with examples and schemas; light, dark and shadcn/ui themes; customers can replay a time range and set payload filters themselves
  • Typed event catalog with Standard Schema validation, generated Markdown docs, AsyncAPI 3 and TypeScript types, with a CLI
  • Operations: alerts to Slack, email or a webhook, a circuit breaker per endpoint, weekly reports per tenant, bulk recovery after outages, health reports, Prometheus metrics and data retention, SLO status with Prometheus alert rules and a Grafana dashboard
  • Inbound webhooks: verify Stripe, GitHub, GitLab, Shopify, Paddle, Polar, Linear, Sentry, Lemon Squeezy, Slack, Twilio, Svix/Standard Webhooks and HMAC-signed requests, store each event once and forward it to your services with retries and a log
  • Chat formats: Slack, Microsoft Teams, Discord and Google Chat messages written from templates per event type, escaped against mentions and cut to each service's limits, plus pick, omit and redact of fields per endpoint, with a preview to check a template before it goes live
  • OpenTelemetry: a span and metrics for every delivery attempt for Grafana, Datadog, Honeycomb or any backend, with URL and tenant left out unless you ask
  • Standalone server (new in 2.1): run Vector as its own service for PHP, Python, Go or any other stack. A REST API to send events and manage endpoints, a built-in worker, an admin page to search messages and retry failures, short-lived portal tokens so your customers can use the portal, Prometheus metrics, and PostgreSQL, MySQL or SQLite. Available as an npm package and a Docker image
  • Regions and tenant limits (new in 2.1): send a customer's webhooks through a proxy with a fixed IP so they can allow-list it, and cap requests per second, requests in flight and requests per day for each tenant or endpoint so one busy tenant cannot use up your workers
FeatureFreePro
Signing, verification, retries and delivery logIncludedIncluded
SSRF protection, secret rotation, idempotencyIncludedIncluded
Ed25519 signatures; memory, PostgreSQL, MySQL and SQLite stores; CLIIncludedIncluded
Customer portal (API and React components)Not includedIncluded
Typed event catalog, docs, AsyncAPI and typesNot includedIncluded
Alerts, circuit breaker, weekly tenant reports, bulk recovery, metrics and retentionNot includedIncluded
Standalone server for non-Node apps: REST API, admin page, DockerNot includedIncluded
Regions (egress route) and limits per tenant and endpointNot includedIncluded
Inbound webhooks from Stripe, GitHub, GitLab, Shopify, Paddle, Polar and othersNot includedIncluded
Per-endpoint body changes (transform hook)IncludedIncluded
Rate limit per endpoint and egress proxyIncludedIncluded
Batch sending and receiver-side deduplicationIncludedIncluded
Slack, Teams, Discord and Google Chat formatsNot includedIncluded
OpenTelemetry spans and metricsNot includedIncluded
LicenceMITPer person
SupportGitHub issuesAgency and Lifetime

Pro

Pro packagesAdd-ons on top of the core.

  • @weber-development/vector-portal

    An embeddable webhook portal for your customers: a REST handler scoped to one tenant and React components for endpoints, secrets, a searchable message log, retries, test events and an event catalog, styled to match shadcn/ui if you like.

  • @weber-development/vector-catalog

    A typed event catalog: validates payloads with any Standard Schema library before sending and generates Markdown docs, an AsyncAPI 3 file and TypeScript types for receivers.

  • @weber-development/vector-ops

    Operations tooling: alerts to Slack, email or a webhook, bulk recovery after an outage, a health report, Prometheus metrics and data retention. Regions with a fixed egress IP and limits per tenant and per endpoint.

  • @weber-development/vector-server

    Vector as a standalone service for applications in any language: a REST API, a built-in worker, an admin page, short-lived portal tokens for your customers, Prometheus metrics, regions with their own egress route and limits per tenant. Runs as a Node process or a Docker image on PostgreSQL, MySQL or SQLite.

  • @weber-development/vector-inbound

    Inbound webhooks: verifies Stripe, GitHub, GitLab, Shopify, Paddle, Polar, Linear, Sentry, Lemon Squeezy, Slack, Twilio, Svix and HMAC-signed requests, stores each event once and forwards it with retries and a log.

  • @weber-development/vector-transform

    Writes messages in the format of Slack, Microsoft Teams, Discord and Google Chat from templates per event type, and picks, omits or redacts fields for other endpoints. Preview a template without sending.

  • @weber-development/vector-otel

    OpenTelemetry output: a span and metrics for every delivery attempt, for Grafana, Datadog, Honeycomb or any backend.

Pricing

PricingPrices are in CHF.

Freelancer

For one person working on client projects.

CHF 290

per year

2 months free

  • 1 person
  • No support entitlement
Subscribe

Agency

Recommended

For teams of up to ten named people, one price.

CHF 890

per year

2 months free

  • Up to 10 people
  • Support included
Subscribe

Lifetime

Pay once for up to ten people and keep updates and repository access.

CHF 2’990

one-time

  • Up to 10 people
  • Support included
Buy lifetime licence

11 people or more: get in touch

  • Pay yearly and get two months free: CHF 290 instead of CHF 348 for Freelancer, CHF 890 instead of CHF 1068 for Agency.
  • After cancelling, every version you already received keeps working. Only updates and repository access end.
  • No licence key, no phone-home. The Pro packages never contact a server to check your licence.
  • Agency and Lifetime cover up to ten named people for one price: you choose the number of seats at checkout and assign them in Polar. Your clients and their websites need no licence of their own.
  • Checkout, invoices and VAT are handled by Polar as merchant of record.
Read the licence terms

FAQ

QuestionsShort answers.

Is Vector a hosted service?

No. Vector is a library that runs inside your own application and keeps its data in your own database. There is no account, no API key and nothing that phones home; events and your customers' URLs never leave your infrastructure.

Can my customers verify the webhooks with Svix or Standard Webhooks libraries?

Yes. Vector signs exactly as the Standard Webhooks specification describes, which is the format Svix uses, so receivers can use the standardwebhooks or svix packages in any language. Vector's own verify() also accepts svix-* headers, and with envelope: false the payload is sent as the whole body, as Svix does.

Can Vector send to Slack, Teams or Discord?

Yes, with Vector Pro. These services do not accept the usual webhook body, so vector-transform writes the message each one expects (Slack blocks, Teams Adaptive Cards, Discord embeds, Google Chat cards) from templates per event type, detects the service from the endpoint URL and escapes event data so it cannot ping @channel or @everyone. The free library has the transform hook it plugs into, so you can also write your own formatter.

What about ordering and duplicates?

Webhooks are delivered at least once, so a retry can arrive twice and, by default, after a later event. Every retry of a message carries the same webhook-id, so receivers should store the ids they have processed and skip repeats. Where order matters, send related events with the same orderingKey (Vector 2.0): for each endpoint and key, the next message is delivered only after the earlier ones succeeded, failed for good or were cancelled. A message that keeps failing therefore delays later messages of the same key, but not other keys. Idempotency keys keep a message from being created twice on the sending side.

Which databases are supported?

An in-memory store for tests and prototypes, a PostgreSQL store that works with pg, postgres.js, Neon, Supabase and PGlite, a MySQL 8 store (mysql2) and a SQLite store (node:sqlite or better-sqlite3). All are safe with several workers. For any other database you implement the VectorStore interface, about fifteen small methods.

Does it work on serverless platforms?

Yes. Instead of the long-running worker you call process() from a cron job, for example a Vercel cron route every minute, and send with deliverNow: true so the first attempt does not wait for the next run. Retries are picked up by the following cron runs.

Can I send webhooks from a fixed IP address?

Yes. Run an egress proxy with a static IP and pass an undici dispatcher such as ProxyAgent to Vector's dispatcher option; on Node.js 24 and later NODE_USE_ENV_PROXY=1 with HTTPS_PROXY works without code. Vector still checks the host name against private networks before each request.

Can I use Vector if my application is not written in Node.js?

Yes, with Vector Pro 2.1. The standalone server runs Vector as its own service. Your PHP, Python, Go or Ruby application sends events to its REST API with a plain HTTP request, and the server signs, delivers and retries them from your own PostgreSQL, MySQL or SQLite database. It includes an admin page and metrics, and comes as an npm package and a Docker image. The free library stays the better fit when your application is already Node.js.