How hunterunger/simple-family-tree-creator works
Simple Family Tree Maker is a browser-based editor for recording family relationships in YAML-like text and turning that text into a visual family tree. The main workflow starts with a user editing or loading text, then the page parses it into Mermaid flowchart syntax and renders an SVG preview. The editor also offers sample templates and exports YAML, SVG, Mermaid Markdown, and PNG. The README documents the YAML-to-tree goal; sampled source confirms the parser, renderer, and PNG conversion endpoint. Some export wiring is only partially excerpted, so its link is marked unverified.
Main entry points: page.tsx Editor workflow · Mermaid.tsx Mermaid renderer · treeTemplates.js Template catalog · parseGeneology.ts YAML tree parser
Components 14
Tree editing
- Editor workflow
app/page.tsx - Template catalog
utils/treeTemplates.js - Sample trees
examples
Tree conversion
- YAML tree parser
utils/parseGeneology.ts - YAML parser library
Rendering and export
- Mermaid renderer
components/Mermaid.tsx - Mermaid engine
- SVG-to-PNG endpoint
app/api/svg-to-png/route.ts - Image conversion library
Application shell
- Content container
components/Container.js - Application layout
app/layout.tsx - Navigation bar
components/Navbar.tsx - Class-name helper
utils/all.js
Other components
- Tree author
Connections 13
- Tree author → Editor workflow: edits text
README.md - Editor workflow → Template catalog: loads templates
app/page.tsx - Template catalog → Sample trees: imports samples
utils/treeTemplates.js - Editor workflow → YAML tree parser: parses input
app/page.tsx - YAML tree parser → YAML parser library: parses YAML
utils/parseGeneology.ts - Editor workflow → Mermaid renderer: renders syntax
app/page.tsx - Mermaid renderer → Mermaid engine: renders diagram
components/Mermaid.tsx - Mermaid renderer → Editor workflow: returns SVG
components/Mermaid.tsx - Editor workflow → SVG-to-PNG endpoint: requests PNG
- SVG-to-PNG endpoint → Image conversion library: converts SVG
app/api/svg-to-png/route.ts - Editor workflow → Content container: uses layout
app/page.tsx - Content container → Class-name helper: joins classes
components/Container.js - Application layout → Navigation bar: renders navigation
app/layout.tsx