Living, narratable diagrams — baked to static SVG, no runtime JS.
Sirentide is a clean-room, pure-Java, zero-dependency renderer that turns a small diagram DSL into inert static SVG at build time — with a native effect/narrative layer: diagrams you can play through, effects bound to the diagram's own meaning, and real LaTeX math baked into labels (via its sibling, LatteX).
It is not a Mermaid clone. Mermaid is a design reference; Sirentide takes the idea, drops the browser, and adds the thing no browser-JS diagram tool can put in a CSP-clean static bake: a controlled, sanitizer-safe effect layer that gives a diagram presence.
- Static-site / docs safe. Output is inert
svg/path/rect/linegeometry (labels baked to<path>glyphs) — no<script>, no runtime JS, no external fonts. It survives a strict HTML sanitizer untouched. - Hermetic build. Pure JVM, zero runtime deps (no headless browser at bake). The one build-time asset is a bundled OFL/Apache font, rendered to paths.
- Native effects. Because Sirentide emits the SVG with its own stable semantic anchors, effects ("glow the critical path", "pulse the active step", "play the flow in order") attach natively — not bolted onto a drifting class-soup.
- Math composition. A node label, axis tick, or bar can be a real LaTeX formula — its LatteX sibling renders it at bake, and the two minimal-alphabet emitters compose for free.
Live and shipping. The render pipeline (DSL → IR → layout → SVG), the clean-room font-metrics oracle, and sixteen diagram types are built today — each baked to inert svg/path/rect/line geometry — plus LaTeX math in labels (the LatteX bridge), semantic anchors (data-sirentide-role/id/seq), the baked-frame play-through API (renderFrames, with a renderFramesWithDiagnostics twin that adds a why-did-it-degrade channel without touching the never-throw bake), and a live /docs integration: a ```sirentide fenced block in a docs page bakes to a sanitized inline diagram. See examples/showcase.html — every type + the one-bake-any-theme demo, all live renderer output. Browser-audited renders in the gallery.
The six flagship types, in detail:
| Type | One-liner | Sample |
|---|---|---|
pie |
proportional wedges; optional legend (alias key), per-item #hex colours (3- or 6-digit), thin-slice outside labels clamped |
pie legend"Reviews" : 40"Docs" : 30 #22c55e |
xychart |
signed bars on a fractional-clean axis | xychart"Mon" : 5"Tue" : -3 |
timeline |
events placed proportionally in time; bare years and ISO dates both shown as dates, labels ellipsized/clamped | timeline"Founded" : 2000"Launch" : 2020 |
gantt |
tasks on a shared, min-normalized time axis; degenerate domains still draw markers | gantt"Design" : 0-3"Build" : 3-8 |
flowchart |
TD/LR directed graph, A[rect]/A{diamond} nodes, `--> |
label |
sequence |
actors + time-ordered messages: ->> calls, -->> replies, self-messages |
sequenceClient ->> Auth : loginAuth -->> Client : ok |
Plus nine more: state (rides the flowchart engine), quadrant, classDiagram (all five UML relationship markers), erDiagram (crow-foot cardinalities), gitGraph, journey, mindmap, sankey, and mathblock (standalone display LaTeX). The flowchart carries the full mermaid node-shape set, edge styles, and nested subgraphs; the sequence diagram carries alt/loop/par frames.
Cross-cutting: a color= header modifier for off-slice text, currentColor theme-adaptive labels, per-diagram themes, and hard input caps so a malformed or oversized source degrades to an inert shell — the bake never throws. A $…$ fragment inside any label typesets as real math via the LatteX bridge.
Still ahead (the remaining thesis work): the native effect layer — data-sirentide-fx, the security-gated Part 2 the anchors were built to carry — see SLOWSTART.md.
- QUICKSTART.md — render a diagram in five minutes.
- SLOWSTART.md — the why, the differentiators, the milestone ladder.
- RELEASE_NOTES.md — what's shipped, dated.
- docs/DESIGN.md — full design, the LatteX dependency, the security model.
- examples/gallery/GALLERY.md — real-browser renders of every diagram type, captured by BrewShot.
- LatteX — the clean-room LaTeX→SVG math sibling Sirentide depends on (render-only) and composes with.
Apache-2.0.
This project is provided under the Apache License 2.0 on an "AS IS" basis, without warranties or conditions of any kind. See the LICENSE file for details.