All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 5m28s
CI / OCR Service Tests (pull_request) Successful in 26s
CI / Backend Unit Tests (pull_request) Successful in 6m25s
CI / fail2ban Regex (pull_request) Successful in 48s
CI / Semgrep Security Scan (pull_request) Successful in 25s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m10s
SDD Gate / RTM Check (pull_request) Successful in 18s
SDD Gate / Contract Validate (pull_request) Successful in 28s
SDD Gate / Constitution Impact (pull_request) Successful in 17s
Route tables (CLAUDE.md + frontend/CLAUDE.md), the document/timeline.ts -> $lib/shared/utils/monthBuckets move (document + shared READMEs), GLOSSARY Lebensweg entry, the c4 l3-frontend people-stories diagram, and the RTM rows REQ-001..027 for feature zeitstrahl-global-view (#779), all marked Done. Refs #779 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
38 lines
2.3 KiB
Markdown
38 lines
2.3 KiB
Markdown
# document (frontend)
|
|
|
|
UI for the archive's core concept: viewing, uploading, editing, searching, bulk-selecting, and transcribing documents.
|
|
|
|
## What this domain owns
|
|
|
|
Components: `DocumentRow`, `DocumentThumbnail`, `DocumentTopBar`, `DocumentViewer`, `DocumentMetadataDrawer`, `DocumentEditLayout`, `DocumentStatusChip`, `UploadZone`, `BulkSelectionBar`, `BulkDropZone`.
|
|
Utilities: `search.ts` (search-param helpers), `filename.ts` (filename formatting), `documentStatusLabel.ts` (i18n label mapping), `validateFile.ts` (upload validation), `groupDocuments.ts` (list grouping).
|
|
Sub-folders: `annotation/`, `transcription/`, `viewer/`.
|
|
|
|
## What this domain does NOT own
|
|
|
|
- Person typeahead — `person/PersonTypeahead.svelte` (cross-domain import, allowed by ESLint rule)
|
|
- Tag input — `tag/TagInput.svelte` (cross-domain import, allowed)
|
|
- Shared discussion — `shared/discussion/` (comment/mention editor)
|
|
|
|
## Key components
|
|
|
|
| Component | Route used in | Notes |
|
|
| --------------------------- | ---------------------------------- | ------------------------------------ |
|
|
| `DocumentRow.svelte` | `/` (search results), admin queues | Compact document card with thumbnail |
|
|
| `DocumentViewer.svelte` | `/documents/[id]` | PDF/image inline viewer |
|
|
| `DocumentEditLayout.svelte` | `/documents/[id]/edit` | Full edit form with sticky save bar |
|
|
| `UploadZone.svelte` | `/documents/new`, bulk upload | Drag-and-drop file drop area |
|
|
| `BulkSelectionBar.svelte` | `/documents` bulk mode | Multi-select action bar |
|
|
|
|
## Cross-domain imports
|
|
|
|
- `person/PersonTypeahead.svelte` — sender / receiver selection
|
|
- `tag/TagInput.svelte` — tag chip input
|
|
- `ocr/OcrProgress.svelte` — job status indicator in the document header
|
|
- `shared/primitives/BackButton.svelte`, `shared/discussion/` — shared UI
|
|
- `shared/utils/monthBuckets.ts` — the density chart's pure month-bucket math (boundaries, gap-fill, year aggregation, axis ticks) now lives in `shared/` so the `timeline/` domain can reuse it; `document/timeline.ts` keeps only the `/api/documents/density` glue (`fetchDensity`, `buildDensityUrl`)
|
|
|
|
## Backend counterpart
|
|
|
|
`backend/src/main/java/org/raddatz/familienarchiv/document/README.md`
|