Skip to content

feat: implement notification system with BullMQ processor and user pr… - #313

Open
akinboyewaSamson wants to merge 5 commits into
DigiNodes:mainfrom
akinboyewaSamson:feat/BE-020-notification-api
Open

akinboyewaSamson wants to merge 5 commits into
DigiNodes:mainfrom
akinboyewaSamson:feat/BE-020-notification-api

Conversation

@akinboyewaSamson

@akinboyewaSamson akinboyewaSamson commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Build Status
    • The available build output reports 17 TypeScript errors, so the project may not compile successfully.
  • Chores
    • Added generated contract artifacts and compilation metadata. These files include interfaces for token and claim-status queries, along with verification and test-contract artifacts.

@akinboyewaSamson

Copy link
Copy Markdown
Contributor Author

Kindly review pr

@akinboyewaSamson

Copy link
Copy Markdown
Contributor Author

kindly review

@dDevAhmed

Copy link
Copy Markdown
Contributor

@akinboyewaSamson resolve conflicts

@akinboyewaSamson

Copy link
Copy Markdown
Contributor Author

kindly review

Copy link
Copy Markdown
Contributor

@akinboyewaSamson the current head 70adc3bea8d73d05366866672d7de3b81da7e5f6 is not mergeable and contains generated dependency/build output rather than a reviewable source-only notification change.

The branch includes node_modules, Hardhat artifacts/, cache/, build-info files, and build_errors.txt. Please:

  1. Rebase onto current main and resolve conflicts.
  2. Remove all generated dependencies, compiled artifacts, caches, and local error-output files from Git history.
  3. Keep only the notification source, migrations/entities, focused tests, and documentation required by the linked issue.
  4. Ensure .gitignore prevents these files returning.
  5. Run lint, build, tests, and security checks before requesting review.

Copy link
Copy Markdown
Contributor

Maintainer stabilization triage

No 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.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

Copy link
Copy Markdown
Contributor

@akinboyewaSamson this PR currently has merge conflicts with main, so it cannot be merged yet. Please update your branch with the latest main, resolve all conflicts without dropping intended changes, push the resolved branch, and confirm the required CI checks pass. I will re-evaluate the updated head SHA for merge.

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.

BE-020 — Implement Notification & Event Delivery API

3 participants