DEV Community

Prosper Otemuyiwa for novu

Posted on • Edited on • Originally published at novu.co

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, Redesigned 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!

Digging 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:

Workflow

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
Enter fullscreen mode Exit fullscreen mode

Use:

import { HeadlessService } from '@novu/headless';
Enter fullscreen mode Exit fullscreen mode

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
});
Enter fullscreen mode Exit fullscreen mode

Maqsam SMS Provider Integration

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

Maqsam SMS Provider

Termii SMS Provider Integration

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

Termii SMS Provider

SMSCentral SMS Provider Integration

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

SMSCentral SMS Provider

Sparkpost SMS Provider Integration

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

Sparkpost SMS Provider

All Changes

The full changelog can be found on GitHub.

Conclusion

Sign up on Novu, try it out & let me know what you think about the new changes in the comments section.

If you're looking to contribute to OSS and make an impact, I believe it is a great place to start & build out amazing things.

Oh, don't forget to star the repo as well.🤩 See you in the next release! 🚀

Top comments (1)

Collapse
 
dominuskelvin profile image
Kelvin Omereshone

Awesome stuff.