Use Dialect SDK to Send Notifications

Using the Dialect SDK to send notifications from within your backend services is essentially a two-step process:

  1. Load your dapp from a Dialect SDK instance using your dapp's DIALECT_SDK_CREDENTIALS and configuration parameters.

  2. Send dialect notifications at the place of event in your application.

It is up to you how to optimize your backend and integrate these two steps to send timely notifications to your users. Of course, if you end up finding that your existing service are not well suited for event monitoring and notification delivery, you can explore using the Dialect Monitor to build a custom on- or off-chain monitoring service.

These sections in the SDK portion of documentation detail this easy two-step process:

Load your dappSending Dapp-to-User Messages

Here is an example of a live integration of the Dialect SDK into the governance-api backend. This integration is used power notifications for post/comment upvotes & replies on the Realms Discover dapp. The Dialect SDK is setup here (in this case, wrapped within NestJs to match their architecture), and an example of firing a notification from within their existing services occurs here.

Now that you have setup notifications in your backend, you are ready to set up your Notifications UI/UX.

Last updated