Skip to content

feat: WebSocket real-time stream updates #18

Description

@ijeoma270

The README has "WebSocket real-time sale feed" listed as planned. Adapt that for streams — when the indexer picks up a new event, push it to connected WebSocket clients in real time instead of waiting for them to poll.

Use case: the frontend dashboard should update live when a stream is created, withdrawn, or cancelled without the user having to refresh. Same for vesting events.

Build a WebSocket server (ws or socket.io, keep it lightweight) that:

  • Accepts connections with an optional address filter (only send events for my streams)
  • Pushes new events as the indexer processes them
  • Handles reconnect gracefully
  • Sends initial state on connect (recent events for the subscribed address)

The indexer worker needs a hook to broadcast events after persisting them. Either an event emitter pattern or a simple callback.

Done when:

  • WebSocket server running alongside the Express API
  • Clients can subscribe to events for a specific address
  • New events pushed in real time as indexer processes them
  • Initial batch of recent events sent on connect
  • Clean disconnect handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions