feat: implement notification system with Mailgun email integration

- Add notifications table with migration
- Create NotificationService with area-of-interest matching
- Integrate Mailgun for email delivery
- Add notification API endpoints (get, mark as read, unread count)
- Create scheduled jobs for event reminders and cleanup
- Build NotificationBell component for frontend
- Add notification triggers for reports and events
- Implement comprehensive test script
- Update Header with notification bell
- Add email templates with HTML formatting

Requirements satisfied:
- 10.1: Users can define areas of interest (1-50km radius)
- 10.2: Notifications sent within 10 minutes
- 10.3: Notifications for new reports/events in user area
- 10.4: Configurable notification preferences (email/in-app)

Task 33 completed
This commit is contained in:
2025-11-17 00:31:23 +00:00
parent 052ba46bdc
commit d61c21c54d
21 changed files with 1716 additions and 3 deletions

View File

@@ -28,8 +28,10 @@
"exifr": "^7.1.3",
"express": "^4.21.1",
"express-validator": "^7.2.0",
"form-data": "^4.0.4",
"helmet": "^8.0.0",
"json2csv": "^6.0.0-alpha.2",
"mailgun.js": "^12.1.1",
"multer": "^1.4.5-lts.1",
"node-cron": "^4.2.1",
"redis": "^5.9.0",