docs(c4): add L3 frontend 3c/3d and sequence diagrams

This commit is contained in:
Marcel
2026-05-06 21:35:58 +02:00
committed by marcel
parent c3d4762ca0
commit 62bef1d267
4 changed files with 117 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
@startuml
title Document Upload Flow
actor User
participant "Frontend (SvelteKit)" as Frontend
participant "Backend (Spring Boot)" as Backend
participant "PermissionAspect (AOP)" as Aspect
participant DocumentService as DocSvc
participant FileService as FileSvc
participant MinIO
participant PostgreSQL as DB
User -> Frontend: Submit edit form (file + metadata)
Frontend -> Backend: PUT /api/documents/{id}\nmultipart/form-data + Authorization header
Backend -> Aspect: @RequirePermission(WRITE_ALL) check
Aspect -> Aspect: Verify user has WRITE_ALL authority
Aspect --> Backend: Proceed
Backend -> DocSvc: updateDocument(id, dto, file)
DocSvc -> DocSvc: Resolve sender Person by ID
DocSvc -> DocSvc: Resolve/create Tags
DocSvc -> FileSvc: uploadFile(file, filename)
FileSvc -> FileSvc: Generate key: documents/{UUID}_{filename}
FileSvc -> MinIO: PutObject(bucket, key, stream)
MinIO --> FileSvc: Success
FileSvc --> DocSvc: S3 key
DocSvc -> DB: UPDATE documents SET file_path=?, status='UPLOADED', ...
DB --> DocSvc: OK
DocSvc --> Backend: Updated Document entity
Backend --> Frontend: 200 OK — Document JSON
Frontend --> User: Refreshed document view
@enduml