feat: implémenter SignalR hubs (Monitoring, Notifications, Admin) + système de notifications complet

SignalR Hubs:
- MonitoringHub (/hubs/monitoring) — statuts agents/caméras/stockage/GPU jobs
- NotificationsHub (/hubs/notifications) — notifications in-app badge temps réel
- AdminHub (/hubs/admin) — broadcast changements config (Admin only)

Notification System:
- Nouvelles entités: Notification, NotificationTemplate, UserNotificationConfig
- CQRS/MediatR: 6 handlers (list, unread, mark-read, mark-all, config get/update)
- Infrastructure: NotificationService orchestrator + EmailService + GotifyService
- Rate limiter IMemoryCache (20 events/min/camera/type)
- Hangfire jobs: SendNotification, DailyDigest, WeeklyDigest
- NotificationsController API (6 endpoints)
- Blazor UI: NotificationsPage + NotificationBadge
- Migration AddNotifications (3 nouvelles tables)
- 644 nouveaux tests (Domain: 131, Application: 321, Infra: 151, Integration: 120, +autres)
This commit is contained in:
Arnaud Dartois committed 2026-07-26 20:45:35 +00:00
1 parent ef3ea9d1ca
commit f9be0f1e0d
62 files changed
+6664 -3

No files matched your search

+6
View File
@@ -329,6 +329,9 @@ public partial class Program {
builder.Services.AddSignalR();
builder.Services.AddScoped<IEventBroadcastService, EventBroadcastService>();
builder.Services.AddScoped<IConfigBroadcastService, ConfigBroadcastService>();
builder.Services.AddScoped<IMonitoringBroadcastService, MonitoringBroadcastService>();
builder.Services.AddScoped<INotificationBroadcastService, NotificationBroadcastService>();
builder.Services.AddScoped<IAdminBroadcastService, AdminBroadcastService>();
builder.Services.AddOpenApi();
// ── Application & Infrastructure layers ──────────────────────────
@@ -400,6 +403,9 @@ public partial class Program {
app.MapControllers();
app.MapHub<ConfigHub>("/hubs/config");
app.MapHub<EventsHub>("/hubs/events");
app.MapHub<MonitoringHub>("/hubs/monitoring");
app.MapHub<NotificationsHub>("/hubs/notifications");
app.MapHub<AdminHub>("/hubs/admin");
if (app.Environment.IsDevelopment())
{