Component diagram (PlantUML)

What makes this a component diagram rather than a box diagram is the interfaces: what each component offers, and what it needs.


#What this example shows

  • Provided interfaces drawn as lollipops.

  • Packages grouping related components.

  • External systems drawn outside the boundary.


#A worked example

Open it, edit it, or copy the source below.

Component diagram (PlantUML)

The source, which you can paste into a new diagram and edit:

@startuml
package "Order platform" {
  [Order API] as API
  [Pricing engine] as PRICE
  [Inventory service] as INV
  [Fulfilment worker] as WORK
}

database "Orders DB" as DB
queue "Job queue" as Q
cloud "Payment provider" as PAY

interface "REST /orders" as REST
interface "gRPC price" as GPRICE
interface "REST /stock" as RSTOCK

REST - API
GPRICE - PRICE
RSTOCK - INV

API --> GPRICE : quote
API --> RSTOCK : reserve
API --> DB
API --> Q : enqueue
Q --> WORK
WORK --> DB
API --> PAY : authorise
@enduml

#Making it your own

  • Use interface plus a dash to attach a lollipop to a component.

  • database, queue and cloud are shapes worth using; they carry meaning at a glance.

  • Keep deployment out of it. That belongs on a deployment diagram.



Verbose, stable, and it draws almost everything.