Receive a Push Notification When a New Badge is Awarded
When the badge criteria edge function awards a new badge to a peer mentor, a push notification is dispatched via FCM to the peer mentor's registered device. The notification includes the badge name and a short congratulatory message. Tapping the notification deep-links directly to the badge shelf with the newly earned badge highlighted. Peer mentors can disable badge notifications in the notification preferences screen without disabling all other notification types.
User Story
Acceptance Criteria
- Given I have push notifications enabled, When the system awards me a new badge, Then I receive a push notification within 5 minutes of the badge being awarded
- Given I receive the badge push notification, When I tap it, Then the app opens directly to my badge shelf with the newly earned badge visually highlighted
- Given I have disabled badge notifications in settings, When a badge is awarded to me, Then I do not receive a push notification but still see the badge in the app
- Given the push notification is delivered, When it appears on my lock screen, Then the notification text includes the badge name and does not reveal any sensitive personal information
- Given I open the notification centre within the app, When I browse my notifications, Then the badge award event appears as a notification list item with the badge icon
Business Value
Push notifications for badge awards extend the motivational impact of the recognition system beyond active app sessions. Timely recognition — delivered at the moment of achievement — is significantly more effective than delayed acknowledgement, encouraging peer mentors to log activities promptly and stay engaged with the platform.
Components
- Badge Criteria Edge Function infrastructure
- Badge Award Service service
- Push Notification Dispatcher infrastructure
- Notification Deep Link Handler service
- Badge Shelf Widget ui
- Notification Repository data
- Notification Preferences Repository data
- FCM Token Manager infrastructure