{"id":234,"date":"2024-05-28T18:04:00","date_gmt":"2024-05-28T18:04:00","guid":{"rendered":"https:\/\/permutationcity.co.uk\/bp\/?p=234"},"modified":"2024-05-28T20:25:40","modified_gmt":"2024-05-28T20:25:40","slug":"mermaid-diagrams","status":"publish","type":"post","link":"https:\/\/permutationcity.co.uk\/bp\/2024\/05\/28\/mermaid-diagrams\/","title":{"rendered":"Mermaid diagrams"},"content":{"rendered":"\n<p>Famously an picture is worth a thousand words. That may or may not be true but a diagram can definitely help explain something. There&#8217;s plenty of software and online tools to help with this but, in my experience, making a diagram can still take a lot of time. It&#8217;s good to do but if you could do it faster your more likely to make one.<\/p>\n\n\n\n<p><a href=\"https:\/\/mermaid.js.org\/\">Mermaid<\/a> is a diagramming tool that also supports scripts. It can be integrated into markdown and is available on <a href=\"https:\/\/github.blog\/2022-02-14-include-diagrams-markdown-files-mermaid\/\">github<\/a> so you can see the diagrams in your documentation directly. Handily for me there is also a WordPress block, <a href=\"https:\/\/wordpress.com\/plugins\/merpress\">MerPress<\/a>. I also like the idea of generating these automatically in, say, as part of documentation.<\/p>\n\n\n\n<p>Different chart types can have different syntax depending on the needs of the chart.\nThat&#8217;s useful but it looks like it leads to some inconsistencies.\nHere are a bunch of examples but there&#8217;s even more on the Mermaid site.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"boxes-and-lines\">Boxes and lines<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"graphs\">Graphs<\/h3>\n\n\n\n<p>Lets start with something basic: nodes, edges, arrows and labels:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\ngraph LR;\n\nA[Facing North]---&gt;B\nA--&gt;C\nB(Turn right)---&gt;F[Facing East]\nC(Turn left)--&gt;D\nD(Turn left)--&gt;E\nE(Turn left)--&gt;F\n```<\/pre><\/div>\n\n\n\n<p>becomes:<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">graph LR;\n\nA[Facing North]--->B\nA-->C\nB(Turn right)--->F[Facing East]\nC(Turn left)-->D\nD(Turn left)-->E\nE(Turn left)-->F<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"flowchart\">Flowchart<\/h3>\n\n\n\n<p>Lets make it slightly more complicated:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\nflowchart LR\n\nA[Facing North]--&gt;B\nB{Waste time}--&gt;|No| C\nB--&gt;|Yes| D\nC(Turn right)---&gt;G[Facing East]\nD(Turn left)--&gt;E\nE(Turn left)--&gt;F\nF(Turn left)--&gt;G\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">flowchart LR\n\nA[Facing North]-->B\nB{Waste time}-->|No| C\nB-->|Yes| D\nC(Turn right)--->G[Facing East]\nD(Turn left)-->E\nE(Turn left)-->F\nF(Turn left)-->G<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"state-diagram\">State diagram<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\nstateDiagram-v2\n\ndirection LR\n[*] --&gt; North\nNorth --&gt; East : Right\nNorth --&gt; West : Left\nWest --&gt; South : Left\nSouth --&gt; East : Left\nEast --&gt; [*]\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">stateDiagram-v2\n\ndirection LR\n[*] --> North\nNorth --> East : Right\nNorth --> West : Left\nWest --> South : Left\nSouth --> East : Left\nEast --> [*]<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"mathematical\">Mathematical<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"pie-charts\">Pie charts<\/h3>\n\n\n\n<p>These could be useful although they may be limited compared to a chart specific WordPress plugin.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\npie\n\ntitle Household pet ownership in UK\n&quot;Dogs&quot; : 31\n&quot;Cats&quot; : 26\n&quot;Rabbits&quot; : 2.8\n&quot;Birds&quot; : 2.3\n&quot;Hamsters&quot; : 2.1\n&quot;Guinea pigs&quot; : 1.8\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">pie\n\ntitle Household pet ownership in UK\n\"Dogs\" : 31\n\"Cats\" : 26\n\"Rabbits\" : 2.8\n\"Birds\" : 2.3\n\"Hamsters\" : 2.1\n\"Guinea pigs\" : 1.8<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"bar-chart\">Bar chart<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\nxychart-beta\n\ntitle &quot;Historic pet ownership in UK&quot;\nx-axis [2011-12, 2012-13, 2013-14, 2014-15, 2015-16, 2016-17, 2017-18, 2018-19, 2019-20]\ny-axis &quot;Percentage pet ownership&quot; 0 --&gt; 100\nbar [47, 48, 47, 46, 40, 44, 45, 40, 41]\nline [47, 48, 47, 46, 40, 44, 45, 40, 41]\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">xychart-beta\n\ntitle \"Historic pet ownership in UK\"\nx-axis [2011-12, 2012-13, 2013-14, 2014-15, 2015-16, 2016-17, 2017-18, 2018-19, 2019-20]\ny-axis \"Percentage pet ownership\" 0 --> 100\nbar [47, 48, 47, 46, 40, 44, 45, 40, 41]\nline [47, 48, 47, 46, 40, 44, 45, 40, 41]<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"quadrant-chart\">Quadrant chart<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\nquadrantChart\n\ntitle Which pet to get?\nx-axis Less work --&gt; More work\ny-axis Less cute --&gt; More cute\nquadrant-1 Maybe\nquadrant-2 Yes\nquadrant-3 Maybe\nquadrant-4 No\nToad: [0.45, 0.23]\nDog: [0.57, 0.69]\nSnake: [0.78, 0.34]\nFrog: [0.40, 0.34]\nCat: [0.35, 0.78]\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">quadrantChart\n\ntitle Which pet to get?\nx-axis Less work --> More work\ny-axis Less cute --> More cute\nquadrant-1 Maybe\nquadrant-2 Yes\nquadrant-3 Maybe\nquadrant-4 No\nToad: [0.45, 0.23]\nDog: [0.57, 0.69]\nSnake: [0.78, 0.34]\nFrog: [0.40, 0.34]\nCat: [0.35, 0.78]<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"time-based-diagram\">Time based diagram<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sequence-diagram\">Sequence diagram<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\nsequenceDiagram\n\nUser-&gt;&gt;Browser: Enters login credentials\nBrowser-&gt;&gt;WebServer: Sends login request\nWebServer-&gt;&gt;Database: Verifies credentials\nalt Credentials valid\n    Database--&gt;&gt;WebServer: Returns user data\n    WebServer--&gt;&gt;Browser: Sends authentication token\n    Browser--&gt;&gt;User: Displays successful login\nelse Credentials invalid\n    Database--&gt;&gt;WebServer: Returns error\n    WebServer--&gt;&gt;Browser: Sends authentication failure\n    Browser--&gt;&gt;User: Displays error message\nend\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n\nUser->>Browser: Enters login credentials\nBrowser->>WebServer: Sends login request\nWebServer->>Database: Verifies credentials\nalt Credentials valid\n    Database-->>WebServer: Returns user data\n    WebServer-->>Browser: Sends authentication token\n    Browser-->>User: Displays successful login\nelse Credentials invalid\n    Database-->>WebServer: Returns error\n    WebServer-->>Browser: Sends authentication failure\n    Browser-->>User: Displays error message\nend<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"gantt-chart\">Gantt chart<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\ngantt\n\ntitle Website Redesign Project\ndateFormat  YYYY-MM-DD\nsection Planning\nRequirements Gathering     :a1, 2024-06-01, 5d\nProject Plan               :a2, after a1, 3d\nsection Design\nWireframe Design           :b1, 2024-06-07, 4d\nPrototype Design           :b2, after b1, 5d\nsection Development\nFrontend Development       :c1, 2024-06-16, 7d\nBackend Development        :c2, after c1, 7d\nsection Testing\nTesting and Fixes          :d1, 2024-06-30, 5d\nsection Deployment\nDeployment                 :e1, 2024-07-06, 2d\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">gantt\n\ntitle Website Redesign Project\ndateFormat  YYYY-MM-DD\nsection Planning\nRequirements Gathering     :a1, 2024-06-01, 5d\nProject Plan               :a2, after a1, 3d\nsection Design\nWireframe Design           :b1, 2024-06-07, 4d\nPrototype Design           :b2, after b1, 5d\nsection Development\nFrontend Development       :c1, 2024-06-16, 7d\nBackend Development        :c2, after c1, 7d\nsection Testing\nTesting and Fixes          :d1, 2024-06-30, 5d\nsection Deployment\nDeployment                 :e1, 2024-07-06, 2d<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Timeline<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\ntimeline\n\n2002 : LinkedIn\n2004 : Facebook\n     : Google\n2005 : Youtube\n2006 : Twitter\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">timeline\n\n2002 : LinkedIn\n2004 : Facebook\n     : Google\n2005 : Youtube\n2006 : Twitter<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"git-graph\">Git graph<\/h2>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\ngitGraph\n\ncommit id: &quot;Initial commit&quot;\ncommit id: &quot;Added basic structure&quot;\nbranch develop\ncheckout develop\ncommit id: &quot;Implemented feature&quot;\ncommit id: &quot;Fixed bug in feature&quot;\ncheckout main\nmerge develop\ncommit id: &quot;Refactored codebase&quot;\ncommit id: &quot;Released v2.0.0&quot;\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">gitGraph\n\ncommit id: \"Initial commit\"\ncommit id: \"Added basic structure\"\nbranch develop\ncheckout develop\ncommit id: \"Implemented feature\"\ncommit id: \"Fixed bug in feature\"\ncheckout main\nmerge develop\ncommit id: \"Refactored codebase\"\ncommit id: \"Released v2.0.0\"<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"relationship-diagram\">Relationship diagram<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"class-diagram\">Class diagram<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\nclassDiagram\n\ndirection LR\nclass Car {\n    - make: string\n    - model: string\n    - year: int\n    + accelerate(): void\n    + brake(): void\n}\nclass Person {\n    - name: string\n    - age: int\n    + walk(): void\n    + talk(message: string): void\n}\nclass Engine {\n    - cylinders: int\n    - horsepower: int\n    + start(): void\n    + stop(): void\n}\nCar &quot;1&quot; -- &quot;1&quot; Engine : has\nPerson &lt;-- Car : drives\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">classDiagram\n\ndirection LR\nclass Car {\n    - make: string\n    - model: string\n    - year: int\n    + accelerate(): void\n    + brake(): void\n}\nclass Person {\n    - name: string\n    - age: int\n    + walk(): void\n    + talk(message: string): void\n}\nclass Engine {\n    - cylinders: int\n    - horsepower: int\n    + start(): void\n    + stop(): void\n}\nCar \"1\" -- \"1\" Engine : has\nPerson &lt;-- Car : drives<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"entity-relationship-diagram\">Entity-relationship diagram<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\nerDiagram\n\nCUSTOMER }|..|{ DELIVERY-ADDRESS : has\nCUSTOMER ||--o{ ORDER : places\nCUSTOMER ||--o{ INVOICE : &quot;liable for&quot;\nDELIVERY-ADDRESS ||--o{ ORDER : receives\nINVOICE ||--|{ ORDER : covers\nORDER ||--|{ ORDER-ITEM : includes\nPRODUCT-CATEGORY ||--|{ PRODUCT : contains\nPRODUCT ||--o{ ORDER-ITEM : &quot;ordered in&quot;\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">erDiagram\n\nCUSTOMER }|..|{ DELIVERY-ADDRESS : has\nCUSTOMER ||--o{ ORDER : places\nCUSTOMER ||--o{ INVOICE : \"liable for\"\nDELIVERY-ADDRESS ||--o{ ORDER : receives\nINVOICE ||--|{ ORDER : covers\nORDER ||--|{ ORDER-ITEM : includes\nPRODUCT-CATEGORY ||--|{ PRODUCT : contains\nPRODUCT ||--o{ ORDER-ITEM : \"ordered in\"<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"mindmap\">Mindmap<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-c++src&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C++&quot;,&quot;language&quot;:&quot;C++&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;cpp&quot;}\">```mermaid\nmindmap\n  Overview\n    Project Goals\n      Improve User Interface\n      Enhance Performance\n    Timeline\n      Q1 2024\n      Q2 2024\n    Development\n      Frontend\n        UI Design\n        Client-side Logic\n      Backend\n        Server Setup\n        Database Integration\n    Testing\n      Unit Testing\n      Integration Testing\n    Deployment\n      Server Deployment\n      Database Migration\n```<\/pre><\/div>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">mindmap\n  Overview\n    Project Goals\n      Improve User Interface\n      Enhance Performance\n    Timeline\n      Q1 2024\n      Q2 2024\n    Development\n      Frontend\n        UI Design\n        Client-side Logic\n      Backend\n        Server Setup\n        Database Integration\n    Testing\n      Unit Testing\n      Integration Testing\n    Deployment\n      Server Deployment\n      Database Migration<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"in-the-end\">In the end<\/h2>\n\n\n\n<p>I haven&#8217;t had a chance to use this in anger. It definitely has a few rough edges. There are some visual glitches and more consistency across types would be nice. However this was really quick which makes it easier to throw something in. It&#8217;s definitely got some possibilities and I&#8217;ll try to use it in the blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Famously an picture is worth a thousand words. That may or may not be true but a diagram can definitely help explain something. There&#8217;s plenty of software and online tools to help with this but, in my experience, making a diagram can still take a lot of time. It&#8217;s good to do but if you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[6,28,18],"class_list":["post-234","post","type-post","status-publish","format-standard","hentry","category-general","tag-blogging","tag-documentation","tag-tools"],"_links":{"self":[{"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/posts\/234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/comments?post=234"}],"version-history":[{"count":4,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/posts\/234\/revisions"}],"predecessor-version":[{"id":239,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/posts\/234\/revisions\/239"}],"wp:attachment":[{"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/media?parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/categories?post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/permutationcity.co.uk\/bp\/wp-json\/wp\/v2\/tags?post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}