Push Notification Service
Component Detail
Service Layer
high complexity
backend
2
Dependencies
3
Dependents
11
Entities
0
Integrations
Description
Server-side service responsible for constructing notification payloads and dispatching them via the Push Notification Gateway abstraction layer. Handles routing logic per notification scenario (assignment dispatch, activity reminder, event update, coordinator alert), selects target device tokens from the repository, and records delivery metadata.
push-notification-service
Responsibilities
- Build notification payloads for each notification scenario type
- Retrieve target device tokens for a given user or user group
- Dispatch notifications via the Push Notification Gateway (APNs / FCM)
- Persist notification records to the notifications table for inbox display
- Handle delivery failures and implement retry logic
Interfaces
sendToUser(userId: string, payload: NotificationPayload) → Promise<void>
sendToUsers(userIds: string[], payload: NotificationPayload) → Promise<void>
buildPayload(scenario: NotificationScenario, data: Record<string, unknown>) → NotificationPayload
recordDelivery(userId: string, payload: NotificationPayload, status: string) → Promise<void>
Relationships
Dependencies (2)
Components this component depends on
Dependents (3)
Components that depend on this component
Related Data Entities (11)
Data entities managed by this component
Assignment
20 fields
core
Assignment Status Log
12 fields
audit
Certification
19 fields
core
Course
23 fields
core
Device Token
12 fields
core
Event Registration
14 fields
core
Notification
21 fields
core
Notification Preferences
19 fields
configuration
User
26 fields
core
User Achievement
14 fields
core
User Role
15 fields
core