A WordPress plugin that visualizes internal and external links between posts in an interactive, draggable graph using React Flow.
- Interactive Graph Visualization - Drag, zoom, and pan through your content relationships
- React Flow v12 - Modern, performant graph visualization library
- Node Types - Visual distinction between root posts, internal links, and external links
- Real-time API - REST API endpoints for dynamic graph data
- WordPress Integration - Native admin interface with post selection
- Upload the plugin to
wp-content/plugins/link-graph/ - Activate the plugin in WordPress Admin → Plugins
- Navigate to Admin → Link Graph
- Select any post from the dropdown
- Explore the interactive graph with connected nodes
- Node.js 18+ and npm
- WordPress installation
- PHP 8.2+
cd wp-content/plugins/link-graph
npm install
npm run build # Production build
npm run dev # Development serverwp-content/plugins/link-graph/
├── link-graph.php # Main WordPress plugin file
├── api/ # REST API endpoints
│ └── class-link-graph-api.php
├── src/ # React source files
│ ├── app.jsx # Main React component
│ └── style.css # Custom styles
├── assets/ # Built files (generated)
│ ├── app.js # Bundled JavaScript (324KB)
│ └── app.css # Bundled CSS (16.8KB)
├── package.json # Dependencies
├── vite.config.js # Build configuration
└── README.md # This file
- WordPress Plugin API - Native WordPress integration
- React 18.3.1 - Modern React with hooks
- React Flow 12.7.1 - Latest graph visualization library
- REST API - Custom endpoints for graph data
- Self-contained - No external CDN dependencies
- 324KB JavaScript bundle (includes React + React Flow)
- 16.8KB CSS bundle (includes React Flow styles)
- Production optimized - Minified and tree-shaken
GET /wp-json/post-graph/v1/links/{post_id}?depth={1|2}- Get graph data for a post
- Post Selection - Choose any post from the WordPress admin interface
- API Call - Plugin fetches related posts via REST API
- Graph Generation - React Flow renders nodes and edges
- Interactive Display - Users can drag, zoom, and explore connections
- Root Node (Blue border) - The selected starting post
- Internal Links (Green border) - Links to other posts on your site
- External Links (Red border) - Links to external websites
- Draggable Nodes - Click and drag to reposition
- Zoom Controls - Mouse wheel or control buttons
- Pan Navigation - Click and drag background
- Auto Layout - Automatic positioning with collision detection
npm run build # Production build
npm run dev # Development server
npm install # Install dependencies- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
GPL v2 or later - WordPress standard license