ื“ืœื’ ืœืชื•ื›ืŸ ื”ืจืืฉื™

Notification Architecture

How notifications flow through the Gauzy system.

Notification Channelsโ€‹

Channel Matrixโ€‹

EventIn-AppEmailPushWebSocket
Task assignedโœ…โœ…โœ…โœ…
Timesheet submittedโœ…โœ…โŒโœ…
Timesheet approvedโœ…โœ…โœ…โœ…
Invoice sentโœ…โœ…โŒโŒ
@mentionโœ…โœ…โœ…โœ…
Team updateโœ…โŒโŒโœ…
Timer startedโŒโŒโŒโœ…

Service Implementationโ€‹

@Injectable()
export class NotificationService {
async notify(recipientId: string, type: NotificationType, data: any) {
// 1. Check user preferences
const prefs = await this.getPreferences(recipientId);

// 2. Create in-app notification
if (prefs.inApp) {
await this.createInAppNotification(recipientId, type, data);
}

// 3. Send email
if (prefs.email) {
await this.emailQueue.add("notify", { recipientId, type, data });
}

// 4. Push via WebSocket
if (prefs.push) {
this.wsGateway.sendToUser(recipientId, "notification", { type, data });
}
}
}

User Preferencesโ€‹

Users configure notification preferences per channel:

{
"assignTask": { "inApp": true, "email": true, "push": true },
"mention": { "inApp": true, "email": true, "push": true },
"approval": { "inApp": true, "email": true, "push": false },
"teams": { "inApp": true, "email": false, "push": false }
}