Channel & notification providers
The platform fires notifications through a pluggable channel system. Email and in-app are built-in. Slack, Teams, SMS, push, custom — register them as providers.
What you'll learn
- The provider interface
- Registering a new provider
- User-facing channel preferences
The provider interface
import { NotificationProvider } from '@burdenoff/platform-sdk';
export const slackProvider: NotificationProvider = {
name: 'slack',
send: async (ctx, notification) => {
await fetch(`https://hooks.slack.com/services/${ctx.config.webhookUrl}`, {
method: 'POST',
body: JSON.stringify({ text: notification.body }),
});
},
};
Register it on service module boot or via a plugin.
Users opt in per channel
Each user has channel preferences per notification category — mentions, replies, security, etc. The platform fans out to each opted-in channel.
Admin overrides
Admins can require certain channels for security-class notifications (e.g., security always goes to email regardless of user preference).
→ Admin guide: Notification channels
Next steps
- Eventing concept
- Webhooks — external delivery