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.
| File | Purpose |
|---|---|
frontend/src/components/notifications/NotificationBell.jsx | Bell with list, read, and delete actions. |
frontend/src/services/notificationService.js | List and read-state calls. |
backend/routes/notificationRoutes.js | List, read, read-all, delete routes. |
backend/controllers/notificationController.js | notifyUser helper plus read routes. |
backend/models/Notification.js | Typed rows with read flags. |
Laying out Notifications slice…
BrowserAPIRealtimeCacheDatabaseShareddurableephemeral
Talks to
Sources: backend/controllers/notificationController.js, backend/models/Notification.js, frontend/src/components/notifications/NotificationBell.jsx (documented at commit cdef8af)