Overview
The existing notification system dispatches records to the database, but there is no push mechanism to inform connected clients instantly. Users must refresh the page to see new notifications, asset status changes, or incoming maintenance alerts. This issue adds a WebSocket gateway to push events to clients in real time.
Context
@nestjs/websockets and socket.io are already installed (referenced in recent BullMQ PR)
- The notification entity (from BE-53 or BE-54) is the source of truth — the gateway emits after a notification is persisted
- Clients should authenticate the WebSocket connection using the same JWT access token used for HTTP
Acceptance Criteria
Overview
The existing notification system dispatches records to the database, but there is no push mechanism to inform connected clients instantly. Users must refresh the page to see new notifications, asset status changes, or incoming maintenance alerts. This issue adds a WebSocket gateway to push events to clients in real time.
Context
@nestjs/websocketsandsocket.ioare already installed (referenced in recent BullMQ PR)Acceptance Criteria
src/gateway/events.gateway.tsextendingWebSocketGatewaywith CORS configured fromConfigServiceWsExceptionuser.idnotification.newevent when a notification is created for a userasset.status_changedevent to the asset's department room when an asset status changesmaintenance.dueevent when a maintenance job processor detects an upcoming due dateGatewayModuleand register it inAppModulesrc/gateway/events.gateway.tsJSDoc