Repository navigation
feat: implement notification system with BullMQ processor and user pr… - #313
akinboyewaSamson wants to merge 5 commits into
Conversation
|
Kindly review pr |
|
kindly review |
|
@akinboyewaSamson resolve conflicts |
|
kindly review |
|
@akinboyewaSamson the current head The branch includes
|
Maintainer stabilization triageNo merge or closure action is being taken now. This PR is on hold until the next Stellar Wave starts and the relevant baseline is green. Provisional disposition: Hold for re-scope. Next review: Compare the notification implementation with current V2 authority and issues after baseline recovery; split and rebase only if the capability remains canonical. The provisional cross-repository disposition is recorded in truthbounty-protocol PR #7. Existing issues remain open. Please do not rework or rebase this PR unless a maintainer explicitly activates and assigns the work. |
|
@akinboyewaSamson this PR currently has merge conflicts with |
closes #283
This PR introduces the Notification & Event Delivery API (BE-020) to act as the centralized event distribution hub for the TruthBounty ecosystem. By decoupling notification generation from business logic, this service ensures highly reliable, asynchronous, and user-configurable event delivery across channels.
🎯 Objectives Achieved
Centralized Event Queue: Integrated BullMQ (Redis) to reliably queue, process, and retry protocol events asynchronously.
Preference Engine: Created NotificationPreference entities allowing users to manage opt-outs, configure delivery channels, and set quiet hours.
Multi-channel Architecture: Built foundational routing for IN_APP, EMAIL, PUSH, and WEBHOOK deliveries.
Delivery Tracking: Established lifecycle tracking (QUEUED, DELIVERED, FAILED, DISMISSED) on the Notification entity.
Metrics Dashboard: Added real-time monitoring endpoint for success/failure rates.
Testing: 100% test coverage for the notifications module (Controller, Service, and Processor).
📝 Files Added / Modified
src/notifications/*: Brand new module containing entities, enums, DTOs, controllers, services, and the BullMQ processor.
src/app.module.ts: Imported and registered NotificationsModule and its TypeORM entities.
docs/NOTIFICATION_ARCHITECTURE.md: Added comprehensive documentation outlining the queue and preference architectures.
Summary by CodeRabbit