Notification Project Structure
Summary
The Notification Service is a single ASP.NET Core project. Its folders map cleanly to responsibilities: API surface, application orchestration, delivery channels, domain model, persistence, messaging and template seeding.
Folder layout
Responsibilities
| Folder / file | Responsibility (verified) |
|---|---|
Program.cs | Composition root: DI, migration/seed, endpoint mapping |
Api/NotificationEndpoints.cs | Minimal API inbox, template, admin, diagnostics and test endpoints |
Application/Abstractions.cs | Interfaces and records (INotificationDispatcher, ITemplateEngine, IPreferenceEvaluator, IChannelSender, IChannelSenderRegistry, intents, results) |
Application/NotificationDispatcher.cs | End-to-end event orchestration |
Application/EventNotificationResolver.cs | Event-to-intent mapping per supported event type |
Application/TemplateEngine.cs | Template resolution and {{Variable}} substitution |
Application/PreferenceEvaluator.cs | Opt-out preference evaluation |
Application/RetryPolicy.cs | Bounded exponential-backoff schedule |
Application/NotificationOptions.cs | Bound configuration model |
Application/NotificationTelemetry.cs | Dispatch ActivitySource |
Channels/ | IChannelSender implementations and the ChannelSenderRegistry |
Domain/NotificationEntities.cs | Entities and constant classes (channels, statuses, stages) |
Infrastructure/NotificationDbContext.cs | EF Core mapping and design-time factory |
Infrastructure/Migrations/ | InitialNotificationSchema migration and snapshot |
Messaging/ | Event consumer and envelope record |
Seed/DefaultTemplateSeeder.cs | Built-in global template inventory |
Project references
The .csproj references only shared-kernel and contracts, and packages for ASP.NET Core OpenAPI, EF Core, Npgsql, RabbitMQ.Client and Swashbuckle.
Requires Confirmation
Whether additional projects (for example, a dedicated test project) belong to the same solution requires confirmation; none reference this service in the reviewed source.
Source References
microservices/src/notification-service/notification-service.csprojmicroservices/src/notification-service/Api/NotificationEndpoints.csmicroservices/src/notification-service/Domain/NotificationEntities.csmicroservices/src/notification-service/Infrastructure/NotificationDbContext.cs
Related Articles
See Also
Keywords
Project structure, folders, solution layout, responsibilities.
Revision Information
- Status: Draft
- Last reviewed: 2026-07-21
- Next review: 2026-10-21