Skip to content

Implement issues #320 #321 #322 #323 - webhooks, rewards leaderboard, quiz feedback, course waitlist - #440

Open
olayinkaabdulsalam-hub wants to merge 2 commits into
ChainLearnOfficial:mainfrom
olayinkaabdulsalam-hub:feature/issues-320-323
Open

Implement issues #320 #321 #322 #323 - webhooks, rewards leaderboard, quiz feedback, course waitlist#440
olayinkaabdulsalam-hub wants to merge 2 commits into
ChainLearnOfficial:mainfrom
olayinkaabdulsalam-hub:feature/issues-320-323

Conversation

@olayinkaabdulsalam-hub

Copy link
Copy Markdown

Closes #320, Closes #321, Closes #322, Closes #323

Summary

Implements four GitHub issues for the ChainLearn API:

Issue #320: Webhook System

  • HMAC-SHA256 signed webhooks for secure delivery
  • Exponential backoff retry logic (max 5 retries, 24-hour window)
  • Admin API for webhook management (CRUD, secret rotation, statistics)
  • Fire-and-forget dispatch pattern to avoid blocking operations
  • Background job processor for webhook retry handling

Issue #321: Rewards Leaderboard

  • Public GET endpoint returning top 50 users by credits
  • Redis caching with 5-minute TTL for performance
  • Excludes users with 0 credits
  • Supports custom limit parameter

Issue #322: Quiz Feedback Customization

  • Optional correctFeedback and incorrectFeedback fields on quiz questions
  • AI service integration to generate custom feedback
  • Fallback to generic feedback when custom feedback not provided
  • Applied to all submission scenarios (correct, incorrect, out-of-range)

Issue #323: Course Enrollment Waitlist

  • Waitlist management with automatic position tracking
  • POST endpoint to join waitlist
  • DELETE endpoint to leave waitlist
  • GET endpoint to check waitlist status
  • Automatic position reordering when users leave
  • Integration with course enrollment to remove from waitlist on successful enrollment

Technical Details

  • 30 files modified/created
  • 2 new database migrations
  • New services: webhook-dispatcher, waitlist, leaderboard
  • Comprehensive e2e tests for all features
  • All code passes TypeScript compilation

Testing

  • Build: ✓ Passed
  • TypeScript: ✓ No errors
  • Tests: Created comprehensive e2e tests for all four features

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@olayinkaabdulsalam-hub 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

…hainLearnOfficial#322 ChainLearnOfficial#323 - webhooks, rewards leaderboard, quiz feedback, course waitlist

- Issue ChainLearnOfficial#320: Webhook system with HMAC signing, exponential backoff retry logic, admin CRUD endpoints
- Issue ChainLearnOfficial#321: Rewards leaderboard endpoint with caching, top 50 users by credits
- Issue ChainLearnOfficial#322: Quiz feedback customization with optional correctFeedback/incorrectFeedback fields
- Issue ChainLearnOfficial#323: Course enrollment waitlist management with position tracking

Features:
- Webhook dispatcher service with fire-and-forget pattern and HMAC-SHA256 signing
- Background job for webhook retry processing with exponential backoff (max 24h)
- Leaderboard caching with 5-minute TTL via Redis
- Quiz custom feedback with fallback to generic responses
- Waitlist position management with automatic reordering on removal
- Comprehensive e2e tests for all four features

Modified files: 30 total
- Database migrations for webhooks and enrollment waitlist
- Webhook admin API and background job processor
- Rewards leaderboard service with caching
- Quiz feedback fields and AI integration
- Waitlist service and controller
@olayinkaabdulsalam-hub
olayinkaabdulsalam-hub force-pushed the feature/issues-320-323 branch 2 times, most recently from dc516f1 to 9e6b1bd Compare August 31, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant