Multi-Channel Notification System (Issue #86)
Overview
KoproGo supports multi-channel notifications (Email, SMS, Push, In-App) with per-user preference management. 22 notification types cover all platform events from payment reminders to meeting invitations.
Channels
Email: Primary channel for formal communications
SMS: Urgent notifications (payment overdue, emergency)
Push: Mobile app notifications (future)
InApp: Web dashboard notifications (badge + dropdown)
Notification Types (22)
Category |
Types |
|---|---|
Meetings |
MeetingReminder, MeetingCreated, MeetingCancelled |
Payments |
PaymentDue, PaymentReceived, PaymentOverdue |
Documents |
DocumentShared, DocumentUploaded |
Tickets |
TicketUpdate, TicketAssigned, TicketResolved |
System |
SystemAlert, SystemMaintenance |
User Preferences
Each user can configure notification preferences per type and per channel:
{
"notification_type": "PaymentDue",
"enabled": true,
"email_enabled": true,
"sms_enabled": false,
"push_enabled": true
}
API Endpoints
Notifications:
POST /notifications- Create notificationGET /notifications/my- List my notificationsGET /notifications/unread- List unreadPUT /notifications/:id/read- Mark as readPUT /notifications/read-all- Mark all as readDELETE /notifications/:id- DeleteGET /notifications/stats- Statistics
Preferences:
GET /notification-preferences/:user_id- Get all preferencesGET /notification-preferences/:user_id/:type- Get specificPUT /notification-preferences/:user_id/:type- Update
Architecture
Domain:
notification.rs,notification_preference.rsUse Cases:
notification_use_cases.rs(13 methods)Migration:
20251117000001_create_notifications.sqlBDD Tests:
notifications.feature(14 scenarios)