Skip to Content
Living documentation — last reviewed 2026-05-28
FeaturesPush NotificationsPush Notifications — Code Map

Push Notifications — Code Map

API

FileRole
apps/api/src/push-notifications/push-notifications.module.tsGlobal; BullMQ queue notifications-push; controllers + processor
apps/api/src/push-notifications/push-notifications.service.tsToken lifecycle + send + schedule. Constants: PUSH_QUEUE_NAME = 'notifications-push'
apps/api/src/push-notifications/push-notifications.processor.tsBullMQ worker; uses expo-server-sdk; chunks; schedules receipt check
apps/api/src/push-notifications/push-notifications.controller.tsPOST /devices/register, DELETE /devices/:token
apps/api/src/push-notifications/notification-prefs.controller.tsGET/PATCH /users/me/notification-preferences
apps/api/src/push-notifications/dto/register-device.dto.ts{ expoPushToken, platform: 'ios' | 'android' }

DB

FileRole
libs/db/src/lib/schema/device-tokens.tsdevice_tokens table
libs/db/src/lib/schema/notification-prefs.tsnotification_prefs (JSONB)

Shared

FileRole
libs/shared/src/lib/schemas/notification-prefs.tsNOTIFICATION_CHANNELS, NOTIFICATION_CATEGORIES, NotificationPrefsValue, isChannelOptedOut, isChannelEnabled

Mobile / web

  • Mobile app calls register on boot + revoke on sign-out. Source lives in the mobile repo (not in this monorepo).
  • Web has no push surface (PWA shell only via apps/web/src/components/pwa/).

Config

EnvPurpose
EXPO_ACCESS_TOKENOptional but recommended for FCM v1 backend; passed to new Expo({ accessToken })
Redis / BullMQ credsInherited from app-wide queue config