UserPreferences - IEEE-Team-3/map GitHub Wiki

Overview

User preferences allow users to customize their notification experience. Preferences include choosing which types of notifications to receive, how they are delivered, and the frequency of notifications. These settings ensure that users only receive relevant notifications in a way that suits their needs.

Key User Preferences

  • Notification Types: Users can choose which types of notifications they want to receive, such as task assignments, role changes, and system alerts.
  • Delivery Method: Users can select their preferred delivery methods (e.g., email, push, in-app alerts).
  • Notification Frequency: Users can set the frequency of notifications (e.g., immediate, daily, weekly).
  • Mute Options: Users can mute specific notification types or channels.

Example User Preference Configuration

const UserPreferencesSchema = new Schema({
  userId: { type: Schema.Types.ObjectId, ref: 'User' },
  notificationTypes: [{ type: String, enum: ['Task Assigned', 'Message Received', 'Team Invitation', 'Role Change'] }],
  deliveryMethods: [{ type: String, enum: ['Email', 'Push', 'In-App', 'SMS'] }],
  frequency: { type: String, enum: ['Immediate', 'Daily', 'Weekly'], default: 'Immediate' },
  mute: [{ type: String, enum: ['Task Assigned', 'Message Received', 'Team Invitation'] }],
});

Example Preferences UI

The preferences page allows users to toggle notification types, select delivery methods, and choose frequency settings.

+---------------------------------------------------------+
| Notification Preferences                                |
| +--------------------+----------+----------+---------+ |
| | Notification Type  | [X] Task  | [ ] Role  | [X] System | |
| +--------------------+----------+----------+---------+ |
| | Delivery Method    | [ ] Email | [X] Push | [ ] SMS   | |
| +--------------------+----------+----------+---------+ |
| | Frequency          | [X] Immediate | [ ] Daily | [ ] Weekly | |
| +--------------------+----------+----------+---------+ |
+---------------------------------------------------------+
⚠️ **GitHub.com Fallback** ⚠️