Skip to content

Add WebSocket event gateway for real-time cross-service notifications #4

@amaydixit11

Description

@amaydixit11

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

  1. WebSocket event gateway: Centralized WebSocket server that all downstream services can publish events to
  2. Event bus: Publish/subscribe pattern for inter-service communication
  3. Client subscription channels: Clients can subscribe to specific event types (marketplace, jobs, events, etc.)
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions