elmeg-demo/.specify/tasks/15_notifications.md

968 B

Task: Notifications System

Objective

Implement a notification system to alert users of relevant interactions (replies, mentions, group activity).

Steps

  • Backend:
    • Create Notification model (user_id, type, title, message, link, is_read, created_at).
    • Create routers/notifications.py.
    • Implement GET /notifications (list my notifications).
    • Implement POST /notifications/{id}/read (mark as read).
    • Implement logic to trigger notifications (e.g., when a user receives a reply).
  • Frontend:
    • Create NotificationBell component in the Navbar.
    • Show unread count badge.
    • Create NotificationsPopover or NotificationsPage to view list.
    • Handle "Mark as Read" interaction.

Acceptance Criteria

  • User receives a notification when someone replies to their comment.
  • User sees an unread count in the navbar.
  • Clicking a notification navigates to the relevant content.