Skip to content

Added the Real Time Admin Dashboard Notification#186

Merged
rdodiya merged 6 commits into
rdodiya:gssoc_developfrom
SOUVIK-D10:feature/sse-notifications
May 25, 2026
Merged

Added the Real Time Admin Dashboard Notification#186
rdodiya merged 6 commits into
rdodiya:gssoc_developfrom
SOUVIK-D10:feature/sse-notifications

Conversation

@SOUVIK-D10
Copy link
Copy Markdown
Contributor

Issue Link

Closes #127

Changes Made

  • Added Notification Service that sends real time updates to admin board via SSE
  • Refactored OrderService and OrderNotificationService to match standards of coding
  • Refactored DashboardController and DashboardService to integrate subscription feature

Type of Change

  • New feature
  • Code refactor

Testing Performed

  • Sperate testing of new modules
  • Multiple Window listening at same time
  • Integrate Module test

Backend Testing

  • [ PASS] API endpoints tested locally with Postman/curl
  • [ PASS] Database migrations verified

How to test

open many command prompts and setup listening of notification then place orders and see the notifications are comming or not

Additional Notes

  • Need proper security structure to limit access of notification

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a real-time notification channel for admin dashboard order updates by introducing an SSE-based notification service and wiring it into order creation/status updates, then exposing a dashboard endpoint for clients to subscribe per-branch.

Changes:

  • Replaced the old OrderNotificationService concrete class with an interface and added OrderNotificationServiceImpl using SseEmitter fan-out per branch.
  • Updated OrderServiceImpl to publish notifications on new orders and status changes via the injected notification service.
  • Extended dashboard service/controller to provide an SSE subscription endpoint for branch notifications.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
RestroHub/src/main/java/com/restroly/qrmenu/order/service/OrderNotificationService.java Converts notification contract to an interface and adds SSE subscription method.
RestroHub/src/main/java/com/restroly/qrmenu/order/service/impl/OrderServiceImpl.java Injects notification service and triggers events on order create/status update.
RestroHub/src/main/java/com/restroly/qrmenu/order/service/impl/OrderNotificationServiceImpl.java Implements SSE emitter registry and broadcast logic for order events.
RestroHub/src/main/java/com/restroly/qrmenu/admin/dashboard/service/DashboardService.java Adds API to switch on branch notifications (SSE).
RestroHub/src/main/java/com/restroly/qrmenu/admin/dashboard/service/DashboardServiceImpl.java Validates branch existence and delegates subscription to notification service.
RestroHub/src/main/java/com/restroly/qrmenu/admin/dashboard/controller/DashboardController.java Exposes SSE stream endpoint for admin dashboard notifications.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

SOUVIK-D10 and others added 3 commits May 23, 2026 16:41
that can create PR conflicts with other contributors who are already working

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@SOUVIK-D10
Copy link
Copy Markdown
Contributor Author

Changes made:-
Added Notifications module
refactored dashboardcontroller and put notification request in dashboardnotification controller
made generic Sse interface and abstract class for easier implementation
currently has:
branchId listening for order
If you want AdminId listening do let me know

@rdodiya rdodiya merged commit c24cc83 into rdodiya:gssoc_develop May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Real-Time Order Updates to Admin Panel

3 participants