Skip to content
/ novu Public
forked from novuhq/novu

开源通知平台。可嵌入通知中心、电子邮件、推送和 Slack 集成

License

Notifications You must be signed in to change notification settings

sgmqs/novu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


NPM npm downloads MIT

The open-source notification infrastructure for developers

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


Explore the docs »

Report Bug · Request Feature · Join Our Discord · Roadmap · X · Notifications Directory

⭐️ Why Novu?

Novu provides a unified API that makes it simple to send notifications through multiple channels, including In-App, Push, Email, SMS, and Chat. With Novu, you can create custom workflows and define conditions for each channel, ensuring that your notifications are delivered in the most effective way possible.

✨ Features

  • 🌈 Single API for all messaging providers (In-App, Email, SMS, Push, Chat)
  • 💅 Fully managed GitOps Flow, deployed from your CI
  • 🔥 Define workflow and step validations with Zod or JSON Schema
  • 💌 React Email/Maizzle/MJML integrations
  • 🚀 Equipped with a CMS for advanced layouts and design management
  • 🛡 Debug and analyze multi-channel messages in a single dashboard
  • 📦 Embeddable notification center with real-time updates
  • 👨‍💻 Community-driven

🚀 Getting Started

To get started, type the following command in your Terminal.

npx novu@latest dev

📚 Table Of Contents

Notification Workflows as Code

For API documentation and reference, please visit our API Reference.

import { workflow, CronExpression } from '@novu/framework';
import { z } from 'zod';
import { render } from '@react-email/render';

const commentWorkflow = workflow('comment-workflow', async (event) => {
  const digest = await event.step.digest('digest-comments', (controls) => ({
    cron: controls.schedule
  }), { controlSchema: z.object({ schedule: z.nativeEnum(CronExpression) }) });

  await event.step.email('digest-email', async (controls) => ({
    subject: controls.subject,
    body: render(<WeeklyDigestEmail { ...controls } events = { digest.events } />)
  }), {
    skip: () => !digest.events.length,
    controlSchema: z.object({
      subject: z.string().default('Hi {{subscriber.firstName}} - Acme Comments'),
      openAiModel: z.enum(['gpt-3.5-turbo', 'gpt-4o']).default('gpt-4o'),
      aiPrompt: z.string().default('Produce a concise comment digest'),
    })
  });
}, { payloadSchema: z.object({ name: z.string(), comment: z.string() }) });

await commentWorkflow.trigger({
  payload: { name: 'John', comment: 'Are you free to give me a call?' },
  to: '[email protected]'
});

Embeddable Notification Center

Using the Novu API and admin panel, you can easily add a real-time notification center to your web app without building it yourself. You can use our React / Vue / Angular components or an iframe embed, as well as a Web component.

notification-center-912bb96e009fb3a69bafec23bcde00b0

Read more about how to add a notification center to your app with the Novu API here

React Component · Vue Component · Angular Component

Providers

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

💌 Email

📞 SMS

📱 Push

👇 Chat

📱 In-App

Other (Coming Soon...)

  • PagerDuty

📋 Read Our Code Of Conduct

Before you begin coding and collaborating, please read our Code of Conduct thoroughly to understand the standards (that you are required to adhere to) for community engagement. As part of our open-source community, we hold ourselves and other contributors to a high standard of communication. As a participant and contributor to this project, you agree to abide by our Code of Conduct.

💻 Need Help?

We are more than happy to help you. If you are getting any errors or facing problems while working on this project, join our Discord server and ask for help. We are open to discussing anything related to the project.

🔗 Links

🛡️ License

Novu is licensed under the MIT License - see the LICENSE file for details.

💪 Thanks To All Contributors

Thanks a lot for spending your time helping Novu grow. Keep rocking 🥂

Contributors

About

开源通知平台。可嵌入通知中心、电子邮件、推送和 Slack 集成

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.3%
  • Python 2.1%
  • JavaScript 1.1%
  • HTML 0.4%
  • CSS 0.2%
  • Handlebars 0.2%
  • Other 0.7%