Skip to content

Commit

Permalink
added building block view
Browse files Browse the repository at this point in the history
  • Loading branch information
lwluc committed Jun 28, 2024
1 parent 7ff1bf3 commit 4e1b8f8
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions assets/architecture/clean_architecture_building_blocks.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
@startuml

cloud " " as cloud.in {
component " " as cloud.in.component <<Client>>
}

cloud " " as cloud.out {
component " " as cloud.out.component <<System>> {
portout " " as cloud.out.port
}
}

package "App" {
package "Business Module" {
package "adapter" {
package "in" as adapter.in #lightgray {
component " " as adapter.in.component <<Adapter>>
component " " as adapter.in.dto <<DTO>>
component " " as adapter.in.mapper <<Mapper>>
port " " as adapter.in.port
adapter.in.mapper .L.> adapter.in.dto
adapter.in.component .> adapter.in.mapper
adapter.in.component --|> adapter.in.port
adapter.in.port --> adapter.in.dto
}

package "out" as adapter.out #lightgray {
component " " as adapter.out.component <<Adapter>>
component " " as adapter.out.dto <<DTO>>
component " " as adapter.out.mapper <<Mapper>>
adapter.out.mapper -> adapter.out.dto
adapter.out.component .> adapter.out.mapper
}
}

package "domain" #LightBlue {
component " " as domain.model <<Model>>
component " " as domain.service <<Service>>
domain.service .> domain.model
}

package "usecase" #LightBlue {
' TODO: Add Interactor?

package "in" as usecase.in #white {
interface " " as usecase.in.component <<Usecase>>
}
package "out" as usecase.out #white {
interface " " as usecase.out.component <<Usecase>>
}
}

adapter.in.mapper --> domain.model
adapter.in.component ..> usecase.in.component

domain.service --|> usecase.in.component
domain.service ..> usecase.out.component

adapter.out.component --|> usecase.out.component
adapter.out.mapper ..> domain.model
}

package "Business Module <secondary>" {
package "usecase <secondary>" {
package "in" as usecase.in.secondary {
interface " " as usecase.in.secondary.component <<Usecase>>
}
}
package "domain <secondary>" {
component " " as domain.secondary.service <<Service>>
}

domain.secondary.service -L-|> usecase.in.secondary.component
}

adapter.out.component ..> usecase.in.secondary.component
}

cloud.in.component .D.> adapter.in.port
cloud.out.port <.D. adapter.out.component
cloud.out.port .D.> adapter.out.dto

@enduml
9 changes: 9 additions & 0 deletions src/carbonataplate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

App to export prometheus data, calculate CO2 costs and push it to Camunda Optimize [Variable Ingestion API](https://docs.camunda.io/optimize/apis-tools/optimize-api/external-variable-ingestion/).

## 🏗Architecture

#### Building Block View

The [building block view](https://docs.arc42.org/section-5/) image below shows a stereotypical static decomposition of a system using Clean Architecture into building blocks as well as their dependencies.

![Clean-Architecture-Building-Block-View](../../assets/architecture/clean_architecture_building_blocks.png)
*Building Block View of clean architecture*

## Configuration

Configure the application using [application.yml](./src/main/resources/application.yml).

0 comments on commit 4e1b8f8

Please sign in to comment.