Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

200 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better-Notify

End-to-end typed notification infrastructure for Node.js and Bun.

npm version license node version

Website · Docs · Blog · Changelog


Why Better-Notify?

  • Typed end-to-end — one catalog type drives the client, queue worker, and webhook router. Schema and template can't silently drift.
  • Multi-channel — email, SMS, push, Slack, Discord, Telegram, and more from the same pipeline. Define once, send anywhere.
  • Zero lock-in — swap transports (SMTP, Resend, Mailchimp, Cloudflare Email) without touching business logic. Standard Schema means no hard Zod dependency either.
  • Batteries included — middleware (rate-limit, idempotency, tracing, dry-run), hooks, plugins, and a logger built into core.

Quick start

npm install @betternotify/core @betternotify/email zod
import { createNotify, createClient } from '@betternotify/core';
import { emailChannel, mockTransport } from '@betternotify/email';
import { z } from 'zod';

const email = emailChannel({ defaults: { from: 'hello@example.com' } });
const rpc = createNotify({ channels: { email } });

const catalog = rpc.catalog({
  welcome: rpc
    .email()
    .input(z.object({ name: z.string() }))
    .subject(({ input }) => `Welcome, ${input.name}`)
    .template({ render: async ({ input }) => ({ html: `<h1>Hi ${input.name}</h1>` }) }),
});

const mail = createClient({
  catalog,
  transportsByChannel: { email: mockTransport() },
});

await mail.welcome.send({ to: 'john@example.com', input: { name: 'John' } });

Packages

Channel Transport Template
@betternotify/email @betternotify/smtp @betternotify/react-email
@betternotify/sms @betternotify/resend @betternotify/mjml
@betternotify/push @betternotify/mailchimp @betternotify/handlebars
@betternotify/webpush @betternotify/cloudflare-email
@betternotify/slack @betternotify/twilio
@betternotify/discord @betternotify/autosend
@betternotify/telegram @betternotify/onesignal
@betternotify/whatsapp @betternotify/selligent
@betternotify/github
@betternotify/zapier

Core: @betternotify/core · Integrations: @betternotify/mcp

Scaffolding: create-better-notify

npx create-better-notify@latest

Star History

Star History Chart

GitHub · X

Created by Lucas Reis · X

MIT License

Releases

Packages

Contributors

Languages