Files
familienarchiv/docs/architecture/c4/l3-backend-3b-document-management.puml
Marcel e8fb8150b7 docs(c4): document timeline density widget across backend+frontend (#385)
- l3-backend-3b: extend DocumentController description to include the
  per-month density aggregation endpoint.
- l3-frontend-3b: add /documents/+page.ts (client-side gated loader) and
  TimelineDensityFilter component, plus relationships to the density
  endpoint and the search dashboard.

Per Markus' follow-up §5: both diagrams are mandatory before merge.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 22:17:29 +02:00

3.3 KiB

Component Diagram: API Backend — Document Management & ImportComponent Diagram: API Backend — Document Management & ImportAPI Backend (Spring Boot)[system]«component»DocumentController[Spring MVC â€”/api/documents] CRUD for documents:search, get by ID, updatemetadata, upload/downloadfile, conversation thread,batch metadata updates,and per-month densityaggregation for the timelinefilter widget.«component»AdminController[Spring MVC â€” /api/admin] Triggers asynchronousExcel/ODS mass import(requires ADMINpermission). Reports importstate(IDLE/RUNNING/DONE/FAILED).«component»DocumentService[Spring Service] Core document businesslogic: store, update, search.Resolves persons and tags,delegates file I/O toFileService, builds dynamicJPA Specifications, andintegrates with auditlogging.«component»FileService[Spring Service] Wraps AWS SDK v2S3Client. Uploads files withUUID-keyed paths,computes SHA-256 hash,downloads withcontent-type detection, andgenerates presigned URLsfor OCR access.«component»MassImportService[Spring Service â€” @Async] Reads Excel/ODS files from/import mount. Tracksimport state(IDLE/RUNNING/DONE/FAILED)and delegates toExcelService. Returnsimmediately; processingruns asynchronously.«component»ExcelService[Spring Service] Parses Excel/ODSworkbooks (Apache POI).Column indices configurablevia application.properties.Creates/updates documentrecords per row.«component»MinioConfig[Spring @Configuration] Creates the S3Client andS3Presigner beans withpath-style access for MinIO.Validates MinIO connectivityon startup.«component»DocumentRepository[Spring Data JPA] Queries documents withSpecification-baseddynamic search,bidirectional conversationthread queries, full-textsearch with ranking andmatch highlighting, andtranscription pipeline queueprojections.«component»DocumentSpecifications[JPA Criteria API] Factory for composablepredicates: hasText(full-text), hasSender,hasReceiver, isBetween(date range), hasTags(subquery AND/OR logic).«container»Web Frontend[SvelteKit]«container»PostgreSQL[PostgreSQL 16]«container»Object Storage[MinIO (S3-compatible)]«component»PersonService[Spring Service] See diagram 3e. Called byDocumentService to resolvesender / receiver personsby ID.«component»TagService[Spring Service] See diagram 3d. Called byDocumentService to find orcreate tags by name.Document requests[HTTP / JSON]Trigger import[HTTP / JSON]Delegates toTriggersUpload / downloadfilesReads / writesdocumentsBuilds searchpredicatesResolves sender /receiversFinds or creates tagsParses Excel/ODS fileCreates / updatesdocumentsProvides S3Client andS3Presigner beansPUT / GET / presignedURL objects[S3 API / HTTP]SQL queries[JDBC]