From 0ed0479baa30da5bd3702421ad6d9dc4cfaf0727 Mon Sep 17 00:00:00 2001 From: peterhnm Date: Tue, 24 Oct 2023 23:00:25 +0200 Subject: [PATCH] docs: add component diagram --- .../docs/architecture.puml | 76 +++++++++++++++++++ .../src/application/portsIn.ts | 1 + 2 files changed, 77 insertions(+) create mode 100644 apps/miranum-config-editor/docs/architecture.puml diff --git a/apps/miranum-config-editor/docs/architecture.puml b/apps/miranum-config-editor/docs/architecture.puml new file mode 100644 index 00000000..5beb82d6 --- /dev/null +++ b/apps/miranum-config-editor/docs/architecture.puml @@ -0,0 +1,76 @@ +@startuml +'https://plantuml.com/component-diagram + +skinparam component { + backgroundColor<> LightGray + backgroundColor<> LightGreen + backgroundColor<> LightBlue + backgroundColor<> LightYellow +} + +component extension.ts <> { + component CustomTextEditor +} +component "IoC-Container" <> + +component "WebviewAdapter" as InWebviewAdapter <> +component "DocumentAdapter" as InDocumentAdapter <> + +component { + portin InitWebviewInPort + portin RestoreWebviewInPort + portin ReadVsCodeConfigInPort + portin ReadJsonFormInPort + portin SyncWebviewInPort + portin SyncDocumentInPort + + portout DocumentOutPort + portout WebviewOutPort + portout ReaderOutPort + portout VsCodeConfigOutPort + + component InitWebviewUseCase <> + component RestoreWebviewUseCase <> + component ReadVsCodeConfigUseCase <> + component ReadJsonFormUseCase <> + component SyncWebviewUseCase <> + component SyncDocumentUseCase <> +} + +component "WebviewAdapter" as OutWebviewAdapter <> +component "DocumentAdapter" as OutDocumentAdapter <> +component "ReaderAdapter" as OutReaderAdapter <> +component "VsCodeConfigAdapter" as OutVsCodeConfigAdapter <> + +CustomTextEditor --> InWebviewAdapter : create +CustomTextEditor --> InDocumentAdapter : create +CustomTextEditor --> OutWebviewAdapter : set active webview +CustomTextEditor --> OutDocumentAdapter : set active document + +InWebviewAdapter --> InitWebviewInPort +InWebviewAdapter --> RestoreWebviewInPort +InWebviewAdapter --> ReadVsCodeConfigInPort +InWebviewAdapter --> ReadJsonFormInPort +InWebviewAdapter --> SyncDocumentInPort +InDocumentAdapter --> SyncWebviewInPort + +InitWebviewInPort <.. InitWebviewUseCase +RestoreWebviewInPort <.. RestoreWebviewUseCase +ReadVsCodeConfigInPort <.. ReadVsCodeConfigUseCase +ReadJsonFormInPort <.. ReadJsonFormUseCase +SyncWebviewInPort <.. SyncWebviewUseCase +SyncDocumentInPort <.. SyncDocumentUseCase + +InitWebviewUseCase --> WebviewOutPort +RestoreWebviewUseCase --> WebviewOutPort +ReadVsCodeConfigUseCase --> VsCodeConfigOutPort +ReadJsonFormUseCase --> ReaderOutPort +SyncWebviewUseCase --> WebviewOutPort +SyncDocumentUseCase --> DocumentOutPort + +WebviewOutPort <.. OutWebviewAdapter +VsCodeConfigOutPort <.. OutVsCodeConfigAdapter +ReaderOutPort <.. OutReaderAdapter +DocumentOutPort <.. OutDocumentAdapter + +@enduml diff --git a/apps/miranum-config-editor/src/application/portsIn.ts b/apps/miranum-config-editor/src/application/portsIn.ts index 1bf26a39..a86d512b 100644 --- a/apps/miranum-config-editor/src/application/portsIn.ts +++ b/apps/miranum-config-editor/src/application/portsIn.ts @@ -7,6 +7,7 @@ * - {@link SyncDocumentInPort} * - {@link ReadVsCodeConfigInPort} * - {@link ReadJsonFormInPort} + * - {@link RestoreWebviewInPort} */ /**