v0.x — open source, AGPL-3.0

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.

Zero runtime dependencies10+ industry standardsLLM-native by design
schematex.render·GenogramMcGoldrick 2020
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- dudley
Genogram: The Potters Genogram diagram with 10 individuals across 3 generations The Potters Fleamont (1909) Euphemia (1920) Evans_m (1925) Evans_f (1928) James (1960) Lily (1960) Vernon (1951) Petunia (1958) Harry (1980) Dudley (1980) Fleamont (b. 1909) Euphemia (b. 1920) Evans_m (b. 1925) Evans_f (b. 1928) James (b. 1960) Lily (b. 1960) Vernon (b. 1951) Petunia (b. 1958) Harry (b. 1980) Dudley (b. 1980) m. 1978
McGoldrickIEC 61131-3IEEE 315NewickNSGCMorenoIshikawaWaveDromANSI Y32.2

Diagram 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.

Genogram: Family Genogram diagram with 4 individuals across 2 generations Family J (1950) M (1952) A (1975) B (1978) J (b. 1950) M (b. 1952) A (b. 1975) B (b. 1978)

Relationships

Family systems, social networks, and evolutionary trees — with the shapes, line styles, and layout conventions each discipline actually uses.

genogramecomappedigreesociogramphylogenetic
Start/Stop PLC ladder logic diagram with 1 rung Start/Stop Rung 001 — Seal-in — START STOP MOTOR

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.

laddersingle-linecircuitlogic gatetimingblock
Holdings Entity structure diagram with 3 entities and 2 relationships Holdings 100% 60% DE Acme Inc. Corporation UK Acme UK LLC KY Growth Fund LP / Fund

Corporate & Legal

Parent/subsidiary structures with entity-type shapes, jurisdiction clustering, and tier-aware ownership percentage rollup that survives a Series A review.

entity structurecap table
Traffic drop — Fishbone diagram Ishikawa cause-and-effect diagram. Effect: Traffic drop. 3 categories. Traffic drop Traffic drop Content Publishing cadence slipped Links Lost 2 high-DR backlinks Tech Core Web Vitals regressed

Causality & Analysis

Ishikawa cause-and-effect fishbones and Venn/Euler set diagrams — for root-cause analysis, decision memos, and teaching artifacts.

fishbonevenneuler

Why Schematex

Built for diagrams people sign off on.

01

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.

02

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.

03

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.

Diagram
Generic flowchart tool
Schematex
Genogram
Boxes labeled "male" / "female"
McGoldrick shapes, emotional relationship lines, index marker
Ladder logic
Not supported
IEC 61131-3 rails, Set/Reset coils, parallel branches, three-line labels
Single-line diagram
Not supported
IEEE 315 symbols, voltage-tier hierarchy, ANSI device numbering
Phylogenetic tree
Generic DAG
Newick / NHX roundtrip, clade coloring, proportional branch lengths
Entity structure
Org chart rectangles
Entity-type shapes, jurisdictions, tier-aware ownership rollup

Quickstart

Install in 10 seconds.

One function, one string in, one SVG out. Works anywhere TypeScript does.

$npm install schematex
Vanilla TypeScriptuniversal
import { render } from 'schematex';

const svg = render(`
genogram "Smiths"
  john [male, 1950]
  mary [female, 1952]
  john -- mary
    alice [female, 1975, index]
`);
Next.js (Server)RSC / SSR
import { render } from 'schematex';

export default function Page() {
  const svg = render(dsl);
  return <div dangerouslySetInnerHTML={{ __html: svg }} />;
}
React (Client)interactive
'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.