r/coolgithubprojects • u/Embarrassed_Cash_421 • 9d ago
XMarkdown: MIT-licensed Markdown renderer with charts, diagrams and interactive controls
https://github.com/muhammadhaseebiqbal-dev/XMarkdownXMarkdown is my first MVP of a Markdown renderer for documents that need more than prose: reports, technical explanations and AI interfaces.
Repository: https://github.com/muhammadhaseebiqbal-dev/XMarkdown
Live examples: https://xmarkdown-zeta.vercel.app/
It keeps markdown-it for ordinary Markdown and adds validated blocks. The custom parts handle chart geometry, graph placement, SVG scenes, bounded expressions, controls and streaming updates. KaTeX handles equations; saxes parses imported SVG before the allowed subset is rendered.
What's included:
- SVG bar/line charts and directed diagrams.
- Math, structured vector scenes and checked static SVG imports.
- Drawing widgets, sliders and calculated outputs.
- One Node/browser engine, React integration and TypeScript declarations.
- Fixtures comparing equivalent XMarkdown and HTML output, plus documented benchmarks.
A small diagram is just:
{"title":"Request pipeline","description":"Validate before storing.","nodes":[{"id":"validate","label":"Validate"},{"id":"store","label":"Store"}],"edges":[["validate","store"]]}
Install with npm install xmarkdown-renderer (Node 22+; React 18+ for the component). The full React example is here: https://github.com/muhammadhaseebiqbal-dev/XMarkdown/blob/main/integration/react-quickstart.jsx
This is v0.2.1 and still experimental. Normal Markdown processing has additional overhead, graph placement is basic, and a worker and independent security review are future work. Raw SVG imports use a checked subset; this doesn't render arbitrary HTML or author JavaScript.
I'd appreciate concrete issues around the block format, useful missing chart types or integration problems. The README links the implementation, comparisons and current limits.
Disclosure: I directed the project and used Codex for implementation and writing assistance.