Aiursoft.AlertCenter.SDK
10.0.0
See the version list below for details.
dotnet add package Aiursoft.AlertCenter.SDK --version 10.0.0
NuGet\Install-Package Aiursoft.AlertCenter.SDK -Version 10.0.0
<PackageReference Include="Aiursoft.AlertCenter.SDK" Version="10.0.0" />
<PackageVersion Include="Aiursoft.AlertCenter.SDK" Version="10.0.0" />
<PackageReference Include="Aiursoft.AlertCenter.SDK" />
paket add Aiursoft.AlertCenter.SDK --version 10.0.0
#r "nuget: Aiursoft.AlertCenter.SDK, 10.0.0"
#:package Aiursoft.AlertCenter.SDK@10.0.0
#addin nuget:?package=Aiursoft.AlertCenter.SDK&version=10.0.0
#tool nuget:?package=Aiursoft.AlertCenter.SDK&version=10.0.0
AlertCenter
AlertCenter is a self-hosted alert management and notification platform built on ASP.NET Core (.NET 10). Business systems report alerts through one HTTP API; teams manage incidents, on-call schedules, and delivery through Webhook, email, and in-app notifications.
On an empty database, the default local account is admin@default.com with password Admin@123456!. Change the password before exposing the application.
What is AlertCenter?
- Independent API keys, idempotent reporting, and five severity levels (
sev0throughsev4). - Incident correlation, acknowledgement, ownership, mitigation, resolution, and Markdown discussions.
- On-call teams, reusable scheduling rules, and an interactive schedule editor with overlap and rest validation.
- Severity-based notification routing, personal inboxes, and delivery history.
- Application access grants for users and roles, with separate permissions for application, on-call, and push management.
- SQLite for standalone use, MySQL support, and local or OIDC authentication through Aiursoft Template.
Run manually
Install the .NET 10 SDK and Node.js/npm.
Prepare the frontend assets:
npm ci --prefix src/Aiursoft.AlertCenter/wwwroot npm run build --prefix src/Aiursoft.AlertCenter/wwwrootStart the application:
dotnet run --project src/Aiursoft.AlertCenterOpen the URL printed by the application.
The defaults use SQLite and local accounts. Configure authentication, database, and storage through appsettings.json or environment variables.
Run in Microsoft Visual Studio
- Prepare the frontend assets as described above.
- Open
Aiursoft.AlertCenter.slnand run theAiursoft.AlertCenterproject withF5.
Run in Docker
image=aiursoft/alertcenter
appName=alertcenter
sudo docker pull $image
sudo docker run -d --name $appName --restart unless-stopped -p 5000:5000 -v /var/www/$appName:/data $image
Open http://localhost:5000. Keep /data persistent for configuration, the SQLite database, uploaded files, and Data Protection keys.
| Properties | Value |
|---|---|
| Image | aiursoft/alertcenter |
| Ports | 5000 |
| Binary path | /app |
| Data path | /data |
| Config path | /data/appsettings.json |
The image copies its default configuration to /data/appsettings.json on first start and retains that file on subsequent starts. Environment variables use double underscores, such as ConnectionStrings__DefaultConnection or AppSettings__OIDC__ClientSecret.
Reporting alerts
Open Applications to create an application and save its API key. The key is shown only on creation or reset; resetting it immediately invalidates the old key. The built-in Integration Guide at /Alerts/GettingStarted provides examples for the current server.
Send an alert using POST /api/v1/messages:
curl -i 'http://localhost:5000/api/v1/messages' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{
"reportId": "0c561d22-5b71-4a4f-9c13-c824e273a8aa",
"incidentKey": "payment-provider-timeout",
"title": "Order payment timed out",
"content": "The downstream provider did not respond within 5 seconds.",
"level": "sev1",
"occurredAtUtc": "2026-10-16T12:00:00Z",
"context": {"orderId": "ORDER-1001", "traceId": "demo-trace"}
}'
Use your server's HTTPS URL for remote reporting and keep API keys outside source control. Reuse a reportId only when retrying the same report. A new report returns 201 Created; a duplicate returns 202 Accepted with Code: 1 and Duplicate: true. Invalid credentials return 401; invalid fields return 400. Requests are limited to 64 KiB, titles and incident keys to 200 characters, and content to 4,000 characters.
The API uses AiurProtocol. Receipts contain Code, Message, ProtocolVersion, Id, ReportId, ReceivedAtUtc, IncidentId, Archived, and Duplicate. A new report uses Code: 2 (JobDone); a duplicate uses Code: 1 (NoActionTaken). Invalid credentials use Code: -1 (WrongKey); invalid input uses Code: -10 (InvalidInput) with an Items array describing errors. Oversized requests return HTTP 413 with the same invalid-input envelope.
.NET SDK
Install the .NET 10 reporting client:
dotnet add package Aiursoft.AlertCenter.SDK
Register it with your server's base URL and an application key from configuration:
using Aiursoft.AlertCenter.SDK;
using Aiursoft.AlertCenter.SDK.Models;
builder.Services.AddAlertCenterSdk(
"https://alertcenter.example.com",
builder.Configuration["AlertCenter:ApiKey"]!);
Inject AlertCenterApiClient and send a report:
public class PaymentAlerts(AlertCenterApiClient alerts)
{
public Task<ReportMessageResponse> ReportTimeoutAsync(Guid reportId, DateTimeOffset occurredAtUtc)
=> alerts.ReportAsync(new ReportMessageRequest
{
ReportId = reportId,
Title = "Order payment timed out",
Level = "sev1",
IncidentKey = "payment-provider-timeout",
OccurredAtUtc = occurredAtUtc
});
}
Generate and retain the report ID and occurrence time before the first attempt. The SDK sends once; after an uncertain network outcome, retry the same request with the same ID. Successful duplicates return the original receipt. Input errors throw AiurBadApiInputException; authentication and other protocol failures throw AiurUnexpectedServerResponseException (inspect its Response.Code). These types are in Aiursoft.AiurProtocol.Exceptions. Transport failures propagate to the caller. The SDK reports persistence and dispatch scheduling, not notification delivery success.
For rotating credentials, register your own scoped IAlertCenterApiKeyProvider; the client retrieves a key for each call. Keep the client on the server, never in a browser.
Reporting clients must rate-limit at the source. AlertCenter does not rate-limit ingestion. An incidentKey correlates reports; it does not replace caller-side rate limiting. Without a key, correlation uses the application, title, and severity. Acknowledged or mitigated incidents retain matching reports without creating new deliveries; resolving an incident allows the next matching report to create a new incident.
Permissions and on-call response
Platform capabilities use Permission claims. Roles collect permissions; the name Administrators does not grant privileges by itself.
CanManageApplicationspermits creating applications, managing their access grants, and managing all applications. Otherwise, per-application user or role grants provide view or manage access.CanManageOnCallpermits managing teams, scheduling rules, and schedules. Saved shifts determine the current on-call engineers (OCEs); a rule preview alone does not provide coverage.CanManagePushpermits managing channels and sensitive delivery configuration. A user's channel binding access and recipient membership are separate; binding a channel also requires application manage access.
The current OCEs, incident owner, and application managers may handle an incident. A view grant alone does not permit incident handling. Default identity initialization runs only when both users and roles are empty; restarting an existing installation does not restore revoked permissions or grant newly introduced permissions.
Applications may bind an on-call team. Each new, non-archived alert and explicit incident reopen queues built-in email to that team's current OCEs, independently of custom severity routes. Delivery recipients are snapshotted when queued. Missing coverage or invalid recipient configuration produces a visible delivery failure without rejecting the alert. There are no automatic email retries; inspect delivery records before manually retrying an SMTP failure.
Configuration
See the comments in appsettings.json for database, storage, authentication, and logging settings. Keep secrets in protected environment variables.
- OIDC: set
AppSettings__AuthProvider=OIDCand theAppSettings__OIDC__*values. Register the application's HTTPS/signin-oidccallback with your identity provider and assign the required application permissions. - Email: configure
Email__Host,Email__Port,Email__From, and, when required,Email__UserNameandEmail__Password. STARTTLS is enabled by default. Both custom channels and built-in on-call email use these settings. - Webhook: custom encrypted request headers require
Webhook__HeaderProtectionKey, a Base64-encoded 32-byte key generated withopenssl rand -base64 32. Preserve this key: losing or changing it makes saved custom headers unreadable. Without it, default headers and custom JSON body templates remain available.
Database migrations
The SQLite and MySQL migration baselines are intended for empty databases and replace earlier development migration history. Back up an older development database and plan its recreation before using this baseline; clearing only __EFMigrationsHistory while retaining old tables is not an upgrade path.
The application applies pending migrations at startup. Generate future migrations for both providers using the SQLite guide and MySQL guide.
How to contribute
Report bugs and suggestions through the issue tracker. Create a fork and a feature branch, then submit a merge request for review.
After preparing frontend assets, run the existing checks:
dotnet test tests/Aiursoft.AlertCenter.Tests.csproj
node --test tests/Frontend/*.test.cjs
./lint.sh
| Product | Versions 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. |
-
net10.0
- Aiursoft.AiurProtocol (>= 10.0.25)
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 |
|---|---|---|
| 10.10.5 | 128 | 11/16/2026 |
| 10.10.4 | 146 | 11/11/2026 |
| 10.10.3 | 94 | 11/11/2026 |
| 10.10.2 | 162 | 11/3/2026 |
| 10.10.1 | 134 | 10/26/2026 |
| 10.10.0 | 120 | 10/25/2026 |
| 10.9.0 | 151 | 10/20/2026 |
| 10.8.0 | 109 | 10/20/2026 |
| 10.7.2 | 108 | 10/20/2026 |
| 10.7.1 | 114 | 10/19/2026 |
| 10.7.0 | 128 | 10/19/2026 |
| 10.6.0 | 104 | 10/19/2026 |
| 10.5.0 | 103 | 10/19/2026 |
| 10.4.1 | 109 | 10/19/2026 |
| 10.4.0 | 109 | 10/19/2026 |
| 10.3.0 | 117 | 10/18/2026 |
| 10.2.0 | 112 | 10/17/2026 |
| 10.1.0 | 108 | 10/17/2026 |
| 10.0.0 | 108 | 10/17/2026 |