[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:
-
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-validatorwith the framework🎉 ) Additionally, we will have to sync any updates to notifications through MRs to avoid inconsistencies betweenNovuand our code, making the update process slower. -
On top of that, if we want to implement
React Emailit would mean introducingReactcode to the BE, is that something that we want?