@startuml
!include <c4/C4_Container.puml>
AddElementTag("smart-contract", $bgColor=#0abab5)

Person(user, "User", "User with or without credentials")

System_Boundary(c1, "FrostFS") {
    Container(s3, "S3 Gateway", $descr="AWS S3 compatible gate")
    Container(stor, "FrostFS Storage", $descr="Storage service")
}

System_Boundary(c3, "Blockchain") {
    Interface "NeoGo"
    Container(ffsid, "FrostFS ID", $tags="smart-contract", $descr="Stores namespaces and users")
    Container(policy, "Policy", $tags="smart-contract", $descr="Stores APE rules")
}

Rel_R(user, s3, "Requests", "HTTP")
Rel_R(s3, stor, "Get data to validate request, store objects")
Rel_D(s3, NeoGo, "Get data to validate request")
Rel("NeoGo",  ffsid, "Fetch users")
Rel("NeoGo",  policy, "Fetch policies")

SHOW_LEGEND(true)
@enduml