How momaataoui/pfa-notification-system works
Rexel Store combines a B2B storefront with an event-driven, multi-channel notification service. The user journey runs from browsing products and placing orders or product requests, through commerce persistence and Kafka events, to notification delivery and a CQRS-backed history. Admins also manage commerce, send notifications, and inspect delivery statistics. The graph reflects sampled calls and routing plus README-documented capabilities; several unsampled controller, event-consumer, and delivery links are intentionally omitted.
Main entry points: controller Store API · OrderService.java Order processing · pages Storefront pages · admin Admin pages
Components 26
Storefront UI
- Storefront pages
frontend/rexel-mini-store-frontend/src/app/pages - Admin pages
frontend/rexel-mini-store-frontend/src/app/pages/admin - Route guards
frontend/rexel-mini-store-frontend/src/app/app.routes.ts - Auth service
frontend/rexel-mini-store-frontend/src/app/services/auth.service.ts - Push client
frontend/rexel-mini-store-frontend/src/app/services/push-notification.service.ts
Commerce Backend
- Store API
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/controller - Product catalog
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/ProductService.java - Order processing
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/OrderService.java - Product requests
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/ProductRequestService.java - User profiles
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/UserService.java - Product store
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/repository/ProductRepository.java - Order store
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/repository/OrderRepository.java - Request store
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/repository/ProductRequestRepository.java - Event publisher
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/KafkaEventPublisher.java
Notification Service
- Notification API
backend/notification-service/src/main/java/com/pfa/rexel/notification/controller - Notification queries
backend/notification-service/src/main/java/com/pfa/rexel/notification/service/NotificationService.java - Notification projection
backend/notification-service/src/main/java/com/pfa/rexel/notification/entity/Notification.java - CQRS commands
backend/notification-service/src/main/java/com/pfa/rexel/notification/cqrs - Channel selection
- Channel senders
backend/notification-service/src/main/java/com/pfa/rexel/notification/service
Identity and delivery
- Keycloak SSO
- Email and SMS providers
Other components
- Customer
- Administrator
- Kafka events
- WebSocket clients
Connections 32
- Customer → Storefront pages: uses
- Administrator → Admin pages: uses
- Storefront pages → Route guards: navigates
frontend/rexel-mini-store-frontend/src/app/app.routes.ts - Admin pages → Route guards: routes through
frontend/rexel-mini-store-frontend/src/app/app.routes.ts - Storefront pages → Auth service: authenticates via
- Auth service → Keycloak SSO: authenticates
frontend/rexel-mini-store-frontend/src/app/services/auth.service.ts - Auth service → User profiles: loads profile
frontend/rexel-mini-store-frontend/src/app/services/auth.service.ts - Storefront pages → Store API: calls
- Admin pages → Store API: calls
- Store API → Product catalog: delegates
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/controller/AdminProductController.java - Store API → Order processing: delegates
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/controller/OrderController.java - Store API → Product requests: delegates
- Store API → User profiles: delegates
- Product catalog → Product store: reads and writes
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/ProductService.java - Order processing → Product store: updates stock
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/OrderService.java - Order processing → Order store: persists orders
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/OrderService.java - Order processing → User profiles: looks up phone
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/OrderService.java - Order processing → Event publisher: publishes events
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/OrderService.java - Product requests → Request store: persists requests
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/ProductRequestService.java - Product requests → Event publisher: publishes events
backend/rexel-mini-store/src/main/java/com/pfa/rexel/store/service/ProductRequestService.java - Event publisher → Kafka events: publishes
- Kafka events → Notification API: triggers notifications
README.md - Admin pages → Notification API: manages notifications
README.md - Notification API → CQRS commands: sends commands
backend/notification-service/src/main/java/com/pfa/rexel/notification/controller/AdminNotificationController.java - Notification API → Notification queries: queries
backend/notification-service/src/main/java/com/pfa/rexel/notification/controller/AdminNotificationController.java - Notification queries → Notification projection: reads projection
backend/notification-service/src/main/java/com/pfa/rexel/notification/service/NotificationService.java - CQRS commands → Notification projection: projects state
- Notification queries → Channel selection: selects channels
- Channel selection → Channel senders: dispatches
- Channel senders → Email and SMS providers: sends email and SMS
README.md - Channel senders → WebSocket clients: sends push
README.md - Push client → WebSocket clients: connects
README.md