What's New in Novu 0.14.0?
Tags: novu, javascript, programming, notifications
Published: 2023-04-28 11:20:39

**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!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6zkwjygvww7u647kc1kn.gif)

## 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](https://github.com/novuhq/novu/blob/next/libs/dal/src/repositories/job/job.schema.ts).

## 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](https://github.com/novuhq/novu/pkgs/container/novu%2Fworker) in order for Novu to work properly.

This is already taken care of [here](https://github.com/novuhq/novu/pull/3160) & [here](https://github.com/novuhq/novu/pull/3231). 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](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](https://docs.novu.co/notification-center/headless/headless-service/) needed to access the notification system.

Install:

```js
npm install @novu/headless
```

Use:

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

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

```js
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](https://maqsam.com) SMS provider on Novu.


![Maqsam SMS Provider](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yj8mleheehqi0rjm97q0.png)

## Termii SMS Provider Integration
Now, you can use the [Termii](https://www.termii.com) SMS provider on Novu.


![Termii SMS Provider](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ctsjas4ajli9o14n48i7.png)

## SMSCentral SMS Provider Integration
Now, you can use the [SMSCentral](https://www.termii.com) SMS provider on Novu.


![SMSCentral SMS Provider](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpub5ixz2rspw0au1a5j.png)

## Sparkpost SMS Provider Integration
Now, you can use the [Sparkpost](https://developers.sparkpost.com) SMS provider on Novu.

![Sparkpost SMS Provider](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p52oukji6lzi9aww2p6a.png)

## All Changes

The full changelog can be found on [GitHub](https://github.com/novuhq/novu/compare/v0.13.0...v0.14.0).

## Conclusion

[Sign up on Novu](https://web.novu.co), 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](https://github.com/novuhq/novu) & build out amazing things.

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