@startuml architecture
' !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons
!define FONTAWESOME https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/font-awesome-5

!include FONTAWESOME/users.puml

skinparam Linetype ortho

HIDE_STEREOTYPE()

' AddElementTag("CodeGen V2", $bgColor="#4b8235", $borderColor="#8bb37b")

AddElementTag("CodeGenPart", $bgColor="#4b8235", $borderColor="#8bb37b")
AddElementTag("FetureCodeGenPart", $borderColor="#4b8235", $fontColor="#4b8235", $bgColor="#ffffff")

AddElementTag("Repo", $bgColor="#4764a8", $borderColor="#798ab0")
' AddElementTag("Repo", $bgColor=$SYSTEM_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR)
AddElementTag("FetureRepo", $borderColor="#798ab0", $fontColor="#4764a8", $bgColor="#ffffff")

AddElementTag("AazRepo", $bgColor="#2c858a", $borderColor="#7bb0b3")

AddElementTag("Boundary", $bgColor="#f0f0f0")


Person(developer, "CLI Developer")

Boundary(api, "API Specs") {
    SystemDb(swagger, "Swagger 2.0", "Repo", "", "Repo", $tags="Repo")
    SystemDb(other_specs, "Other Source", "Repo", "", "Repo", $tags="FetureRepo")
}

Lay_D(swagger, other_specs)


Boundary(aazdev, "AAZ Dev Tool") {
    Boundary(models, "Command Models") {
        SystemDb(aaz, "AAZ", "Repo", "", "Repo", $tags="AazRepo")
    }
    Boundary(generator, "Code Generators") {
        Container(cli_generator, "CLI Generator", "", "", $tags="CodeGenPart")
        Container(cli_extension_generator, "CLI Extension Generator", "", "", $tags="CodeGenPart")
        Boundary(other_generator, "Other Code Generator", "", "", $tags="FetureCodeGenPart")
    }
    Boundary(editor, "Model Editors", "", "") {
        Container(workspace, "Workspace\nEditor", "", "", $tags="CodeGenPart")
    }
    Boundary(translator, "API Translators", "", "") {
        Container(swagger_translator, " Swagger 2.0\nTranslator", "", "", $tags="CodeGenPart")
        Boundary(other_translator, "Other Source\nTranslator", "", "", $tags="FetureCodeGenPart")
    }
}


Lay_D(developer, generator)

Lay_R(api, aazdev)

Lay_R(translator, editor)

Lay_R(editor, generator)

Lay_D(editor, models)
' Lay_R(aaz, cli_generator)

Lay_D(swagger_translator, other_translator)

Lay_D(cli_generator, cli_extension_generator)

Lay_D(cli_extension_generator, other_generator)


Boundary(cli, "CLI Commands") {
    SystemDb(azure_cli, "Azure CLI", "Repo", "", "Repo", $tags="Repo")
    SystemDb(azure_cli_extension, "Azure CLI\nExtension", "Repo", "", "Repo", $tags="Repo")
    SystemDb(other_repo, "Other Code", "Repo", $tags="FetureRepo")
}

Lay_R(aazdev, cli)

Lay_D(azure_cli, azure_cli_extension)

Lay_D(azure_cli_extension, other_repo)

swagger -[#Green,thickness=2]l-> swagger_translator

swagger_translator -[#Green,thickness=2]l-> workspace

workspace -[#Green,thickness=2]d-> aaz
workspace <-[#Green,thickness=2]d- aaz

aaz -[#Green,thickness=2]l-> cli_generator
aaz -[#Green,thickness=2]l-> cli_extension_generator

cli_generator <-[#Green,thickness=2]l-> azure_cli

cli_extension_generator <-[#Green,thickness=2]l-> azure_cli_extension

developer -[#DarkGreen,thickness=2]d-+ editor
developer -[#DarkGreen,thickness=2]d-+ generator

other_specs .[#Green]l.> other_translator
other_translator .[#Green]u.> workspace

aaz .[#Green]d.> other_generator
other_generator <.[#Green]l.> other_repo

@enduml
