This repository contains the identinet plantuml styles.
- Install plantuml
- Use URL reference (slower build times):
@startuml
!define identinet https://raw.githubusercontent.com/identinet/plantuml-styles
!include identinet/styles.puml
...
@enduml
- Use git submodules (faster build times, but git submodules):
- Clone this repository into your current directory
git clone [email protected]:identinet/plantuml-styles.git styles
- or as a submodule in a git repository
git submodule add https://github.com/identinet/plantuml-styles.git styles
- Install submodules:
git submodule update --init --recursive
- Clone this repository into your current directory
- Integrate with your IDE
- See plantuml documentation for more information on the syntax
- Create a plantuml diagram and include the styles
@startuml figures/simple-diagram
!include styles.puml
title "Simple Diagram"
participant "A" as a
participant "B" as b
a -> b: Says hello
b -> a: 😄
@enduml
Plantuml ships with a stnardard library that can be used.
- See C4-PlantUML documentation
- See C4 software architecture model
- Create a plantuml diagram and include the respective diagram styles
@startuml figures/architecture
!include styles.puml
title "Context Diagram"
!include c4/C4_Context.puml
!include sprites/icons/font-awesome/server.puml
!include sprites/icons/font-awesome/user.puml
!include sprites/icons/font-awesome/user_o.puml
!include sprites/icons/font-awesome/building.puml
!include sprites/icons/font-awesome/cogs.puml
Person(admin, "Administrator", "Administrator of the did:web server", $sprite="user_o")
Person(user, "User", "did:web identity holder", $sprite="user")
System_Ext(wallet, "User's wallet", "Universal Identity Wallet", $sprite="cogs")
System(system, "web-id Server", "web-id Server server did:web identities", $sprite="server")
System_Ext(thirdpartysystem, "DID Resolver", "Universal DID Resolver", $sprite="server")
Rel(user, wallet, "manages", "")
Rel(wallet, system, "manages personal DID", "")
Rel(admin, system, "creates and removes DIDs", "")
Rel(thirdpartysystem, system, "resolves DIDs", "")
SHOW_LEGEND()
@enduml
@startuml figures/container
!include styles.puml
title "Container Diagram"
!include c4/C4_Container.puml
Person(admin, "Administrator")
System_Boundary(c1, "Sample System") {
Container(web_app, "Web Application", "C#, ASP.NET Core 2.1 MVC", "Allows users to compare multiple Twitter timelines")
}
System(twitter, "Twitter")
Rel(admin, web_app, "Uses", "HTTPS")
Rel(web_app, twitter, "Gets tweets from", "HTTPS")
SHOW_LEGEND()
@enduml
@startuml figures/component
!include styles.puml
title "Component Diagram"
!include c4/C4_Component.puml
Component(c1, "Component")
ComponentDb(db1, "Database")
Rel(c1, db1, "Uses", "MySQL")
SHOW_LEGEND()
@enduml
For icons, see plantuml-icon-font-sprites.
@startuml figures/icons
!include ./sprites/icons/devicons/git.puml
!include ./sprites/icons/devicons/sass.puml
!include ./sprites/icons/font-awesome/user.puml
!include ./sprites/icons/font-awesome/star.puml
listsprites
@enduml