GM.Notifications 1.0.0

dotnet add package GM.Notifications --version 1.0.0
                    
NuGet\Install-Package GM.Notifications -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GM.Notifications" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GM.Notifications" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="GM.Notifications" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GM.Notifications --version 1.0.0
                    
#r "nuget: GM.Notifications, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GM.Notifications@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GM.Notifications&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=GM.Notifications&version=1.0.0
                    
Install as a Cake Tool

<p align="center"> <img src="https://raw.githubusercontent.com/gmetskhvarishvili/GM.Notifications/master/icon.png" alt="GM.Notifications" width="140" height="140" /> </p>

GM.Notifications

CI NuGet License: MIT

Multi-channel notifications for .NET. A single AddGMNotifications() call wires up Email, SMS, WhatsApp, Push, and Slack senders over a persisted, retrying notification model — so your app can enqueue a notification, let it be delivered with scheduling and retry semantics, and track its status. Targets .NET 10.

Packages

The eight packages version and release together (lockstep):

Package What it gives you
GM.Notifications Meta-package: AddGMNotifications(configuration) registers every channel at once.
GM.Notifications.Domain The NotificationBase aggregate (status / retry / scheduling) and per-channel entities.
GM.Notifications.Persistence EF Core entity configurations for the notification entities (PostgreSQL).
GM.Notifications.Email IEmailSenderService + AddEmailNotificationServices().
GM.Notifications.SMS ISmsSenderService + AddSmsNotificationServices().
GM.Notifications.WhatsApp IWhatsAppSenderService + AddWhatsAppNotificationServices().
GM.Notifications.Push IPushSenderService + AddPushNotificationServices().
GM.Notifications.Slack ISlackSenderService + AddSlackNotificationServices().
dotnet add package GM.Notifications

Quick start

Register every channel with one call — each channel binds its own configuration section:

using GM.Notifications;

builder.Services.AddGMNotifications(builder.Configuration);

Or add only the channels you need:

builder.Services
    .AddEmailNotificationServices(builder.Configuration)
    .AddSlackNotificationServices(builder.Configuration);

The notification model

Every notification derives from NotificationBase (a SoftDeletableEntity<Guid>), which owns the delivery lifecycle so a background worker can drive it:

var email = new EmailNotification(
    to: "user@example.com",
    subject: "Welcome",
    body: "<h1>Hi!</h1>",
    isHtml: true,
    maxRetries: 3,
    scheduledAtUtc: null);        // send as soon as possible

if (email.IsReadyToSend(DateTime.UtcNow))
{
    // ... hand off to IEmailSenderService ...
    email.MarkSent(DateTime.UtcNow);
}
  • SchedulingScheduledAtUtc holds a notification back until its time arrives.
  • RetryMarkFailed(reason, nowUtc) increments RetryCount and keeps the notification Pending until MaxRetries is reached, at which point it becomes Failed.
  • StatusPending → Sent | Failed | Cancelled, exposed via NotificationStatus.

Tune the worker/retry defaults through NotificationOptions (MaxRetries, WorkerIntervalSeconds, WorkerBatchSize).

Repository layout

GM.Notifications/              # meta-package + AddGMNotifications composition
GM.Notifications.Domain/       # NotificationBase + per-channel entities, enums, exceptions
GM.Notifications.Persistence/  # EF Core configurations (PostgreSQL)
GM.Notifications.Email/        # Email channel (service, options, DI)
GM.Notifications.SMS/          # SMS channel
GM.Notifications.WhatsApp/     # WhatsApp channel
GM.Notifications.Push/         # Push channel
GM.Notifications.Slack/        # Slack channel
tests/GM.Notifications.Tests/  # xUnit tests for the notification model

Building & testing

dotnet build -c Release
dotnet test  -c Release

Releasing

Versioning is automated from Conventional Commits — see CONTRIBUTING.md. All eight packages share one version (Directory.Build.props) and publish together to nuget.org on each release.

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 105 8/2/2026