In-app notifications
In-app notifications are database records (Notification model) rendered by the notification bell in the navigation bar. The bell:
- Polls for unread notifications every 30 seconds
- Shows the unread count as a badge
- Pauses polling when the browser tab is hidden
Email notifications
Transactional emails are sent via Brevo in production (HTTPS REST API) and nodemailer SMTP (e.g. Gmail) in development. Every attempt is recorded in theEmailLog table with status and error details.
Notification service
File:backend/src/notifications/notifications.service.ts
Resilience
- Send failures are logged in
EmailLogbut never block the order transition - No retry queue for failed emails
- No delivery-status webhooks
- When orders are deleted, related notifications are cleaned up in the same transaction