Service Layer high complexity backend
3
Dependencies
6
Dependents
12
Entities
0
Integrations

Description

Backend Next.js service that dispatches push notifications to user devices via the FCM HTTP v1 API. Constructs typed action payloads for Flutter deep-link routing, applies per-tenant organization label overrides to notification content, and persists notification records to the database for inbox retrieval.

Feature: Push Notifications

push-notification-service

Responsibilities

  • Dispatch push notifications via FCM HTTP v1 API to one or multiple devices
  • Construct typed action payloads so the Flutter client can deep-link to the correct screen
  • Apply organization label overrides to notification display strings via the labels system
  • Persist notification records to the notifications table after dispatch
  • Log delivery status and classify token invalidation errors for cleanup

Interfaces

sendNotification(userId, type, payload)
sendBulkNotifications(userIds, type, payload)
sendToDevice(token, notification, data)
getDeliveryStatus(notificationId)
resolveOrganizationLabels(organizationId, content)