The challenge.
A notification system needs more than a live connection. People expect messages to arrive reliably, remain available after reconnecting, and keep their read state consistent across sessions.
The proposed solution.
A durable notification inbox backed by MongoDB, paired with a real-time transport for immediate updates. The client reconciles incoming events against a cursor-based API and treats the persisted inbox as the source of truth.
Engineering scope.
- Model notifications, recipients, delivery events, and read state.
- Build a paginated inbox and optimistic read/unread interactions.
- Design authenticated WebSocket or SSE connections with reconnection behavior.
- Implement idempotent event handling and a catch-up API.
The stack.
One connected system.
Backend events
Domain events trigger notification creation
MongoDB inbox
Durable messages and recipient state
WebSocket / SSE
Authenticated delivery with reconnect support
React application
Live inbox, unread state, and accessible announcements
Key engineering decisions.
Reconnection gaps
Recover missed messages from a durable cursor rather than assuming a live connection guarantees delivery.
Duplicate events
Use stable notification IDs and idempotent updates so a retry never creates duplicate inbox entries.
Accessible live updates
Use polite announcements and preserve keyboard focus instead of interrupting the person’s current task.
Intended outcomes.
These are design goals for this concept, not measured or delivered project results.
- A recoverable inbox that does not depend on a permanent connection.
- Predictable read state across reloads and sessions.
- A real-time UI designed for interruption-free use.