Skip to content

v0.14.0 - Performance optimization and redesigned workflow editor

Compare
Choose a tag to compare
@scopsy scopsy released this 28 Apr 10:56
· 8000 commits to next since this release
376f568

What’s new in Novu 0.14.0?

TL;DR: All you need to know about the latest Novu 0.14.0 release. Performance optimization, Workflow UI Editor, Data expiration, Headless Notification Center and more!

0.14.0 Release Updates

We're stoked to share new updates on our latest release. Let's dig in!

Performance Optimization

We have worked extremely hard to improve the core performance of Novu. I'll highlight crucial things to note and be aware of:

  1. Improved Caching.
  2. Optimized Indexes. Indexes are defined on each schema file at the bottom.

New Worker Service

Breaking Change: A new service is required to run with Novu called @novu/worker , extracted from the @novu/api monolith to ensure that queues and jobs are processed faster. Novu Cloud users do not need to be concerned about this change.

Novu self-hosted users can now scale the worker service independently as much as the hardware their hosted domain runs on.

For Novu self-hosted users running on Docker, it is now necessary to pull in the new worker service image in order for Novu to work properly. This is already taken care of here & here. When you run docker-compose up, the worker image will be automatically pulled in. No extra steps are needed.

Data Expiration

The Jobs and Messages collection now has a TTL and will be removed from the database when it expires. For Novu cloud users, notifications and activity feed data will be saved for 1 month, while in-app messages will be saved for 6 months. After that time, the records will be archived.

For Novu self-hosted users, the same time frame applies before records will be deleted. However, they can disable the TTL setting by adding the environment variable DISABLE_TTL=true.

Affected schemes:

  • Notification (for 1 month)
  • Job (for 1 month)
  • Message (for in-app messages - 6 months, for all other messages - 1 month)
  • Execution Details (for 1 month)

New Workflow UI Editor

We're constantly iterating on the UI editor to reduce the number of clicks needed to perform specific actions, improve the UX, and provide a great experience in setting up notification workflows.

In this release, we simplified the workflow editor UI like so:

https://dev-to-uploads.s3.amazonaws.com/uploads/articles/msm9mf9i3thhvtb8i4yg.gif

Headless Notification Center

You might have heard the phrase: “Bring Your Own...” or something along those lines.

We encourage you to bring your UI with the newly released framework-agnostic headless version of Novu's notification center.

This lightweight library allows you to incorporate our notification system into any framework or vanilla JavaScript app without UI constraints. Install and call the API methods needed to access the notification system.

Install:

npm install @novu/headless

Use:

import { HeadlessService } from '@novu/headless';

You can now fetch all In-App notifications shown like so:

const headlessService = new HeadlessService({
  applicationIdentifier: 'APP_ID_FROM_ADMIN_PANEL',
  subscriberId: 'USER_ID',
  backendUrl: 'YOUR_BACKEND_URL',
  socketUrl: 'YOUR_SOCKET_URL',
});

headlessService.initializeSession({
  listener: (session) => {
    console.log(session);
  },
  onSuccess: (session) => {
    console.log(session);
  },
  onError: (error) => {
    console.error(error);
  },
});

headlessService.fetchNotifications({
  listener: ({ data, error, isError, isFetching, isLoading, status }) => {
    console.log({ data, error, isError, isFetching, isLoading, status });
  },
  onSuccess: (response: IPaginatedResponse<IMessage>) => {
    console.log({response.data, response.page, response.totalCount, response.pageSize});
  },
  page: 1, // page number to be fetched
});

Maqsam SMS Provider Integration

Now, you can use the Maqsam SMS provider on Novu.

https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yj8mleheehqi0rjm97q0.png

Termii SMS Provider Integration

Now, you can use the Termii SMS provider on Novu.

https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ctsjas4ajli9o14n48i7.png

SMSCentral SMS Provider Integration

Now, you can use the SMSCentral SMS provider on Novu.

https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpub5ixz2rspw0au1a5j.png

Sparkpost SMS Provider Integration

Now, you can use the Sparkpost SMS provider on Novu.

https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p52oukji6lzi9aww2p6a.png

All Changes

New Contributors

Full Changelog: v0.13.0...v0.14.0