docs(c4): add L3 frontend 3c/3d and sequence diagrams
This commit is contained in:
32
docs/architecture/c4/seq-document-upload.puml
Normal file
32
docs/architecture/c4/seq-document-upload.puml
Normal 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
|
||||
Reference in New Issue
Block a user