feat: implement real-time dashboard updates via WebSockets

This commit is contained in:
syntaxbullet
2026-01-08 21:01:33 +01:00
parent fff90804c0
commit 1251df286e
7 changed files with 267 additions and 73 deletions

16
shared/lib/events.ts Normal file
View File

@@ -0,0 +1,16 @@
import { EventEmitter } from "node:events";
/**
* Global system event bus for cross-module communication.
* Used primarily for real-time dashboard updates.
*/
class SystemEventEmitter extends EventEmitter { }
export const systemEvents = new SystemEventEmitter();
export const EVENTS = {
DASHBOARD: {
STATS_UPDATE: "dashboard:stats_update",
NEW_EVENT: "dashboard:new_event",
}
} as const;