[DEV-1785] - Introduce novu framework flow

The MR introduces a custom serve function to communicate with Novu's API and registers the handlers in main.ts. The test example in the MR is there a way for everyone to test how this flow works. In my test I have managed to sync the test endpoint with my local novu instance without any issues.

Also I ended up adding the bridgeURL manually to my Novu database but I think that's an acceptable "hack".

Triggering workflows with the frameworks works like this: workflow.trigger({payload etc}) so our library will need an update as well but I think it's worth discussing two things before moving forward with this implementation:

  1. Defining everything in code would mean that our codebase will become the single source of truth for notifications and that means a lot of additional code not only in step definitions but also with payload schema definitions/validations(we can use class-validator with the framework 🎉 ) Additionally, we will have to sync any updates to notifications through MRs to avoid inconsistencies between Novu and our code, making the update process slower.

  2. On top of that, if we want to implement React Email it would mean introducing React code to the BE, is that something that we want?

Edited by Orestis Athanasopoulos Antoniou

Merge request reports

Loading