Description
The Hub currently serves as an API gateway/broker but has no real-time event distribution capability. Services need to push real-time notifications (new messages, application updates, new listings) across the ecosystem but must rely on individual service implementations.
Proposed Feature
- WebSocket event gateway: Centralized WebSocket server that all downstream services can publish events to
- Event bus: Publish/subscribe pattern for inter-service communication
- Client subscription channels: Clients can subscribe to specific event types (marketplace, jobs, events, etc.)
- Event persistence: Store events for offline users with replay on reconnection
Technical Approach
- Integrate
@nestjs/websockets with the existing NestJS structure
- Define a standard event schema (type, source, payload, timestamp)
- Each downstream service publishes to Hub's event bus via HTTP or internal gRPC
- Hub routes events to subscribed WebSocket clients based on user interests and roles
Description
The Hub currently serves as an API gateway/broker but has no real-time event distribution capability. Services need to push real-time notifications (new messages, application updates, new listings) across the ecosystem but must rely on individual service implementations.
Proposed Feature
Technical Approach
@nestjs/websocketswith the existing NestJS structure