Skip to main content

Notification Architecture Overview

Summary

The Notification Service is a self-contained .NET 8 Minimal API bounded context organized into six code areas — API, Application, Channels, Domain, Infrastructure and Messaging — with a Seed helper. It is Transitional: the extracted service and its event consumer are present and wired, while production channel providers, dead-letter enablement, in-service access enforcement and automated test coverage beyond a smoke script are not verified.

Implemented architecture

The consumer receives an event, opens a DI scope and hands the parsed envelope to NotificationDispatcher. The dispatcher orchestrates resolution, preference evaluation, rendering, message creation and delivery, writing every step to an append-only audit trail. Channel senders perform the actual delivery; the API surface exposes the inbox, template management, delivery diagnostics and test hooks.

Dependency boundaries

The service references only the shared-kernel and contracts projects. Domain holds POCO entities and constant classes with no EF Core or ASP.NET Core dependency. Application depends on Domain and Infrastructure and uses NotificationDbContext directly (there is no repository layer). Channels implement the IChannelSender abstraction defined in Application. Messaging hosts the consumer and envelope.

Technical maturity

The dispatch, delivery and retry paths, template resolution, preference evaluation and the audit trail are implemented and exercised by the smoke script. Authentication/authorization, dead-letter routing, real SMS/WhatsApp providers, metrics export and broad automated coverage remain Foundation, Partial or Not implemented.

Limitations

There is no separate engine process, worker, dispatcher daemon, retry scheduler, outbox relay or plug-in processor. Orchestration and retry are in-process within a single consumed-event handling scope.

Requires Confirmation

Deployment topology, production ingress, broker cluster and dead-letter enablement, scaling model and the canonical implementation versus the legacy monolith path require confirmation.

Source References

  • microservices/src/notification-service/Program.cs
  • microservices/src/notification-service/Application/NotificationDispatcher.cs
  • microservices/src/notification-service/Messaging/NotificationEventConsumer.cs
  • microservices/src/notification-service/Infrastructure/NotificationDbContext.cs

See Also

Keywords

Notification architecture, event-driven, Minimal API, microservice, technical foundation.

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-21
  • Next review: 2026-10-21