learn

Notifications

Stored rows plus live pushes, one helper.

Every notification is a stored row first — connection requests and accepts, likes, comments, job applications, and new messages — so nothing is lost when the recipient is offline. The same helper then pushes into the recipient room for instant display. Self-actions never notify. The bell catches up over REST with unread counts; live arrivals land through the socket service into the slice.

What it owns

  • Six notification types across connections, posts, jobs, chat
  • The notify helper: store, populate, emit
  • Paged list with unread counts
  • Single, all, and delete read-state changes

Files

File list and purposes from the folder README.

FilePurpose
frontend/src/components/notifications/NotificationBell.jsxBell with list, read, and delete actions.
frontend/src/services/notificationService.jsList and read-state calls.
backend/routes/notificationRoutes.jsList, read, read-all, delete routes.
backend/controllers/notificationController.jsnotifyUser helper plus read routes.
backend/models/Notification.jsTyped rows with read flags.
Notifications slice
BrowserAPIRealtimeCacheDatabaseShareddurableephemeral

Talks to

Sources: backend/controllers/notificationController.js, backend/models/Notification.js, frontend/src/components/notifications/NotificationBell.jsx (documented at commit cdef8af)

On this page