Standards-as-code
for professional diagrams.
The open-source rendering engine for diagrams that follow real industry standards — McGoldrick genograms, IEC 61131-3 ladder logic, IEEE 315 single-line diagrams, Newick phylogenetic trees, and 10+ more.
genogram "The Potters"
fleamont [male, 1909, deceased]
euphemia [female, 1920, deceased]
fleamont -- euphemia
james [male, 1960, deceased]
evans_m [male, 1925, deceased]
evans_f [female, 1928, deceased]
evans_m -- evans_f
lily [female, 1960, deceased]
petunia [female, 1958]
james -- lily "m. 1978"
harry [male, 1980, index]
petunia -- vernon [male, 1951]
dudley [male, 1980]
harry -close- lily
harry -hostile- dudleyDiagram library
One library. Four domains.
Each domain is a first-class citizen with its own parser, layout algorithm, and SVG symbols based on published standards. Not generic shapes with domain labels.
Relationships
Family systems, social networks, and evolutionary trees — with the shapes, line styles, and layout conventions each discipline actually uses.
Electrical & Industrial
Ladder logic that maps 1:1 to IEC 61131-3, SPICE-style schematics, IEEE 315 one-lines, timing waveforms, and signal-flow block diagrams.
Corporate & Legal
Parent/subsidiary structures with entity-type shapes, jurisdiction clustering, and tier-aware ownership percentage rollup that survives a Series A review.
Causality & Analysis
Ishikawa cause-and-effect fishbones and Venn/Euler set diagrams — for root-cause analysis, decision memos, and teaching artifacts.
Why Schematex
Built for diagrams people sign off on.
Standards-compliant, not standards-inspired
Genograms a genetic counselor accepts clinically. Ladder logic that maps 1:1 to IEC 61131-3. Cap tables that survive a Series A review. Each diagram is the published standard, in code.
Zero runtime dependencies
No D3, no dagre, no parser generator. Hand-written TypeScript, strict. SSR-ready pure SVG — works in Node, Edge, Bun, and the browser with no DOM required.
LLM-native by design
Small, consistent DSLs an LLM can learn from a single example. AI-readable error messages. Syntax hardened against common LLM failure modes — CJK quoting, nesting ambiguity, positional args.
A quiet clarification
Not all diagrams are flowcharts.
Mermaid is excellent for flowcharts, sequences, and class diagrams. Schematex is for the diagrams generic tools can't draw — because the symbols, the layout, and the grammar are part of the standard itself.
Quickstart
Install in 10 seconds.
One function, one string in, one SVG out. Works anywhere TypeScript does.
npm install schemateximport { render } from 'schematex';
const svg = render(`
genogram "Smiths"
john [male, 1950]
mary [female, 1952]
john -- mary
alice [female, 1975, index]
`);import { render } from 'schematex';
export default function Page() {
const svg = render(dsl);
return <div dangerouslySetInnerHTML={{ __html: svg }} />;
}'use client';
import { render } from 'schematex';
import { useMemo } from 'react';
export function Diagram({ dsl }: { dsl: string }) {
const svg = useMemo(() => render(dsl), [dsl]);
return <div dangerouslySetInnerHTML={{ __html: svg }} />;
}Start with a single string.
Open the playground to render any of 13 diagram types live — or browse the gallery for DSL you can copy, paste, and adapt.