Skip to content

feat: implement trending events and platform statistics APIs#930

Open
sshdopey wants to merge 2 commits into
Arena1X:mainfrom
sshdopey:implement-trending-and-stats-apis
Open

feat: implement trending events and platform statistics APIs#930
sshdopey wants to merge 2 commits into
Arena1X:mainfrom
sshdopey:implement-trending-and-stats-apis

Conversation

@sshdopey
Copy link
Copy Markdown
Contributor

@sshdopey sshdopey commented Jun 2, 2026

What

Implement two new API endpoints for analytics and admin functionalities: trending events discovery and platform-wide statistics reporting.

Issues Resolved

Closes #753
Closes #740

Changes

#753 - Implement Trending Events API

  • Add GET /api/analytics/trending endpoint with configurable parameters:
    • limit (1-50, default 10): number of events to return
    • timeWindow (24h, 7d, 30d): time range for trending calculation
  • Trending score calculation includes:
    • Recent participant joins (weighted heavily)
    • Recent predictions submitted
    • Total participant count
    • Total match count
    • Time remaining for the event
  • Response includes event details, trending score, activity count, and growth rate
  • 10-minute response caching
  • Full OpenAPI documentation

#740 - Implement Platform Statistics API

  • Add GET /api/admin/creator-events/stats endpoint for admin-only access
  • Calculates comprehensive platform metrics:
    • Event counts (total, active, completed, cancelled)
    • Participant and match statistics
    • Prediction submission metrics
    • Fee collection data
    • Average metrics per event/user
    • Most active creator and most popular event
  • Optional date range filtering for time-scoped analysis
  • 10-minute response caching
  • Full OpenAPI documentation
  • Admin authentication required

sshdopey added 2 commits June 2, 2026 09:22
Resolves Arena1X#753

- Add new GET /api/analytics/trending endpoint with configurable limit (1-50) and time window (24h, 7d, 30d)
- Calculate trending score based on recent participant joins, prediction submissions, participant count, match count, and time remaining
- Include recent activity count and participant growth rate metrics
- Implement response caching with 10-minute TTL
- Add OpenAPI documentation for the trending events endpoint
Resolves Arena1X#740

- Add new GET /api/admin/creator-events/stats endpoint for platform-wide statistics
- Calculate total events, active/completed/cancelled counts, unique participants, matches, and predictions
- Include fee collection statistics, average metrics, and top creators/events
- Implement optional date range filtering (all time, month, week, day)
- Add response caching with 10-minute TTL
- Add OpenAPI documentation for the stats endpoint
- Require admin authentication for access
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview, Comment Jun 2, 2026 9:23am

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 2, 2026

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

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.

[Backend] — Implement Trending Events API [Backend] — Implement Get Platform Statistics API

1 participant