Certification Reminder Service
Component Detail
Description
Service invoked by the nightly cron job to evaluate upcoming certification expiries and dispatch push notifications and in-app badge updates at 30-, 14-, and 7-day thresholds. Sends reminders to both the peer mentor and their coordinator.
certification-reminder-service
Summaries
The Certification Reminder Service protects the organisation from compliance risk by proactively alerting peer mentors and their coordinators before certifications lapse. By automating outreach at 30-, 14-, and 7-day thresholds, the service dramatically reduces the likelihood of mentors becoming non-compliant, which would trigger costly administrative interventions and potential removal from public-facing listings. This automation replaces what would otherwise be a manual, error-prone coordinator responsibility, freeing staff to focus on higher-value activities. The result is a measurable improvement in certification renewal rates, stronger programme integrity, and reduced liability exposure for the organisation.
This is a medium-complexity backend service with a focused responsibility set, making it a well-scoped deliverable. It has hard dependencies on both the Certification Repository and the Push Notification Service, so those components must reach a stable interface contract before integration work begins. Testing requires a realistic dataset of near-expiry certification records and a mock or staging push notification endpoint. Delivery risk is low if the nightly cron infrastructure is established early, but delays in the Push Notification Service will block end-to-end validation.
Deduplication logic (hasReminderBeenSent) must be thoroughly covered in unit tests to prevent double-notification incidents in production.
The service exposes four methods: runDailyExpiryCheck() as the cron entry point, getUpcomingExpirations(thresholdDays) to query the repository, sendExpiryReminder(mentorId, coordinatorId, daysRemaining) to dispatch notifications, and hasReminderBeenSent(mentorId, thresholdDays) for idempotency checks. It depends on certification-repository for data access and push-notification-service for delivery. The deduplication guard must persist reminder dispatch records (likely via appendRenewalHistory or a dedicated reminders table) so that reruns of the cron do not produce duplicate alerts. Threshold evaluation logic should treat the thresholds as inclusive boundaries and handle timezone normalisation carefully to avoid off-by-one day errors in production.
Responsibilities
- Query certifications expiring within 30, 14, and 7 days
- Determine which reminder threshold applies per mentor
- Dispatch push notifications to peer mentor and coordinator
- Record reminder dispatch in renewal history to avoid duplicate sends
Interfaces
runDailyExpiryCheck()
getUpcomingExpirations(thresholdDays)
sendExpiryReminder(mentorId, coordinatorId, daysRemaining)
hasReminderBeenSent(mentorId, thresholdDays)
Relationships
Dependencies (2)
Components this component depends on
Dependents (1)
Components that depend on this component
Related Data Entities (1)
Data entities managed by this component
Used Integrations (1)
External integrations and APIs this component relies on