Skip to Content
Admin GuideNotifications

Notifications

ClubMS supports in-app notifications and Web Push notifications.

Notification Types

TypeTrigger
EVENT_CREATEDNew event published
EVENT_UPDATEDEvent details changed
EVENT_CANCELLEDEvent cancelled
BOOKING_CONFIRMEDEvent booking confirmed
BOOKING_CANCELLEDBooking cancelled
DONATION_RECEIVEDDonation received
DONATION_RECURRING_CREATEDRecurring donation started
DONATION_RECURRING_CANCELLEDRecurring donation stopped
MEMBERSHIP_RENEWEDMembership renewed
MEMBERSHIP_EXPIRINGMembership about to expire
ASSET_BORROW_REQUESTLoan request submitted
ASSET_BORROW_APPROVEDLoan approved
ASSET_BORROW_REJECTEDLoan rejected
ASSET_RETURN_REQUESTEDReturn initiated
ASSET_RETURN_CONFIRMEDReturn confirmed
SYSTEMSystem-wide announcements

In-App Notifications

  • Bell icon in the navbar shows unread count
  • Click to view notification list
  • Mark individual or all as read
  • Links to relevant resource

Push Notifications

Web Push uses the VAPID protocol:

  1. User opts in via the notification bell
  2. Browser generates a push subscription
  3. Subscription is stored in push_subscription table
  4. Server sends push via Web Push API when events occur

Setup

Generate VAPID keys:

npx web-push generate-vapid-keys

Set environment variables:

NEXT_PUBLIC_VAPID_PUBLIC_KEY=BEl6... VAPID_PRIVATE_KEY=abc...
Last updated on