Real-Time Product Updates
- Complexity: High
- Stack: Full-stack (Backend + Frontend)
As a customer, I want to see product changes in real time so that I always have up-to-date information without refreshing the page.
Description
When an admin updates a product (price, description, availability) via the existing ProductController endpoints, other users only see the change after a manual page refresh. This story adds WebSocket-based push updates so all connected clients receive product changes instantly. The frontend ProductService currently uses Angular Signals to manage product state - real-time events should integrate with this existing reactive pattern.
Acceptance Criteria
- [ ] Creating a product in one browser session adds it to another session's
product-catalog-pageimmediately - [ ] Updating a product in one session reflects immediately in another session's product list
- [ ] Deleting a product in one session removes it from another session's product list
- [ ] The
product-detail-pageupdates live when the displayed product is modified - [ ] If a product is deleted while a user is viewing it, a notification is shown (via
NotificationService) and the user is redirected to the catalog - [ ] The client reconnects automatically after a WebSocket connection drop
- [ ] Failed mutations (validation errors) do not publish events