diff --git a/docs/architecture/c4-diagrams.md b/docs/architecture/c4-diagrams.md index 4645083c..a2f6f7db 100644 --- a/docs/architecture/c4-diagrams.md +++ b/docs/architecture/c4-diagrams.md @@ -319,7 +319,7 @@ C4Component Component(dashCtrl, "DashboardController", "Spring MVC — /api/dashboard", "REST endpoints for the user dashboard: recent document resume (/resume), weekly transcription pulse stats (/pulse), and activity feed (/activity) with kind filtering and pagination.") Component(statsCtrl, "StatsController", "Spring MVC — /api/stats", "Returns aggregate counts (total persons, total documents) for the UI stats bar.") Component(statsSvc, "StatsService", "Spring Service", "Queries aggregate counts: total persons and total documents.") - Component(dashSvc, "DashboardService", "Spring Service", "Assembles the user dashboard: recent document resume, weekly transcription pulse stats, and activity feed with contributor avatars.") + Component(dashSvc, "DashboardService", "Spring Service", "Assembles the user dashboard: recent document resume (calls DocumentService + TranscriptionService), weekly transcription pulse stats, and activity feed with contributor avatars.") Component(notifCtrl, "NotificationController", "Spring MVC — /api/notifications", "REST and SSE endpoints for notification stream, history with filtering, read/unread state, and per-user preference management.") Component(notifSvc, "NotificationService", "Spring Service", "Creates REPLY and MENTION notifications, optionally sends email, marks as read, and pushes events to connected clients via SseEmitterRegistry.") @@ -331,6 +331,9 @@ C4Component Component(exHandler, "GlobalExceptionHandler", "Spring @RestControllerAdvice", "Converts DomainException, validation errors, and generic exceptions to ErrorResponse JSON with machine-readable ErrorCode and HTTP status.") } + Component(documentSvc, "DocumentService", "Spring Service", "See diagram 3b. Called by DashboardService to fetch document titles and resume data.") + Component(transcriptionSvc, "TranscriptionService", "Spring Service", "See diagram 3b.2. Called by DashboardService to fetch transcription block progress for resume.") + Rel(frontend, dashCtrl, "Dashboard requests", "HTTP / JSON") Rel(frontend, statsCtrl, "GET /api/stats", "HTTP / JSON") Rel(frontend, notifCtrl, "Notification stream and history", "HTTP / JSON / SSE") @@ -339,6 +342,8 @@ C4Component Rel(statsCtrl, statsSvc, "Delegates to", "") Rel(statsSvc, db, "Reads aggregate counts", "JDBC") Rel(dashSvc, auditQuery, "Fetches activity feed and pulse stats", "") + Rel(dashSvc, documentSvc, "Fetches document titles and resume data", "") + Rel(dashSvc, transcriptionSvc, "Fetches transcription block progress for resume", "") Rel(notifCtrl, notifSvc, "Delegates to", "") Rel(notifCtrl, sseRegistry, "Registers client SSE connection", "") Rel(notifSvc, sseRegistry, "Broadcasts events to connected clients", "")