Skip to content

feat: add SSE live stats for campaign and leaderboard updates#820

Merged
joelpeace48-cell merged 2 commits into
FinesseStudioLab:mainfrom
luciachizaram:feat/sse-live-stats-815
Jun 29, 2026
Merged

feat: add SSE live stats for campaign and leaderboard updates#820
joelpeace48-cell merged 2 commits into
FinesseStudioLab:mainfrom
luciachizaram:feat/sse-live-stats-815

Conversation

@luciachizaram

Copy link
Copy Markdown
Contributor

Fixes #815

What changed

  • SSE endpoints for real-time campaign stats and leaderboard push
  • Last-Event-ID resume support for reliable reconnection
  • Heartbeat keep-alive (15s interval)
  • Max 100 clients per campaign stream with 429 on overflow
  • broadcastCampaignEvent() export for indexer integration

Endpoints

  • GET /api/v1/campaigns/:id/stream — campaign stats stream
  • GET /api/v1/campaigns/:id/leaderboard/stream — leaderboard stream

How to test

  • Connect via new EventSource('/api/v1/campaigns/<id>/stream')
  • Verify heartbeat events arrive every 15s
  • Test Last-Event-ID resume by reconnecting with header

Add Server-Sent Events endpoints for real-time campaign updates:
- GET /api/v1/campaigns/:id/stream — live campaign stats
- GET /api/v1/campaigns/:id/leaderboard/stream — live leaderboard
- Last-Event-ID resume support
- Heartbeat keep-alive (15s)
- Max 100 clients per campaign stream
- Slow client disconnect on write failure
- broadcastCampaignEvent() export for indexer integration

Fixes FinesseStudioLab#815
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@luciachizaram is attempting to deploy a commit to the joelpeace48-cell's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@luciachizaram Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@joelpeace48-cell joelpeace48-cell merged commit b41304d into FinesseStudioLab:main Jun 29, 2026
3 of 14 checks passed
joelpeace48-cell added a commit that referenced this pull request Jun 30, 2026
feat: add SSE live stats for campaign and leaderboard updates
joelpeace48-cell added a commit that referenced this pull request Jun 30, 2026
feat: add SSE live stats for campaign and leaderboard updates
joelpeace48-cell added a commit that referenced this pull request Jun 30, 2026
feat: add SSE live stats for campaign and leaderboard updates
joelpeace48-cell added a commit that referenced this pull request Jun 30, 2026
feat: add SSE live stats for campaign and leaderboard updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Realtime: WebSocket / SSE live stats for leaderboards and campaign progress

2 participants