Files
familienarchiv/docs/architecture/c4/l3-backend-3c-transcription.puml

3.3 KiB

Component Diagram: API Backend — Document Transcription PipelineComponent Diagram: API Backend — Document Transcription PipelineAPI Backend (Spring Boot)[system]«component»TranscriptionBlockController[Spring MVC â€”/api/transcription] CRUD for transcription textblocks per document page.Manages sort order, reviewstatus, and block versionhistory.«component»AnnotationController[Spring MVC â€”/api/documents/{id}/annotations] CRUD for free-form pageannotations with polygoncoordinates, colour coding,and file-hash tracking.«component»CommentController[Spring MVC â€”/api/documents/{id}/comments] Threaded comment CRUDon transcription blocks with@mention support andnotification triggers.«component»TranscriptionService[Spring Service] Creates and updatestranscription blocks fromannotation regions. Tracksblock versions, sanitizestext with an HTML allow-list,and triggers mentions.«component»TranscriptionQueueService[Spring Service] Assembles segmentation,transcription, and reviewqueue projections bydelegating toDocumentService andAuditLogQueryService.«component»AnnotationService[Spring Service] Manages document pageannotations with polygoncoordinates. Called byOcrAsyncRunner to persistOCR-generated blockboundaries.«component»CommentService[Spring Service] Creates and managesthreaded comments with@mention parsing. TriggersNotificationService forREPLY and MENTIONevents.«component»TranscriptionBlockRepository[Spring Data JPA] Reads and writesTranscriptionBlock andTranscriptionBlockVersionrecords.«component»AnnotationRepository[Spring Data JPA] Reads and writesDocumentAnnotationrecords.«component»CommentRepository[Spring Data JPA] Reads and writesDocumentCommentrecords.«container»Web Frontend[SvelteKit]«container»PostgreSQL[PostgreSQL 16]«component»DocumentService[Spring Service] See diagram 3b. Called byTranscriptionQueueServiceto assemble pipeline queueprojections.«component»AuditLogQueryService[Spring Service] See diagram 3g. Called byTranscriptionQueueServicefor pipeline activity data.Transcription blockrequests[HTTP / JSON]Annotation requests[HTTP / JSON]Comment requests[HTTP / JSON]Delegates toQueries pipelinequeuesDelegates toDelegates toReads / writes blocksand versionsReads / writesannotationsReads / writescommentsQueries pipelinedocument stateQueries pipelineactivity dataSQL queries[JDBC]SQL queries[JDBC]SQL queries[JDBC]