Skip to content

feat(routes-f): viewer peaks, camera angles, chat velocity, creator export (#1022, #1025, #1028, #1032)#1090

Merged
davedumto merged 1 commit into
StreamFi-x:devfrom
josephchimebuka:feat/routes-f-peaks-angles-velocity-export-1022-1025-1028-1032
Jun 27, 2026
Merged

feat(routes-f): viewer peaks, camera angles, chat velocity, creator export (#1022, #1025, #1028, #1032)#1090
davedumto merged 1 commit into
StreamFi-x:devfrom
josephchimebuka:feat/routes-f-peaks-angles-velocity-export-1022-1025-1028-1032

Conversation

@josephchimebuka

@josephchimebuka josephchimebuka commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements four self-contained routes-f practice endpoints, each scoped entirely under app/api/routes-f/:

  • feat(routes-f): concurrent viewer peaks #1025 — Viewer peaks (/api/routes-f/viewer-peaks)

    • GET ?creator_id&limit=10 → top N peak concurrent viewer counts across a creator's streams
    • Seed stream sessions with aligned viewer samples and timestamps
    • Sorted by peak_viewers descending
  • feat(routes-f): multi-camera angle switcher #1032 — Multi-camera angles (/api/routes-f/camera-angles)

    • GET ?stream_id → available camera angles (id, label, playback_id)
    • POST { viewer_id, stream_id, angle_id } → stores viewer's angle selection in memory
    • Rejects unknown streams (404) and unknown angles (400)
  • feat(routes-f): chat velocity per minute #1022 — Chat velocity (/api/routes-f/chat-velocity)

    • GET ?stream_id{ series, peak_minute, total_messages }
    • Buckets timestamped chat events into per-minute counts
    • Detects the minute with the highest message volume
  • feat(routes-f): creator data export request #1028 — Creator data export (/api/routes-f/creator-export)

    • POST { creator_id, sections }{ export_id, status: queued }
    • GET ?export_id{ status, download_url? }
    • In-memory queue with synthetic auto-complete delay

All routes include bundled seed data and Jest tests covering ordering, limits, selection, bucketing, lifecycle, and validation.

Test plan

  • npm test -- --testPathPattern="viewer-peaks|camera-angles|chat-velocity|creator-export"
  • GET /api/routes-f/viewer-peaks?creator_id=creator_a&limit=2 returns peaks sorted desc
  • GET /api/routes-f/camera-angles?stream_id=stream_multi_1 lists 3 angles
  • POST /api/routes-f/camera-angles with unknown angle_id returns 400
  • GET /api/routes-f/chat-velocity?stream_id=stream_chat_1 returns minute series + peak
  • POST /api/routes-f/creator-export then GET ?export_id after delay shows ready + download_url

Issues

Closes #1022
Closes #1025
Closes #1028
Closes #1032

…xport

Implements StreamFi-x#1022, StreamFi-x#1025, StreamFi-x#1028, and StreamFi-x#1032 as self-contained routes-f endpoints with seed data and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@josephchimebuka is attempting to deploy a commit to the david's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@josephchimebuka 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

@josephchimebuka josephchimebuka changed the title feat(routes-f): viewer peaks, camera angles, chat velocity, creator export feat(routes-f): viewer peaks, camera angles, chat velocity, creator export (#1022, #1025, #1028, #1032) Jun 27, 2026
@davedumto davedumto merged commit c188163 into StreamFi-x:dev Jun 27, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants