Router, outbox & delivery worker
Generated from
pattern-library/registry.json— do not edit by hand; change the registry and runbun run patterns:build.
Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.
Category: Notifications · Tier: light · Maturity: proven (verified 2026-08-20 @ 1a130d67) · Risk: low — internal queue/dispatch, no direct external call from the router itself
sendNotification() writes an in-app record, evaluates the settings matrix per channel, then queues outbox rows delivered by an in-process worker on containers or a cron sweep on Vercel.
When to use: Use as the single entry point for sending any multi-channel notification instead of calling a channel provider directly.
Docs
Code
src/lib/server/notifications/router.ts(GitHub · GitLab)src/lib/server/notifications/outbox.ts(GitHub · GitLab)
Proof
Machine-readable record: notifications-router-outbox in pattern-library/registry.json.