Documentation
Search…
Notifications
This section describes how to set up notifications for your dapp. Dialect uses its messaging primitives under the hood to power notifications. In the same way that a business manages an email address to send notifications and other messages to its customers, a dapp manages a wallet keypair for performing messaging with the Dialect protocol.
If you're curious how messaging works with Dialect, see the Messaging section.
We walk through a straightforward notifications integration below that should serve almost every integration's needs. For those who read through this documentation and feel it does not meet their use case, we offer a headless SDK.
The rest of this section will abstract away messaging, and focus on the tools used to for configuring notifications — from registering a dapp, configuring both the Dialect protocol and traditional web2 channels for sending notifications, to dropping in React components that let your users manage their notifications from your dapp.

Overview

There are four main parts to a notifications integration:
  1. 1.
    Create a messaging keypair and register it as a dapp in the Dialect data service.
  2. 2.
    Add the Dialect <NotificationsButton ... /> to your dapp front end. This is a fully self-service UI component for allowing your users to opt in to and configure notifications from your dapp.
  3. 3.
    Customize & deploy a monitoring service, which sends programmatic notifications for the use cases you'd like to support.
  4. 4.
    Use the Dialect dapp dashboard for managing your dapp and sending manually-written broadcast announcements.
It is recommended that you perform the following actions targeting the Dialect development environment, and only switch to production when you're ready.

1. Create a messaging keypair and register it as a dapp

First, you must create a messaging keypair and register it with the Dialect data service. We recommend using the Solana CLI to create a new keypair.
Be sure to save the seed phrase that is output to the console.
Follow the instructions here to create a new dapp for this keypair using the Dialect SDK.

2. Add the Dialect react component to your dapp front end

Users can opt-in to and manage notifications through a single react component. Most dapps choose to embed the component in their navbar. Dialect has a React component library repository.
To add a notification bell to your navbar, follow the instructions here.
Marinade — https://marinade.finance
This notifications button and all of the UI components in the modal have fully customizable styles. Below are a few examples of what you can create.
Realms — https://realms.today
Squads — https://squads.so
Katana — https://katana.so
Tulip — https://tulip.garden
Socean — https://socean.fi
Jet — https://jetprotocol.io

3. Customize and deploy a monitoring service for programmatic notifications

If you would like to send programmatic notifications to your users, you will need an off-chain monitoring service that detects the events you care about, and sends messages to your users.
Programmatic notifications can be triggered for any range of user behaviors and situations. To give some examples: NFT buyout requests, liquidation warnings, filled orders, new DAO proposals, new raffle listings, new social post, etc.
Dialect has a sophisticated, open-source toolkit for detecting events about changes to data — on- or off-chain — and turning those events into notification messages. This toolkit is two-part:
  1. 1.
    The Dialect monitoring service — All-in-one nestjs service for hosting monitoring.
  2. 2.
    The Dialect monitor toolkit — tooling used by the monitoring services for sending messages, importable into any JS/TS project. Most projects do not use this directly.

The monitoring service

To create a monitoring service, see Dialect's reference implementations for monitoring services, including a default reference implementation at
The vast majority of dapps that have integrated Dialect have chosen to host monitoring services with Dialect.

The Monitor library

Each monitoring service imports the Dialect Monitor library, a reactive, fluent toolkit for piping arbitrary data sources into a set of messaging sinks. See the source code here:
However, most projects use the monitoring service described above as an all-in-one way to host implementations of the monitor itself.
If you already have off-chain services that are detecting the events you care about, you can easily import the Dialect SDK into those services to send messages right as those events are detected.
If you are not sure what solution is right for you, contact the Dialect team on Twitter (https://twitter.com/saydialect), on Discord (https://discord.gg/dialect), or by email ([email protected])

4. Use the Dialect dapp dashboard for sending broadcast notifications

Many dapps wish to send product updates, community announcements, and other manually-crafted notifications to their users Dialect offers a fully open-source solution for sending broadcast announcements via a dapp dashboard.
The Dialect dapp dashboard will be live shortly. Stay tuned.
Copy link
On this page
Overview
1. Create a messaging keypair and register it as a dapp
2. Add the Dialect react component to your dapp front end
3. Customize and deploy a monitoring service for programmatic notifications
4. Use the Dialect dapp dashboard for sending broadcast notifications