A comprehensive, enterprise-grade diagramming application built with GoJS, React, and modern web technologies
DiagramPro is a professional-grade diagramming application that combines the power of GoJS and React Flow to deliver 9 different specialized diagram types for business, technical, and strategic use cases.
- β 9 Professional Diagram Types - From org charts to Gantt charts
- β GoJS Integration - Enterprise-level diagramming library
- β React Flow Canvas - Modern, flexible node-based editor
- β State Management - Zustand for efficient global state
- β Theme Support - Light/Dark mode with seamless switching
- β Import/Export - JSON, PNG, SVG, PDF, SQL export capabilities
- β Undo/Redo - Full history management
- β Context Menus - Right-click operations on nodes
- β Drag & Drop - Intuitive node manipulation
- β Auto-Layout - Intelligent automatic layouting
- β Real-time Editing - Live updates and editing
- β Properties Panel - Dynamic node configuration
- β Responsive Design - Works on all screen sizes
- β π― WalkMe Integration - In-app guidance and walkthroughs for all diagram types
Perfect for: HR, Management, Team Structure
- Hierarchical employee structure
- Photo integration with avatars
- Department categorization
- Color-coded levels
- Context menu for quick actions (Add Report, Delete, Change Color)
- Tree layout with configurable styling
- Export to JSON/PNG
- Right-click to add subordinates
Use Cases:
- Company organizational structure
- Department hierarchies
- Reporting relationships
- Team compositions
Perfect for: Business Process Mapping, Operations, Quality Management
Node Types:
- Start Event (Green circle) - Process initiation
- Task (Blue rectangle) - Process steps with descriptions
- Gateway (Orange diamond) - Decision points (X = XOR)
- Subprocess (Purple rectangle) - Expandable sub-processes
- Data Object (Document icon) - Data references
- End Event (Red circle) - Process termination
Features:
- BPMN 2.0 compliant shapes
- Conditional flows with labels
- Orthogonal routing with jump-over
- Animated connections
- Process validation
- Export workflow definitions
Use Cases:
- Standard Operating Procedures (SOPs)
- Business process documentation
- Workflow automation planning
- Process optimization
Perfect for: Database Design, Software Architecture, Data Modeling
Features:
- Primary Keys (Yellow diamond marker)
- Foreign Keys (Red square marker)
- Attributes (Blue circle marker)
- Data type specification
- Cardinality labels (1, N, 1:N, M:N)
- Relationship naming
- SQL Export - Generate CREATE TABLE statements automatically
- Visual FK relationships
Use Cases:
- Database schema design
- Data modeling
- System architecture
- Migration planning
Bonus: Export directly to SQL with proper PRIMARY KEY and data type definitions!
Perfect for: IT Infrastructure, Network Design, System Architecture
Device Types:
- Server (Blue rectangle) - Web/App/Database servers
- Router (Orange diamond) - Network routing
- Firewall (Red pentagon) - Security appliances
- Switch (Purple hexagon) - Network switches
- Client (Blue ellipse) - Workstations/endpoints
- Cloud (Green cloud) - Internet/Cloud services
- Database (Pink cylinder) - Data storage
Features:
- IP address tracking
- Connection bandwidth labels
- Device status indicators
- Color-coded connection types
- Force-directed layout
- Infrastructure documentation
Use Cases:
- Network infrastructure planning
- System architecture diagrams
- IT documentation
- Disaster recovery planning
Perfect for: Project Management, Sprint Planning, Resource Allocation
Features:
- Timeline visualization (Jan-May 2024 scale)
- Task duration bars with color coding
- Progress tracking (visual progress bars)
- Task dependencies with arrows
- Drag to reposition tasks
- Resize to adjust duration
- Duration calculation (auto-displays days)
- Hierarchical task relationships
Visual Indicators:
- Task name and duration
- Progress percentage overlay
- Dependency arrows
- Color-coded by task type
Use Cases:
- Project timeline planning
- Sprint scheduling
- Resource allocation
- Milestone tracking
Perfect for: Brainstorming, Idea Organization, Strategic Planning
Features:
- Central idea with radiating branches
- Multi-level hierarchy (Level 0, 1, 2, 3)
- Color-coded nodes by level
- Smooth animated connections
- Drag and drop positioning
- Real-time connection creation
- Export to JSON
- Mini-map overview
Use Cases:
- Brainstorming sessions
- Project planning
- Knowledge mapping
- Study notes
Perfect for: Process Design, Automation Workflows, Decision Trees
Node Types:
- Start nodes
- Process steps
- Decision points
- End nodes
Features:
- Step-by-step process flow
- Conditional branching
- Custom node styling
- Connection validation
Perfect for: Strategic Planning, OKRs, Balanced Scorecard
Four-Tier Hierarchy:
- Vision (Purple) - Overall strategic vision
- Goals (Blue) - Strategic goals
- Objectives (Green) - Tactical objectives
- Initiatives (Orange) - Action items
Features:
- Balanced scorecard methodology
- Clear alignment from vision to execution
- Color-coded strategic elements
- Connection of initiatives to objectives
Perfect for: System Flows, Data Pipelines, Manufacturing Processes
Node Types:
- Input nodes
- Process nodes
- Storage nodes
- Validation nodes
- Output nodes
Features:
- System architecture visualization
- Data flow diagrams
- Directed edges with arrows
- Process documentation
- Node.js 16+ installed
- npm or yarn package manager
- Modern web browser
# Clone the repository
git clone <your-repo-url>
cd gojs-project123
# Install dependencies
npm install
# Start development server
npm run devThe application will open at http://localhost:5173
npm run build
npm run preview| Technology | Version | Purpose |
|---|---|---|
| React | 18.2 | UI Framework |
| GoJS | Latest | Professional diagramming |
| React Flow | 11.10 | Node-based canvas |
| Zustand | 4.4 | State management |
| Tailwind CSS | 3.3 | Styling framework |
| Vite | 5.0 | Build tool |
| html2canvas | Latest | Image export |
| jsPDF | Latest | PDF export |
| Lucide React | Latest | Icon library |
- Component-based architecture - Modular, reusable components
- Global state management - Zustand for theme, canvas type, history
- Immutable state updates - Immer middleware for safe mutations
- Type-safe exports - Utility functions for all export formats
- Responsive design - Works on desktop, tablet, and mobile
gojs-project123/
βββ src/
β βββ components/
β β βββ gojs/ # GoJS-based components
β β β βββ OrgChartCanvas.jsx # Organization Chart
β β β βββ BPMNCanvas.jsx # BPMN Workflow
β β β βββ ERDCanvas.jsx # Entity Relationship Diagram
β β β βββ NetworkCanvas.jsx # Network Topology
β β β βββ GanttCanvas.jsx # Gantt Chart
β β βββ common/ # Shared components
β β β βββ PropertiesPanel.jsx # Properties editor
β β βββ MindMapCanvas.jsx # React Flow mind map
β β βββ WorkflowCanvas.jsx # React Flow workflow
β β βββ StrategyCanvas.jsx # React Flow strategy map
β β βββ ProcessCanvas.jsx # React Flow process map
β β βββ Sidebar.jsx # Navigation sidebar
β βββ store/
β β βββ useStore.js # Zustand state management
β βββ utils/
β β βββ exportHelpers.js # Export/import utilities
β βββ App.jsx # Main application
β βββ main.jsx # Entry point
β βββ index.css # Global styles
βββ package.json
βββ vite.config.js
βββ tailwind.config.js
βββ README.md
// Global store with Zustand + Immer
const useStore = create(immer((set) => ({
theme: 'light', // Light/Dark theme
activeCanvas: 'orgchart', // Current diagram type
diagrams: {}, // Diagram data storage
history: { past, present, future }, // Undo/Redo
selectedNode: null, // Selected element
showProperties: true, // Properties panel toggle
showGrid: true, // Grid visibility
snapToGrid: true, // Snap to grid
autoLayout: true, // Auto-layout enabled
})))- JSON - Complete diagram data
- PNG - High-resolution raster image
- SVG - Vector graphics (GoJS only)
- PDF - Print-ready documents
- SQL - Database schema (ERD only)
- CSV - Tabular node data
Right-click on nodes to:
- Add child nodes
- Delete nodes
- Change colors
- Edit properties
- Clone nodes
Ctrl+Z/Cmd+Z- UndoCtrl+Y/Cmd+Y- RedoDelete- Delete selected nodeCtrl+C- CopyCtrl+V- PasteCtrl+A- Select all
- Organizational structure charts
- Strategic planning maps
- Process documentation
- Compliance workflows
- System architecture diagrams
- Database schema design
- Network topology maps
- Project timelines (Gantt)
- Client org structure analysis
- Process optimization mapping
- Strategy roadmaps
- Workflow automation design
- Production workflows
- Quality assurance processes
- Supply chain mapping
- Equipment network diagrams
- Mind maps for learning
- Course structure planning
- Knowledge organization
- Concept mapping
- Create component in
src/components/gojs/orsrc/components/ - Define node templates using GoJS or React Flow
- Add to App.jsx in the
renderCanvas()switch - Add to Sidebar.jsx in the
canvasTypesarray - Update store if needed for specific state
Modify tailwind.config.js to customize:
- Color schemes
- Spacing
- Fonts
- Breakpoints
The theme system supports:
- Light/Dark mode toggle
- Custom color palettes
- Per-component theme overrides
import {
exportToJSON,
exportToPNG,
exportToPDF,
importFromJSON
} from './utils/exportHelpers'
// Export diagram
exportToJSON(diagramData, 'my-diagram')
exportToPNG(elementRef.current, 'my-diagram')
// Import diagram
const data = await importFromJSON()import useStore from './store/useStore'
function MyComponent() {
const {
activeCanvas,
setActiveCanvas,
theme,
toggleTheme
} = useStore()
// Use state...
}- Code splitting - Lazy load diagram components
- Memoization - React.memo for expensive components
- Virtual rendering - GoJS efficient rendering
- Debounced updates - Smooth interaction
- Optimized layouts - Fast auto-layout algorithms
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
- GoJS - Professional diagramming library
- React Flow - Node-based UI library
- Tailwind CSS - Utility-first CSS framework
- Zustand - Lightweight state management
- Lucide - Beautiful icon library
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Combines GoJS (enterprise-grade) and React Flow (modern flexibility) for the best of both worlds.
- Comprehensive error handling
- Export/import functionality
- Undo/redo support
- Local storage persistence
- Theme support
- Clean, modular code
- Well-documented
- Easy to extend
- Type-safe utilities
- SQL export for ERD
- BPMN compliance
- Professional layouts
- Context menus
- Properties panels
- React 18
- Vite (fast builds)
- Tailwind CSS
- Zustand (simple state)
- Collaborative editing (WebSocket)
- Cloud storage integration
- Template library
- AI-powered auto-layout suggestions
- Mobile app (React Native)
- Real-time collaboration
- Version control for diagrams
- Comments and annotations
- Presentation mode
- Integration with Jira, Confluence, Notion
- Use
React.memo()for diagram components - Minimize re-renders with proper state management
- Use lazy loading for large diagrams
- Enable auto-layout only when needed
- Provide clear visual feedback
- Use consistent color schemes
- Add helpful tooltips
- Implement keyboard shortcuts
- Keep components small and focused
- Use TypeScript for type safety (optional)
- Document complex logic
- Write tests for utilities
Built with β€οΈ using modern web technologies and AI-accelerated development techniques
β Star this repo if you find it useful!