Use Dialect SDK to Send Notifications
Using the Dialect SDK to send notifications from within your backend services is essentially a two-step process:
Load your dApp from a Dialect SDK instance using your dApp's
DIALECT_SDK_CREDENTIALS
and configuration parameters.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 MessagesHere is an example of a live integration of the Dialect SDK into the governance-api backend. This integration is used to power notifications for post and comment upvotes and 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