Router, outbox & delivery worker
Generated from
mcp/patterns.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 · Risk: low — internal queue/dispatch, no direct external call from the router itself
NotificationService.send() 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 mcp/patterns.registry.json.