Summary
The Notification entity, NotificationPreference entity, and notifications module structure exist, but the actual delivery pipeline is not wired up. Many features across the platform depend on notifications being delivered — this is the foundational backend service that unblocks notification UX.
Requirements
- Implement
NotificationService with methods to create and deliver notifications
- Wire up Nodemailer SMTP integration for email delivery (already in dependencies)
- Create in-app notifications on all escrow lifecycle events:
ESCROW_FUNDED — notify all parties
MILESTONE_RELEASED — notify seller
DISPUTE_FILED — notify all parties + admins
DISPUTE_RESOLVED — notify all parties
ESCROW_EXPIRED — notify all parties
PARTY_INVITED — notify the invited party
CONDITION_MET — notify escrow creator
- Respect
NotificationPreference settings (email on/off, in-app on/off per event type)
- Add endpoints:
GET /notifications (list), PATCH /notifications/:id/read (mark read), GET /notifications/unread-count
- Add a
NotificationPreference CRUD endpoint for users to manage their settings
Acceptance Criteria
Context
- Notification entity:
apps/backend/src/notifications/notification.entity.ts
- Notification preference:
apps/backend/src/notifications/notification-preference.entity.ts
- Notifications module:
apps/backend/src/notifications/notifications.module.ts
- Nodemailer is already in
package.json
Points: 150
Summary
The
Notificationentity,NotificationPreferenceentity, and notifications module structure exist, but the actual delivery pipeline is not wired up. Many features across the platform depend on notifications being delivered — this is the foundational backend service that unblocks notification UX.Requirements
NotificationServicewith methods to create and deliver notificationsESCROW_FUNDED— notify all partiesMILESTONE_RELEASED— notify sellerDISPUTE_FILED— notify all parties + adminsDISPUTE_RESOLVED— notify all partiesESCROW_EXPIRED— notify all partiesPARTY_INVITED— notify the invited partyCONDITION_MET— notify escrow creatorNotificationPreferencesettings (email on/off, in-app on/off per event type)GET /notifications(list),PATCH /notifications/:id/read(mark read),GET /notifications/unread-countNotificationPreferenceCRUD endpoint for users to manage their settingsAcceptance Criteria
Context
apps/backend/src/notifications/notification.entity.tsapps/backend/src/notifications/notification-preference.entity.tsapps/backend/src/notifications/notifications.module.tspackage.jsonPoints: 150