A powerful web-based tool for visualizing SQL query execution flow and data lineage, similar to SQLFlow by Gudusoft.
- π SQL Parser: Supports multiple SQL dialects (MySQL, PostgreSQL, SQL Server, Oracle, SQLite, MariaDB)
- π Interactive Visualization: Real-time flow diagrams showing data movement
- π― Data Lineage: Track column-level dependencies and table relationships
- βοΈ Monaco Editor: VS Code-like SQL editor with syntax highlighting
- π¨ Modern UI: Built with React, TypeScript, and Tailwind CSS
- π₯ Export: Save diagrams as PNG images
- Frontend: React 18 + TypeScript
- Build Tool: Vite
- Visualization: React Flow
- SQL Parser: node-sql-parser
- Editor: Monaco Editor (VS Code's editor)
- Styling: Tailwind CSS
npm installnpm run devThe application will open at http://localhost:3000
npm run buildnpm run preview- SQL Input: Enter your SQL query in the Monaco editor
- Parse: The query is parsed into an Abstract Syntax Tree (AST) using node-sql-parser
- Analyze: Extract tables, columns, joins, and operations from the AST
- Visualize: Generate an interactive flow diagram showing data movement
- Explore: Interact with the diagram, zoom, pan, and export
- SELECT queries (with JOINs, subqueries, CTEs)
- INSERT statements
- UPDATE statements
- DELETE statements
- Multiple table operations
- Column-level lineage tracking
SELECT
u.user_id,
u.username,
COUNT(o.order_id) as total_orders
FROM users u
LEFT JOIN orders o ON u.user_id = o.user_id
GROUP BY u.user_id, u.username;src/
βββ components/
β βββ SQLEditor.tsx # Monaco-based SQL editor
β βββ FlowVisualizer.tsx # React Flow diagram renderer
βββ utils/
β βββ sqlAnalyzer.ts # SQL parsing and analysis logic
β βββ flowGraphGenerator.ts # Graph generation for visualization
βββ App.tsx # Main application component
βββ main.tsx # Application entry point
MIT
Contributions are welcome! Please feel free to submit a Pull Request.