Notifications
sendNotification - sends a notification to a user and stores it in the database:
await sendNotification(studentUserId, "New feature available", "Check out the new feature in your dashboard");
It will look like this:

Sending emails
If you also want the notification to be sent by email, specify:
isExternal = trueas a fourth argument into sendNotification functionFD_SEND_EMAIL = truein.env- register with SendGrid to get and configure
FD_EMAIL_SERVICE_URLandFD_SERVICE_KEYin.env
await sendNotification(
studentUserId,
"New feature available",
"Check out the new feature in your dashboard",
true,
);
Functions for showing simple toast UI notifications:
notify("Notify message");
notifySuccess("Notify success message");
notifyFailure("Notify failure message");
It will look like this: