Skip to Content
Routes (HTTP URLs)notification.route.ts

notification.route.ts

Three faces of the same feature:

1. User routes (/api/v1/users/...)

Baby: “This is my phone’s FCM token and my notification preferences.”

  • Register device token
  • Update prefs (due reminders, streak warnings, …)

Models: device-token.model.ts, notification-preference.model.ts

2. Admin routes (/api/v1/admin/notifications/...)

Baby: “Staff debug dashboard for pushes.”

  • Inspect logs, metrics, rollups

Models: notification-log.model.ts, notification-daily-rollup.model.ts

3. Internal routes (/internal/notifications/...)

Baby: “Hey server, it’s 8pm — send due reminders.”

Services in services/notifications/:

  • send-due-reminders.service.ts
  • send-streak-warnings.service.ts
  • fcm-sender.service.ts
  • notification-templates.ts

NOTIFICATION_DRY_RUN=true in dev prevents real pushes.

Last updated on