Convert any paragraph or article into a visual mind map using Claude AI.
npm installCopy .env.example to .env:
cp .env.example .envThen open .env and replace your_api_key_here with your real key from https://console.anthropic.com
npm run devOpen http://localhost:5173 in your browser.
src/
├── main.jsx # React entry point
├── App.jsx # Root component + layout
├── App.css # Global styles + CSS variables
│
├── components/
│ ├── TextInput.jsx # Textarea + example button
│ ├── Toolbar.jsx # Generate / Clear / Export buttons
│ ├── MindMapCanvas.jsx # SVG renderer (main visual)
│ ├── MapNode.jsx # Single node (center / branch / leaf)
│ ├── MapEdge.jsx # Curved connection line between nodes
│ ├── Loader.jsx # Loading animation
│ └── ExportButton.jsx # Download PNG / SVG
│
├── hooks/
│ ├── useMindMap.js # State: API call, loading, error
│ └── useLayout.js # Converts data → positioned nodes
│
├── services/
│ ├── claudeApi.js # Fetch call to Anthropic API
│ └── parseMap.js # AI JSON → nodes + edges format
│
└── utils/
├── layout.js # Radial layout math (x, y positions)
├── colors.js # Color palette for branches
└── exportSvg.js # SVG → PNG download logic
- User pastes text →
TextInputcomponent captures it - User clicks "Generate" →
useMindMaphook callsclaudeApi.js - Claude AI returns structured JSON:
{ center, branches[] } parseMap.jsconverts JSON → flatnodes[]+edges[]useLayout.jscalculates x/y positions (radial layout)MindMapCanvas.jsxrenders everything as SVG
npm run buildOutput goes to the dist/ folder. Deploy to Vercel, Netlify, or GitHub Pages.
- React 18
- Vite 5
- Claude AI (Anthropic API)
- Pure SVG (no graph library needed!)