Certificate Expiry Notifications
Feature Detail
Description
Automated notification flow for HLF's peer mentor certification lifecycle. The system sends advance warnings (e.g., 60, 30, and 7 days before expiry) to the peer mentor and their coordinator. If the certificate expires without renewal, the peer mentor is automatically surfaced as inactive in coordinator views and their public listing is suppressed — matching HLF's requirement that expired peer mentors disappear from local chapter websites. The in-app Notifications tab shows a persistent banner for the peer mentor until the certificate is renewed or the coordinator acknowledges the lapse. Coordinators can trigger a manual course enrollment prompt from within the notification detail view, linking to the course administration feature.
Analysis
Closes a compliance gap for HLF where expired certifications currently require manual tracking. Protects the organisation's quality assurance and reduces coordinator overhead for certificate monitoring.
Store certification_expiry_date in user_roles or a peer_mentor_profile table. Scheduled Edge Function queries upcoming expirations daily. Status suppression logic in Supabase RLS or a computed column. Coordinator notification uses same FCM path as other alerts.
Components (208)
Shared Components
These components are reused across multiple features
User Interface (59)
Service Layer (52)
Data Layer (33)
Infrastructure (54)
User Stories (14)
As a As a Peer Mentor (Likeperson)
I want to open a detailed notification view for any certification expiry alert in my notification center
So that I can review the full context of the alert, understand exactly what action is required, and act on it directly
- Given a certification expiry push notification was sent 2 days ago, When the peer mentor opens the notification center, Then the expiry notification appears in the list with a 'Certification' type badge and an unread indicator
- Given the peer mentor taps the notification list item, When the detail view opens, Then it displays the certificate name, expiry date, days remaining, and a 'View Certification Status' action button
- Given the notification detail view is opened, When the view renders, Then the notification is marked as read and the unread indicator disappears
- +3 more
As a As a Coordinator
I want to open a detailed notification view for any certification expiry alert in my notification center
So that I can review the full context of the alert, understand exactly what action is required, and act on it directly
- Given a certification expiry push notification was sent 2 days ago, When the peer mentor opens the notification center, Then the expiry notification appears in the list with a 'Certification' type badge and an unread indicator
- Given the peer mentor taps the notification list item, When the detail view opens, Then it displays the certificate name, expiry date, days remaining, and a 'View Certification Status' action button
- Given the notification detail view is opened, When the view renders, Then the notification is marked as read and the unread indicator disappears
- +3 more
As a As a Peer Mentor (Likeperson)
I want to see a persistent in-app warning banner on my home screen when my certification is within 30 days of expiry
So that I cannot accidentally miss the expiry even if I have disabled push notifications
- Given a peer mentor whose certification expires in 25 days, When they open the app and navigate to the home screen, Then a warning banner is displayed showing 'Certification expires in 25 days – Renew Now'
- Given the warning banner is displayed and the peer mentor dismisses it, When they close and reopen the app, Then the banner reappears in the next session
- Given a peer mentor whose certification is more than 30 days away, When they open the home screen, Then no expiry warning banner is shown
- +3 more
As a As a Peer Mentor (Likeperson)
I want to open a dedicated certification status screen that shows my current certificate, its expiry date, and how many days remain
So that I can understand my certification health at a glance and take renewal action from a single place
- Given a peer mentor with an active certification expiring in 45 days, When they open the certification status screen, Then the certificate is listed with an amber expiry badge showing '45 days remaining'
- Given a peer mentor with a certification expiring in 15 days, When they view the status screen, Then the badge is red and a prominent banner states 'Urgent: renew before [date]'
- Given a peer mentor whose certification has already expired, When they view the status screen, Then the badge shows 'Expired' in red and their active status indicator is suppressed
- +3 more
As a As a Peer Mentor (Likeperson)
I want to be prompted to enroll in a renewal course immediately when my certification has expired
So that I understand the consequences of expiry and can take the fastest path to regaining active status
- Given a peer mentor whose certification expired yesterday, When the nightly scheduler runs, Then an expiry notification is sent via FCM with messaging indicating they are no longer active
- Given a peer mentor whose certification has expired, When they open the app, Then a full-screen enrollment prompt is presented explaining their inactive status and offering 'Enroll in Renewal Course' and 'Remind Me Later' actions
- Given the peer mentor taps 'Enroll in Renewal Course', When the action triggers, Then the Dynamics portal course enrollment page opens via deep-link
- +3 more
As a As a Peer Mentor (Likeperson)
I want to receive push notifications at configurable intervals (90, 60, and 30 days) before my certification expires
So that I have enough time to enroll in a renewal course and avoid an involuntary lapse in my active status
- Given a peer mentor whose certification expires in 90 days, When the nightly scheduler runs, Then a push notification is dispatched via FCM with the expiry date and a deep-link to the certification status screen
- Given a peer mentor who receives a 90-day notification, When 30 more days pass without renewal enrollment, Then a 60-day reminder notification is dispatched
- Given a peer mentor who receives a 60-day notification, When 30 more days pass without renewal enrollment, Then a 30-day urgent reminder notification is dispatched with elevated priority
- +3 more
As a As a Peer Mentor (Likeperson)
I want to have my renewed certification automatically synced from HLF's Dynamics system into the app, or to manually record a renewal with a new expiry date
So that my active status is restored, expiry notifications stop, and I reappear on the public peer mentor roster
- Given HLF's Dynamics system sends a certification update webhook, When the hlf-dynamics-sync-service processes it, Then the peer mentor's certification record is updated with the new expiry date within 5 minutes
- Given the certification record is updated with a new valid expiry date, When the certification management service processes the update, Then the mentor's active status is re-enabled and visibility suppressor restores their public listing
- Given the renewal is confirmed, When the expiry notification orchestrator checks pending notifications, Then all scheduled expiry reminders for that certification are cancelled
- +3 more
As a As a Coordinator
I want to see a persistent in-app warning banner on my home screen when my certification is within 30 days of expiry
So that I cannot accidentally miss the expiry even if I have disabled push notifications
- Given a peer mentor whose certification expires in 25 days, When they open the app and navigate to the home screen, Then a warning banner is displayed showing 'Certification expires in 25 days – Renew Now'
- Given the warning banner is displayed and the peer mentor dismisses it, When they close and reopen the app, Then the banner reappears in the next session
- Given a peer mentor whose certification is more than 30 days away, When they open the home screen, Then no expiry warning banner is shown
- +3 more
As a As a Coordinator
I want to open a dedicated certification status screen that shows my current certificate, its expiry date, and how many days remain
So that I can understand my certification health at a glance and take renewal action from a single place
- Given a peer mentor with an active certification expiring in 45 days, When they open the certification status screen, Then the certificate is listed with an amber expiry badge showing '45 days remaining'
- Given a peer mentor with a certification expiring in 15 days, When they view the status screen, Then the badge is red and a prominent banner states 'Urgent: renew before [date]'
- Given a peer mentor whose certification has already expired, When they view the status screen, Then the badge shows 'Expired' in red and their active status indicator is suppressed
- +3 more
As a As a Coordinator
I want to be prompted to enroll in a renewal course immediately when my certification has expired
So that I understand the consequences of expiry and can take the fastest path to regaining active status
- Given a peer mentor whose certification expired yesterday, When the nightly scheduler runs, Then an expiry notification is sent via FCM with messaging indicating they are no longer active
- Given a peer mentor whose certification has expired, When they open the app, Then a full-screen enrollment prompt is presented explaining their inactive status and offering 'Enroll in Renewal Course' and 'Remind Me Later' actions
- Given the peer mentor taps 'Enroll in Renewal Course', When the action triggers, Then the Dynamics portal course enrollment page opens via deep-link
- +3 more
As a As a Coordinator
I want to receive push notifications at configurable intervals (90, 60, and 30 days) before my certification expires
So that I have enough time to enroll in a renewal course and avoid an involuntary lapse in my active status
- Given a peer mentor whose certification expires in 90 days, When the nightly scheduler runs, Then a push notification is dispatched via FCM with the expiry date and a deep-link to the certification status screen
- Given a peer mentor who receives a 90-day notification, When 30 more days pass without renewal enrollment, Then a 60-day reminder notification is dispatched
- Given a peer mentor who receives a 60-day notification, When 30 more days pass without renewal enrollment, Then a 30-day urgent reminder notification is dispatched with elevated priority
- +3 more
As a As a Coordinator
I want to have my renewed certification automatically synced from HLF's Dynamics system into the app, or to manually record a renewal with a new expiry date
So that my active status is restored, expiry notifications stop, and I reappear on the public peer mentor roster
- Given HLF's Dynamics system sends a certification update webhook, When the hlf-dynamics-sync-service processes it, Then the peer mentor's certification record is updated with the new expiry date within 5 minutes
- Given the certification record is updated with a new valid expiry date, When the certification management service processes the update, Then the mentor's active status is re-enabled and visibility suppressor restores their public listing
- Given the renewal is confirmed, When the expiry notification orchestrator checks pending notifications, Then all scheduled expiry reminders for that certification are cancelled
- +3 more
As a As a Peer Mentor (Likeperson)
I want to understand that my profile will be automatically suppressed from HLF's public-facing website and active peer mentor lists when my certification expires
So that I know the real-world consequences of inaction and am motivated to renew my certification promptly
- Given a peer mentor's certification expired at midnight, When the expiry check edge function runs, Then the mentor's active status is set to false and the visibility suppressor updates the record
- Given the mentor's active status is set to false, When a public query is made for active peer mentors in their chapter, Then the expired mentor is excluded from results due to RLS policy enforcement
- Given the mentor's active status has been suppressed, When the mentor opens their own profile in the app, Then they see a clear status banner: 'Your certification has expired. You are currently not visible to the public.'
- +3 more
As a As a Coordinator
I want to understand that my profile will be automatically suppressed from HLF's public-facing website and active peer mentor lists when my certification expires
So that I know the real-world consequences of inaction and am motivated to renew my certification promptly
- Given a peer mentor's certification expired at midnight, When the expiry check edge function runs, Then the mentor's active status is set to false and the visibility suppressor updates the record
- Given the mentor's active status is set to false, When a public query is made for active peer mentors in their chapter, Then the expired mentor is excluded from results due to RLS policy enforcement
- Given the mentor's active status has been suppressed, When the mentor opens their own profile in the app, Then they see a clear status banner: 'Your certification has expired. You are currently not visible to the public.'
- +3 more