diff --git a/docs/architecture/c4/l3-backend-3g-supporting.puml b/docs/architecture/c4/l3-backend-3g-supporting.puml index c1558c89..ea08f206 100644 --- a/docs/architecture/c4/l3-backend-3g-supporting.puml +++ b/docs/architecture/c4/l3-backend-3g-supporting.puml @@ -16,8 +16,8 @@ System_Boundary(backend, "API Backend (Spring Boot)") { 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.") Component(sseRegistry, "SseEmitterRegistry", "Spring Component", "In-memory ConcurrentHashMap of Spring SseEmitter instances per user. Handles registration, deregistration, and JSON event broadcasts.") - Component(geschCtrl, "GeschichteController", "Spring MVC — /api/geschichten", "CRUD for publishable stories that link persons and documents. Requires BLOG_WRITE permission for write operations.") - Component(geschSvc, "GeschichteService", "Spring Service", "Manages story lifecycle (DRAFT → PUBLISHED with timestamp). Sanitizes HTML body with an allowlist policy.") + Component(geschCtrl, "GeschichteController", "Spring MVC — /api/geschichten", "CRUD for publishable stories (STORY) and reading journeys (JOURNEY). Returns GeschichteSummary projections for list; full Geschichte with JourneyItems for detail. Requires BLOG_WRITE permission for write operations.") + Component(geschSvc, "GeschichteService", "Spring Service", "Manages story lifecycle (DRAFT → PUBLISHED with timestamp). Supports two subtypes: STORY (prose) and JOURNEY (ordered JourneyItem sequence). Sanitizes HTML body with an allowlist policy.") Component(exHandler, "GlobalExceptionHandler", "Spring @RestControllerAdvice", "Converts DomainException, validation errors, and generic exceptions to ErrorResponse JSON with machine-readable ErrorCode and HTTP status.") } diff --git a/docs/architecture/db/db-orm.puml b/docs/architecture/db/db-orm.puml index 48578048..4f71c08a 100644 --- a/docs/architecture/db/db-orm.puml +++ b/docs/architecture/db/db-orm.puml @@ -1,6 +1,6 @@ @startuml db-orm -' Schema source: Flyway V1–V69 (excl. V37, V43 — intentionally removed) -' Schema as of: V69 (2026-05-27) +' Schema source: Flyway V1–V72 (excl. V37, V43 — intentionally removed) +' Schema as of: V72 (2026-06-08) ' ⚠ This is a versioned snapshot. Update when the schema changes significantly. hide circle @@ -359,6 +359,7 @@ package "Supporting" { title : VARCHAR(255) NOT NULL body : TEXT status : VARCHAR(32) NOT NULL + type : VARCHAR(32) NOT NULL author_id : UUID <> created_at : TIMESTAMP NOT NULL updated_at : TIMESTAMP NOT NULL @@ -370,9 +371,13 @@ package "Supporting" { person_id : UUID <> } - entity geschichten_documents { + entity journey_items { + id : UUID <> + -- geschichte_id : UUID <> document_id : UUID <> + position : INTEGER NOT NULL + note : TEXT } } @@ -436,7 +441,7 @@ audit_log }o--o| documents : document_id geschichten }o--o| app_users : author_id geschichten_persons }o--|| geschichten : geschichte_id geschichten_persons }o--|| persons : person_id -geschichten_documents }o--|| geschichten : geschichte_id -geschichten_documents }o--|| documents : document_id +journey_items }o--|| geschichten : geschichte_id (ON DELETE CASCADE) +journey_items }o--o| documents : document_id (ON DELETE SET NULL) @enduml diff --git a/frontend/messages/de.json b/frontend/messages/de.json index 32f6e464..da8b0672 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -1037,6 +1037,7 @@ "geschichten_published_on": "veröffentlicht am {date}", "geschichten_persons_section": "Personen in dieser Geschichte", "geschichten_documents_section": "Erwähnte Dokumente", + "geschichten_document_link_placeholder": "Dokument öffnen", "geschichten_card_heading": "Geschichten", "geschichten_card_write_action": "+ Geschichte schreiben", "geschichten_card_attach_action": "+ Geschichte anhängen", diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 435860e1..ab47f6f9 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -1037,6 +1037,7 @@ "geschichten_published_on": "published on {date}", "geschichten_persons_section": "People in this story", "geschichten_documents_section": "Referenced documents", + "geschichten_document_link_placeholder": "Open document", "geschichten_card_heading": "Stories", "geschichten_card_write_action": "+ Write a story", "geschichten_card_attach_action": "+ Attach a story", diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 88e2affb..abe21231 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -1037,6 +1037,7 @@ "geschichten_published_on": "publicada el {date}", "geschichten_persons_section": "Personas en esta historia", "geschichten_documents_section": "Documentos mencionados", + "geschichten_document_link_placeholder": "Abrir documento", "geschichten_card_heading": "Historias", "geschichten_card_write_action": "+ Escribir historia", "geschichten_card_attach_action": "+ Adjuntar historia", diff --git a/frontend/src/routes/geschichten/[id]/+page.svelte b/frontend/src/routes/geschichten/[id]/+page.svelte index d3028fae..fdf07036 100644 --- a/frontend/src/routes/geschichten/[id]/+page.svelte +++ b/frontend/src/routes/geschichten/[id]/+page.svelte @@ -109,7 +109,7 @@ async function handleDelete() { href="/documents/{item.documentId}" class="block rounded border border-line bg-surface px-4 py-3 font-serif text-base text-ink hover:bg-muted" > - {item.note ?? item.documentId} + {item.note ?? m.geschichten_document_link_placeholder()} {/each}