Infrastructure high complexity backend
0
Dependencies
2
Dependents
1
Entities
0
Integrations

Description

Abstraction layer over platform-specific push delivery providers (FCM for Android via firebase-admin, APNs for iOS via node-apn or FCM HTTP v1). Accepts a normalized NotificationPayload and routes dispatch to the correct provider based on the device platform field on the token record. Decouples the Push Notification Service from provider-specific SDKs.

Feature: Push Notifications

push-notification-gateway

Responsibilities

  • Route dispatch to FCM or APNs based on device platform
  • Translate normalized NotificationPayload into provider-specific message formats
  • Handle provider error responses (invalid token, rate limit, service unavailable)
  • Surface delivery errors to the Push Notification Service for retry decisions
  • Log raw provider responses for audit and debugging

Interfaces

send(token: string, platform: string, payload: NotificationPayload) → Promise<GatewayResult>
sendBatch(tokens: DeviceTokenRecord[], payload: NotificationPayload) → Promise<GatewayResult[]>
handleProviderError(error: ProviderError, token: string) → GatewayErrorAction

Relationships

Dependents (2)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component