ainouzgali / novu

πŸš€ Open-source notification infrastructure for products

Home Page:https://novu.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo Dark

Logo Light

Notification management simplified.

The ultimate service for managing multi-channel notifications with a single API.


Explore the docs Β»

Report Bug Β· Request Feature Β· Join Our Discord Β· Read our blog

⭐️ Why

Building a notification system is hard, at first it seems like just sending an email but in reality it's just the beginning. In today's world users expect multi channel communication experience over email, sms, push, direct and more... An ever growing list of providers are popping up each day, and notifications are spread around the code. Novu's goal is to simplify notifications and provide developers the tools to create meaningful communication between the system and it's users.

✨ Features

  • 🌈 Single API for all messaging providers (Email, SMS, Push, Direct)
  • πŸ’… Easily manage notification over multiple channels
  • πŸš€ Equipped with a CMS for advanced layouts and design management
  • πŸ›‘ Built-in protection for missing variables
  • πŸ“¦ Easy to set up and integrate
  • πŸ“¦ Embeddable notification center with real-time updates
  • πŸ›‘ Debug and analyze multi channel messages in a single dashboard
  • πŸ‘¨β€πŸ’» Community driven

Novu API & Admin panel (alpha)

We are excited to launch the complete Novu API and admin panel. Want to give it a test before the official release? here is how:

npx novu init

After setting up your account using the cloud or docker version you can trigger the API using the @novu/node package.

npm install @novu/node
import { Novu } from '@novu/node';

const novu = new Novu(process.env.NOVU_API_KEY);

await novu.trigger('<REPLACE_WITH_EVENT_NAME_FROM_ADMIN_PANEL>', {
  $user_id: "<USER IDENTIFIER>",
  $email: "test@email.com",
  firstName: "John",
  lastName: "Doe",
  organization: {
    logo: 'https://evilcorp.com/logo.png'
  }
});

πŸ“¦ Stateless mode

For simpler use cases, you can use the @novu/node library. This will require you to manage the templates content and providers registration.

πŸ“¦ Install

npm install @novu/node
yarn add @novu/node

πŸ”¨ Usage

import { Novu, ChannelTypeEnum } from '@novu/node';
import { SendgridEmailProvider } from '@novu/sendgrid';

const novu = new Novu();

await novu.registerProvider(
  new SendgridEmailProvider({
    apiKey: process.env.SENDGRID_API_KEY,
    from: 'sender@mail.com'
  })
);

const passwordResetTemplate = await novu.registerTemplate({
  id: 'password-reset',
  messages: [
    {
      subject: 'Your password reset request',
      channel: ChannelTypeEnum.EMAIL,
      template: `
          Hi {{firstName}}!
          
          To reset your password click <a href="{{resetLink}}">here.</a>
          
          {{#if organization}}
            <img src="{{organization.logo}}" />
          {{/if}}
      `
    },
  ]
});

await novu.trigger('<REPLACE_WITH_EVENT_NAME>', {
  $user_id: "<USER IDENTIFIER>",
  $email: "test@email.com",
  firstName: "John",
  lastName: "Doe",
  organization: {
    logo: 'https://evilcorp.com/logo.png'
  }
});

Providers

Novu provides a single API to manage providers across multiple channels with a single to use interface.

πŸ’Œ Email

πŸ“ž SMS

πŸ“± Push (Coming Soon...)

  • Pushwoosh
  • SNS

πŸ‘‡ Direct (Coming Soon...)

  • Slack
  • MS Teams
  • Discord
  • Mattermost

πŸ“± In-App (Coming Soon...)

  • Novu
  • MagicBell

Other (Coming Soon...)

  • PagerDuty

πŸ”— Links

About

πŸš€ Open-source notification infrastructure for products

https://novu.co

License:MIT License


Languages

Language:TypeScript 87.5%Language:JavaScript 5.1%Language:HTML 4.7%Language:Handlebars 1.6%Language:EJS 0.6%Language:Dockerfile 0.4%Language:Shell 0.1%