feat: implement notification system with BullMQ processor and user pr… - #313
Open
akinboyewaSamson wants to merge 2 commits into
Open
feat: implement notification system with BullMQ processor and user pr…#313akinboyewaSamson wants to merge 2 commits into
akinboyewaSamson wants to merge 2 commits into
Conversation
…eference management
Author
|
Kindly review pr |
Author
|
kindly review |
Contributor
|
@akinboyewaSamson resolve conflicts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.