Skip to content

🔔 Feat: Real-time Notification System #82

@Cedarich

Description

@Cedarich

Title: feat(notify): implement websocket notifications (socket.io)
Complexity Score: 200 points

Description
Users expect instant feedback. Implement a WebSocket gateway to push real-time updates for events like "Bid Received", "Item Sold", or "Auction Won".

Requirements and Context

  • Tech: socket.io with @nestjs/platform-socket.io.
  • Auth: Authenticate socket connections using the existing JWT strategy.
  • Events:
    • notification: Generic event for UI toasts.
    • bid_update: Real-time auction price updates.

Suggested Execution

  1. Create NotificationsModule and NotificationsGateway.
  2. Implement handleConnection to verify JWT token from query param or header.
  3. Create NotificationsService that can be injected into other modules (Marketplace, Auth).
  4. When an auction bid is placed, call notificationsService.notifyUser(sellerId, 'New Bid').

Test and Commit

  • Test connection with valid/invalid tokens.
  • Commit Message: feat(notify): implement websocket notifications (socket.io)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions