The most common diagram in auth systems is the sequence diagram. This is the PlantUML sequence template for four major auth protocols (JWT, OAuth2 Authorization Code, OAuth2 PKCE, SAML 2.0, OpenID...
写认证系统最常画的图就是时序图。这篇是四种主流认证协议(JWT、OAuth2 Authorization Code、OAuth2 PKCE、SAML 2.0、OpenID Connect)的 PlantUML 时序图模板,以及 token 生命周期管理的常见 bug。
协议全景123456789101112认证├── 无状态│ └── JWT (JSON Web Token)├── ...
PlantUML’s default SVG is hostile to visually impaired users — no alt text, screen readers can’t read it, contrast fails color-blind users. Compliance scenarios (government, education, finance) re...
PlantUML 默认 SVG 对视障用户不友好——没有 alt 文本、屏幕阅读器读不出来、配色对色盲对比度不够。合规场景(政府、教育、金融)要求 WCAG 2.1 AA。这篇是怎么让 PlantUML 图可访问。
为什么 SVG 要无障碍3 个用户群体:
视障——用屏幕阅读器(NVDA / JAWS / VoiceOver)
运动障碍——用键盘或开关设备导航
色盲...
Writing the .puml isn’t the end. Three months later: services get renamed, architectures refactored, components deprecated — the diagram has to evolve alongside git to avoid the awkward “docs say ...
写完 .puml 不是结束。3 个月后 service 重命名、架构拆分、组件废弃——图跟代码同源演化才能避免「文档说 A,代码里早就叫 B」的尴尬。这篇是 rename migration 工具、archive 策略、git log 跟图同步。
重命名的两个层级层级 1:文件名重命名——user-service.puml → identity-service.puml(service ...
PlantUML’s output SVG is “dead” by default — view-only. But with map directives or post-process JS injection, the diagram becomes a navigation map: click a node to open docs, hover for a tooltip, ...
PlantUML 输出的 SVG 默认是「死的」——只能看。但用 map 指令或 post-process 注入 JS,可以让图成为导航地图:点击节点跳转到文档、悬浮显示 tooltip、调用 API 拉数据。
三种交互层次
层次
实现
适用
静态图
默认 SVG
文档、PPT
点击跳转
[[url]] 或 post-process 注入 <a>
wiki 导航...
Most PlantUML diagrams (component, state, object, class) are laid out by Graphviz’s dot algorithm underneath. Understanding how dot works explains many “why does the diagram auto-arrange like that...
PlantUML 大多数图(组件、状态、对象、类)底层都走 Graphviz dot 布局算法。理解 dot 的工作机制能解释很多「图为什么自动排成这样」的疑问,以及怎么改才更好看。
dot 算法是什么PlantUUM 渲染 component class state 时,先用内置解析器把 .puml 转成 Graphviz 的 dot 语言,再用 dot 引擎算布局。最终输出的 SVG...