docs(legibility): add 18 per-domain README.md files (DOC-6)

Backend (9): document, person, tag, user, geschichte, notification,
ocr, audit, dashboard.
Frontend (8): document, person, tag, user, geschichte, notification,
ocr, shared.
OCR service (1): ocr-service/README.md.

Each README covers: what the domain owns, explicit non-ownership,
public surface (verified by grep against the codebase), internal
layout, and cross-domain dependencies.

Closes #400
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-05 23:11:49 +02:00
committed by marcel
parent a3c17750cd
commit a1b89670c0
18 changed files with 678 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
# notification (frontend)
Bell-icon dropdown and real-time SSE connection for in-app notifications.
## What this domain owns
Components: `NotificationBell.svelte`, `NotificationDropdown.svelte`.
Utilities: `notifications.svelte.ts` (Svelte 5 reactive store), `notifications.ts` (API helpers).
## What this domain does NOT own
- SSE infrastructure — the backend's `SseEmitterRegistry` manages the server-side emitter. The frontend establishes one `EventSource` connection per session. Connection management lives in `notifications.svelte.ts`.
- Notification content rendering — notification payloads contain a `contextUrl`; the frontend navigates there on click.
## Key design: SSE connection
The SSE path is **backend → browser directly** (not proxied through SvelteKit SSR). The `EventSource` connects to `/api/notifications/stream`. On receive, the reactive store updates the unread count and the bell dropdown in real time.
```
Backend SseEmitterRegistry → /api/notifications/stream → EventSource in browser
```
## Key components
| Component | Used in | Notes |
| ----------------------------- | ----------------------------- | --------------------------------------------------------- |
| `NotificationBell.svelte` | global nav (`+layout.svelte`) | Bell icon with unread badge; opens `NotificationDropdown` |
| `NotificationDropdown.svelte` | global nav | Scrollable list of recent notifications with mark-read |
## Cross-domain imports
- `shared/primitives/` — icon, button primitives only
## Backend counterpart
`backend/src/main/java/org/raddatz/familienarchiv/notification/README.md`