Diagrams Workflow
- Status: Ready
- Tooling: Draw.io source files plus exported SVG assets for VitePress
Recommendation
Use Draw.io for editable source diagrams and export SVG files for the docs site.
This keeps the diagrams:
- editable by humans
- crisp in VitePress
- easy to version in git
- independent from a custom docs plugin
ASCII First
For course content, prefer a two-step diagram workflow:
- add a small ASCII diagram directly in the Markdown page when it helps explain the idea immediately
- add a Draw.io brief for the stronger long-term diagram asset
This works well for the repo because ASCII diagrams are:
- fast to create and review
- easy to keep close to the explanation
- readable in diffs and pull requests
- good enough for early architecture, sequence, and state sketches
Use ASCII diagrams first for:
- state transitions
- project or layer maps
- short runtime flows
- ownership boundaries
Use Draw.io when:
- the concept is central enough to deserve a reusable visual
- the diagram will likely be reused across multiple pages
- grouping, swimlanes, or layout matter more than raw speed
Folder Convention
Use this structure:
docs/diagrams/sourceEditable.drawiofiles.docs/diagrams/renderedExported.svgfiles referenced by docs pages.
Diagram Brief Format
Before drawing, create a diagram brief in the related course or architecture page with:
TitlePurposeAudienceNodesEdgesGroups or swimlanesAnnotationsCaptionSuggested file paths
ASCII Diagram Pattern
When a page benefits from an inline sketch, keep it compact and readable. Good patterns include:
- box-and-arrow flow
- small state transition map
- layer stack
- actor-to-service sequence sketch
Example:
Operator
|
v
MainWindow -> MainViewModel -> WorkflowService -> AppStateStore
|
v
AppState
|
v
WPF UIThe ASCII version should clarify the explanation immediately. The Draw.io brief should preserve the idea for later polished rendering.
Initial Diagram Set
These are the first diagrams worth creating:
system-context.drawioproject-layer-map.drawiodomain-model.drawioworkflow-state.drawiostart-run-sequence.drawiofault-recovery-sequence.drawiorecipe-loading-flow.drawiorun-history-flow.drawio
SVG Export Guidance
Prefer:
- SVG for architecture and sequence diagrams
- consistent title and caption text
- simple text formatting when possible
If a specific SVG renders poorly in the browser, re-export with simpler text settings or keep a PNG fallback only for that case.
Review Standard
A diagram is good enough when:
- a newcomer can understand the story without reading the entire page first
- the boxes and arrows match the actual repo structure
- the diagram clarifies something that prose alone makes harder
- the SVG is readable in both desktop and laptop browser widths