| AsyncConfig | Declares the notificationExecutor bean (fixed-size ThreadPoolTaskExecutor) used for non-blocking Web-Socket pushes. | Spring @Configuration | — |
| notificationExecutor | Executes long-running or blocking tasks (WS broadcasts, e-mail) outside HTTP threads. | Executor bean | — (created by AsyncConfig) |
| MailConfig | Creates and wires JavaMailSender, SpringTemplateEngine and a ClassLoaderTemplateResolver for HTML templates under templates/email/. | Spring @Configuration | SMTP host/port/credentials in spring.mail.* properties |
| JavaMailSender | Low–level SMTP client that actually sends the MIME messages. | JavaMailSender | SMTP server |
| SpringTemplateEngine | Renders Thymeleaf email templates with dynamic context. | SpringTemplateEngine | — |
| WebSocketConfig | Registers STOMP endpoints (/ws, SockJS fallback) and the in-memory SimpleBroker (/topic/**). | Spring WebSocketMessageBrokerConfigurer | WebSocketSecurityConfig |
| Spring SimpleBroker | In-memory message broker that multicasts frames published to /topic/** to connected clients. | STOMP broker | — |
| WebSocketSecurityConfig | Adds the JWT handshake interceptor, security context propagation and an (optional) authorization manager for WS frames. | WebSocketMessageBrokerConfigurer beans (ChannelInterceptor, AuthorizationChannelInterceptor) | JwtAuthentificationService, Spring Security context |
| DomainEventPublisher | Utility wrapper around Spring ApplicationEventPublisher used by all bounded-contexts to emit domain events. | publish(Object) | Spring event bus |
| NotificationServiceImpl | Central domain-event listener. Decides template, recipients & content, then delegates to in-app push + e-mail. | @EventListener methods | InAppNotificationService, MailService |
| InAppNotificationService | Persistence + delivery of notifications: saves the entity, converts to DTO, and schedules Web-Socket broadcast. | pushToUser, pushToProvider | NotificationRepository, NotificationMapper, NotificationMessagePublisher |
| NotificationRepository | CRUD access to Notification table with convenience finders (top 20, unread-only, provider/user scope). | Spring-Data JPA | MySQL (via Hibernate) |
| NotificationMapper | MapStruct mapper between Notification entity and NotificationResponse DTO. | toDto (single & list) | — |
| NotificationMessagePublisher | Sends a DTO to /topic/users/{id} or /topic/providers/{opsCode} asynchronously via SimpMessagingTemplate. | sendUserNotification, sendProviderNotification (annotated @Async) | notificationExecutor, Spring SimpleBroker |
MailService (MailSenderServiceImpl) | Composes an HTML e-mail (Thymeleaf) and delivers it through JavaMailSender. | sendHtmlMail(to, subject, template, ctx) | JavaMailSender, SpringTemplateEngine |
| NotificationController | REST façade: lists the last 20 notifications and marks one as read/unread. | GET /v1/notifications, PATCH /v1/notifications/{id} | NotificationService, CurrentUserService |
| NotificationService | Authorisation + orchestration layer for REST: filters by AuthInfo, calls repository and mapper. | list(AuthInfo, unreadOnly), markRead(AuthInfo,id,flag) | NotificationRepository, NotificationMapper |
| CurrentUserService | Supplies AuthInfo (userId, providerOpsCode, roles) to the REST layer. | authInfo() | Spring Security context |