When developing applications and managing other resources within an environment. It is so vital to have a notification system. It makes it easier to notify and engage users and contributors in the project. Open-source notification tools allow developers to create notification systems that can be integrated into their environment. There are many notification systems some of them include OneSignal, Google Firebase, Leanplum, PushBots, PushCrew, Airship, Catapush etc.

Today, we will learn about Novu – an open-source notification infrastructure for developers. Novu provides a single API, that makes the process of sending notifications across several channels such as In-App, Push, Email, SMS, and Chat so simple. It also allows you to build your own workflows and set specific conditions for each channel. This ensures that notifications reach their intended recipients most effectively.

There are many features offered by Novu. They include:

  • Consolidated API for diverse messaging platforms (In-App, Email, SMS, Push, Chat)
  • Inclusive CMS for sophisticated layout and design control
  • Swift and seamless setup and integration
  • Driven by a vibrant community of users and developers
  • Effortlessly oversee notifications across multiple channels
  • Streamlined debugging and analysis of cross-channel messages through a unified dashboard
  • Incorporate an embeddable notification centre with live updates
  • Upcoming feature: Safeguard against missing variables

Follow the below steps to install and use Novu.

Step 1. Install Novu on Your System

Novu offers two deployment methods:

  • The cloud option
  • Self-hosted Option

Install Docker and Docker Compose

In this guide, we will learn how to install self-hosted Novu. Here, we will use the easiest option- the docker option. You need to ensure that you have docker installed on your system. To achieve that, follow the below guides:

You also need to install docker-compose:

Once installed, you also need to have git

##On Debian/Ubuntu
sudo apt update && sudo apt install git

##On Rhel-based Systems
sudo yum install git

You need to ensure that you have a CPU with AVX support for MongoDB 5.0+.

Clone the Novu Git Repo

The next thing is to clone the Novu repo:

git clone https://github.com/novuhq/novu

Create a file with the environment variables:

cd novu/docker
cp .env.example ./local/deployment/.env

Configure the Environment Variables

You can now modify the .env file as desired:

$ vim ./local/deployment/.env
 Secrets
# YOU MUST CHANGE THESE BEFORE GOING INTO PRODUCTION
JWT_SECRET=your-secret
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
....

Generate and update your secrets in the file above. For this setup, all settings are simple as the database is in the same deployment and also uses local stack instead of S3 for storage.

Run the Novu Containers

Once the desired changes have been made, you can start the container with the command:

docker-compose -f ./local/deployment/docker-compose.yml up -d

Check if the containers are up:

$ docker ps
CONTAINER ID   IMAGE                               COMMAND                  CREATED         STATUS                            PORTS                                       NAMES
b636eb05d497   ghcr.io/novuhq/novu/embed:0.18.0    "pnpm start:docker:e…"   4 minutes ago   Up 4 minutes                      0.0.0.0:4701->4701/tcp, :::4701->4701/tcp   embed
72587f77601c   ghcr.io/novuhq/novu/widget:0.18.0   "pnpm start:static:w…"   4 minutes ago   Up 4 minutes                      0.0.0.0:4500->4500/tcp, :::4500->4500/tcp   widget
377d098ee36e   ghcr.io/novuhq/novu/web:0.18.0      "docker-entrypoint.s…"   4 minutes ago   Up 4 minutes                      0.0.0.0:4200->4200/tcp, :::4200->4200/tcp   web
cb4c2551ef18   ghcr.io/novuhq/novu/worker:0.18.0   "pm2-runtime start d…"   4 minutes ago   Up 4 minutes                                                                  worker
61564b1cffcb   ghcr.io/novuhq/novu/api:0.18.0      "pm2-runtime start d…"   4 minutes ago   Up 4 minutes                      0.0.0.0:3000->3000/tcp, :::3000->3000/tcp   api
27b553d5f1d9   ghcr.io/novuhq/novu/ws:0.18.0       "docker-entrypoint.s…"   4 minutes ago   Up 4 minutes                      0.0.0.0:3002->3002/tcp, :::3002->3002/tcp   ws
3bcec428d86c   mongo                               "docker-entrypoint.s…"   4 minutes ago   Up 11 seconds ago                                               mongodb
19bd436a6a63   redis:alpine                        "docker-entrypoint.s…"   4 minutes ago   Up 4 minutes                      6379/tcp                                    redis

Step 2. Access Novu Web Interface

You can now access the Novu web interface using the URL http://localhost:4200

Novu open source notification infrastructure for developers

Create a New User

We need to create a new user by clicking on Sign Up

Novu open source notification infrastructure for developers 2

Create an Organization

Once the user has been created, you will be granted the below page. Create your own organization.

Novu open source notification infrastructure for developers 3

Create a Provider

You will then be granted the Novu dashboard. Begin by creating your provider:

Novu open source notification infrastructure for developers 6

In this guide, we will configure Email. You can still configure chat, SMS, In-App or SMS as desired. To configure Email, select the provider.

Novu open source notification infrastructure for developers 7

Provide the required details. For example, for outlook.

Novu open source notification infrastructure for developers 8

Create a Workflow

After adding the provider, you can proceed and create the workflow.

Novu open source notification infrastructure for developers 9

Provide the name of the workflow.

Novu open source notification infrastructure for developers 10

Now modify your provider and the desired message to be triggered.

Novu open source notification infrastructure for developers 11

After clicking on it, you can make adjustments as desired

Novu open source notification infrastructure for developers 12

Test Novu by Triggering Notification

To test if Novu is working, we will trigger the notification by clicking on the icon shown, and the run the trigger.

Novu open source notification infrastructure for developers 13

If all is okay, you will see this:

Novu open source notification infrastructure for developers 14

The members subscribed will receive the notification as shown:

Novu open source notification infrastructure for developers 15

Voila!

Final Thoughts

We have learned how to install and use Novu – an open-source notification infrastructure for developers. You are now free to explore the other features provided by Novu by visiting the official Novu page.

Interested in more?

LEAVE A REPLY

Please enter your comment!
Please enter your name here