<!-- Derived Markdown alternate of diagramming.md; canonical repository sources and registered evidence retain authority. -->


# Diagram tool assessment

**Decision, 21 October 2026: use draw.io for the deployment architecture.** The owner selected this approach after reviewing the first D2 diagram. Keep the editable source and exported SVG together in Git. The [architecture diagram](https://nhs-smartcard-printing-wiki.pages.dev/architecture/index.md#deployment-architecture) shows the service, network, workstation and USB dependencies.

This choice concerns presentation and maintenance. It does not establish NHS support for any smartcard component.

## Open-source alternatives

| Tool | Licence and primary source | Fit for this wiki | Trade-off |
|---|---|---|---|
| **draw.io — selected** | [Editor source, Apache-2.0](https://github.com/jgraph/drawio); [SVG export](https://www.drawio.com/docs/manual/export/export-to-svg/) | Native editable shapes, deliberate placement, and an SVG that also retains the diagram XML. | XML changes are less compact than text diagrams. The desktop exporter must be installed when the drawing changes. |
| **D2** | [D2 source, MPL-2.0](https://github.com/d2lang/d2); [ELK integration](https://d2lang.com/tour/elk/) | Compact text and automatic connector routing. Used for the first published view. | Precise presentation changes can require more layout tuning than direct editing. |
| **C4-PlantUML** | [C4 library, MIT](https://github.com/plantuml-stdlib/C4-PlantUML); [PlantUML engine licences](https://plantuml.com/faq) | Suitable for a larger architecture model with related context, container and deployment views. | More notation and toolchain setup than this one view needs; library and engine licences differ. |
| **Excalidraw** | [Editor source, MIT](https://github.com/excalidraw/excalidraw); [official MCP](https://github.com/excalidraw/excalidraw-mcp) | Useful for collaborative sketches and early architecture discussion. | Its sketch presentation is less suited to this wiki's formal reference view. |

These fit assessments are project judgements. The linked projects establish the features and licences, not a universal ranking.

## Skill, exporter and MCP

The [official draw.io Codex skill](https://github.com/jgraph/drawio-mcp/tree/main/plugins/codex/drawio) supports local file authoring and desktop export. This wiki uses **draw.io Desktop 32.5.5** to export the diagram. An MCP connection is not required for that workflow. See the [official Desktop release](https://github.com/jgraph/drawio-desktop/releases/tag/v32.5.5).

The [official draw.io MCP project](https://github.com/jgraph/drawio-mcp) also provides an interactive MCP app and a browser-opening tool server. Neither is a runtime dependency of this wiki. Readers receive a static SVG from the wiki itself.

The drawing uses basic shapes, native SVG text and system fonts. It includes no remote icons, embedded fonts or external rendering service. Existing Mermaid diagrams remain in use for short process flows.

## Reading and maintaining the drawing

Download the [editable draw.io source](https://nhs-smartcard-printing-wiki.pages.dev/assets/diagrams/issuance-architecture.drawio) and open it in draw.io. The [published SVG](https://nhs-smartcard-printing-wiki.pages.dev/assets/diagrams/issuance-architecture.svg) also contains editable diagram XML. Both files are retained in Git. The image fills the available article width and scales down on smaller screens. Open the full-size SVG for closer inspection; nearby prose provides the same information.

Change the evidence and diagram source first, then export and inspect the result at desktop, tablet and mobile widths. Verification checks that the SVG matches the source hash and qualified exporter version. The local export procedure is recorded in the repository README.

Do not add undocumented protocols or internal NHS services to make the drawing more detailed. Check the [source register](https://nhs-smartcard-printing-wiki.pages.dev/sources/index.md), [evidence matrix](https://nhs-smartcard-printing-wiki.pages.dev/evidence-matrix/index.md) and [acceptance checklist](https://nhs-smartcard-printing-wiki.pages.dev/acceptance/index.md).
