Skip to content

Instantly share code, notes, and snippets.

@namuan
Last active August 30, 2018 16:28
Show Gist options
  • Save namuan/53c2befe713493300df7f7e5916a2f56 to your computer and use it in GitHub Desktop.
Save namuan/53c2befe713493300df7f7e5916a2f56 to your computer and use it in GitHub Desktop.
[PlantUML sample syntax] #plantuml

https://real-world-plantuml.com/?type=component

https://github.com/htssouza/plantuml_with_gravizo

https://github.com/dafesimonek/dart-platform-diagrams

More in plantuml-box

@startuml

package "Some Group" {
  HTTP - [First Component]
  [Another Component]
}

node "Other Groups" {
  FTP - [Second Component]
  [First Component] --> FTP
}

cloud {
  [Example 1]
}


database "MySql" {
  folder "This is my folder" {
    [Folder 3]
  }
  frame "Foo" {
    [Frame 4]
  }
}

[Another Component] --> [Example 1]
[Example 1] --> [Folder 3]
[Folder 3] --> [Frame 4]

@enduml
@startuml

scale max 600 width

title Network Example

cloud "Amazon Web Services" as AWS {
  component "Route 53 DNS"
}

cloud "Anywhere" {
  component "User Machine"
}

cloud "Corporate Data Center" as DC {
  component "Server A"
  component "Master DB"
  component "Server B"
  component "Replica DB"
}
' links
[User Machine] -up-> [Route 53 DNS]
[User Machine] --> [Server A]
[User Machine] --> [Server B]
[Server A] --> [Master DB]
[Server B] --> [Master DB]
[Master DB] --> [Replica DB]

@enduml
@startuml

title Your title goes here

actor "User"

User -> Foo : userAction()
Foo -> Foo : internalAction()
Foo -> Bar : externalAction()

@enduml
@startuml
scale max 1000 width
actor "Admin"
actor "Timer"

group Synchronous Process
  "Admin" -> "Web UI" : postProcessRequest()
  "Web UI" -> "API": storeProcessRequest()
  "API" -> "DB": insert()
end

group Asynchronous Process
  "Timer" -> "API": batchProcess()
  "API" -> "API": listPendingRequests()
  "API" -> "DB": select()

  loop Item Processing
    "API" -> "API": process()
  end
end

@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment