From 9ad172084afa38fe64a24a508510cb3e4db0438a Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 6 May 2026 11:25:14 +0200 Subject: [PATCH] =?UTF-8?q?docs(c4):=20fix=203d=20OCR=20=E2=80=94=20route?= =?UTF-8?q?=20transcription/annotation=20through=20domain=20services?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OcrAsyncRunner injects TranscriptionService and AnnotationService; it only accesses the DB directly for OcrJob state (OcrJobRepository). The previous Rel arrow incorrectly showed direct JDBC access for transcription blocks and annotations, contradicting the component description. Co-Authored-By: Claude Sonnet 4.6 --- docs/architecture/c4-diagrams.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/architecture/c4-diagrams.md b/docs/architecture/c4-diagrams.md index 1980b6e6..5e502d30 100644 --- a/docs/architecture/c4-diagrams.md +++ b/docs/architecture/c4-diagrams.md @@ -277,6 +277,9 @@ C4Component Component(ocrTraining, "OcrTrainingService", "Spring Service", "Orchestrates model training: exports training data as ZIP, calls Python /train or /segtrain, persists training metrics in OcrTrainingRunRepository.") } + Component(transcriptionSvc, "TranscriptionService", "Spring Service", "See diagram 3b.2. Called by OcrAsyncRunner to persist transcription blocks per page.") + Component(annotationSvc, "AnnotationService", "Spring Service", "See diagram 3b.2. Called by OcrAsyncRunner to persist OCR-generated annotation regions per page.") + Rel(frontend, ocrCtrl, "OCR trigger, status, and progress requests", "HTTP / JSON / SSE") Rel(ocrCtrl, ocrSvc, "Single-document jobs", "") Rel(ocrCtrl, ocrBatch, "Batch jobs", "") @@ -286,7 +289,9 @@ C4Component Rel(ocrAsync, ocrClient, "Streams OCR results page by page", "HTTP / NDJSON") Rel(ocrTraining, ocrClient, "Sends training data ZIP", "HTTP / multipart") Rel(ocrClient, ocrPy, "POST /ocr/stream, /train, /segtrain, /train-sender", "HTTP / REST") - Rel(ocrAsync, db, "Reads / writes job state, transcription blocks, annotations", "JDBC") + Rel(ocrAsync, transcriptionSvc, "Saves transcription blocks per page", "") + Rel(ocrAsync, annotationSvc, "Saves annotation regions per page", "") + Rel(ocrAsync, db, "Reads / writes OCR job state", "JDBC") Rel(ocrAsync, minio, "Generates presigned URLs for PDF fetch", "S3 API") Rel(ocrPy, minio, "Fetches PDF via presigned URL", "HTTP / S3 presigned") Rel(ocrTraining, db, "Persists training run metrics", "JDBC")