Files
familienarchiv/docs/architecture/c4/l3-backend-3g-supporting.puml
Marcel 2c5f7ac12d
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 2m50s
CI / OCR Service Tests (pull_request) Successful in 23s
CI / Backend Unit Tests (pull_request) Successful in 3m45s
CI / fail2ban Regex (pull_request) Successful in 48s
CI / Semgrep Security Scan (pull_request) Successful in 23s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m4s
fix(review): address PR #787 review blockers — db-orm diagram, C4 diagram, UUID link text
- db-orm.puml: replace geschichten_documents with journey_items, add type column to geschichten, bump schema version to V72
- l3-backend-3g-supporting.puml: update GeschichteController and GeschichteService descriptions to mention STORY/JOURNEY subtypes and JourneyItem
- geschichten/[id]/+page.svelte: replace raw UUID fallback with m.geschichten_document_link_placeholder() i18n key
- messages/{de,en,es}.json: add geschichten_document_link_placeholder translation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 12:54:12 +02:00

4.1 KiB

Component Diagram: API Backend — Supporting DomainsComponent Diagram: API Backend — Supporting DomainsAPI Backend (Spring Boot)[system]«component»AuditService[Spring Service â€” @Async] Writes audit log entriesasynchronously via adedicated TaskExecutor,with transaction-awarelogging to preventdeadlocks on concurrentsaves.«component»AuditLogQueryService[Spring Service] Queries audit logs foractivity feeds, pulse stats,recent contributors, andper-document history.Facade overAuditLogRepository.«component»DashboardController[Spring MVC â€” /api/dashboard] REST endpoints for the userdashboard: recentdocument resume(/resume), weeklytranscription pulse stats(/pulse), and activity feed(/activity) with kind filteringand pagination.«component»StatsController[Spring MVC â€” /api/stats] Returns aggregate counts(total persons, totaldocuments) for the UI statsbar.«component»StatsService[Spring Service] Queries aggregate counts:total persons and totaldocuments.«component»DashboardService[Spring Service] Assembles the userdashboard: recentdocument resume (callsDocumentService +TranscriptionService),weekly transcription pulsestats, and activity feed withcontributor avatars.«component»NotificationController[Spring MVC â€”/api/notifications] REST and SSE endpoints fornotification stream, historywith filtering, read/unreadstate, and per-userpreference management.«component»NotificationService[Spring Service] Creates REPLY andMENTION notifications,optionally sends email,marks as read, and pushesevents to connected clientsvia SseEmitterRegistry.«component»SseEmitterRegistry[Spring Component] In-memoryConcurrentHashMap ofSpring SseEmitter instancesper user. Handlesregistration, deregistration,and JSON event broadcasts.«component»GeschichteController[Spring MVC â€”/api/geschichten] CRUD for publishablestories (STORY) and readingjourneys (JOURNEY).ReturnsGeschichteSummaryprojections for list; fullGeschichte withJourneyItems for detail.Requires BLOG_WRITEpermission for writeoperations.«component»GeschichteService[Spring Service] Manages story lifecycle(DRAFT â†’ PUBLISHED withtimestamp). Supports twosubtypes: STORY (prose)and JOURNEY (orderedJourneyItem sequence).Sanitizes HTML body withan allowlist policy.«component»GlobalExceptionHandler[Spring @RestControllerAdvice] Converts DomainException,validation errors, andgeneric exceptions toErrorResponse JSON withmachine-readableErrorCode and HTTP status.«container»Web Frontend[SvelteKit]«container»PostgreSQL[PostgreSQL 16]«component»DocumentService[Spring Service] See diagram 3b. Called byDashboardService to fetchdocument titles and resumedata.«component»TranscriptionService[Spring Service] See diagram 3c. Called byDashboardService to fetchtranscription block progressfor resume.Dashboard requests[HTTP / JSON]GET /api/stats[HTTP / JSON]Notification streamand history[HTTP / JSON / SSE]Story requests[HTTP / JSON]Delegates toDelegates toReads aggregatecounts[JDBC]Fetches activity feedand pulse statsFetches documenttitles and resumedataFetches transcriptionblock progress forresumeDelegates toRegisters client SSEconnectionBroadcasts events toconnected clientsDelegates toWrites audit_log[JDBC]Reads audit_log[JDBC]Reads / writesnotifications[JDBC]Reads / writesgeschichten[JDBC]