How dineug/erd-editor works
Main Components Architecture
The system should be divided into these major components:
a) Core Components:
• ERD Editor Engine (packages/erd-editor)
• Schema Management (packages/erd-editor-schema)
• SQL Parser (packages/schema-sql-parser)
• Custom HTML Renderer (packages/r-html)
b) Platform-specific Implementations:
• Web Application (packages/app)
• VSCode Extension (packages/vscode-extension)
• IntelliJ Plugin (packages/intellij-webview)
Key Architectural Elements
Frontend Architecture:
Web Application
• UI Components Layer
• Editor Components
• Toolbar
• Properties Panel
• State Management
• Replication Store
• Schema Store
• Services Layer
• IndexedDB Service
• Collaboration Service
• File Import/Export
Core Engine Architecture:
ERD Editor Engine
• Parser Layer
• SQL Parser
• Schema Parser
• Rendering Engine
• Canvas Renderer
• SVG Renderer
• Business Logic
• Table Management
• Relationship Management
• Schema Validation
Integration Points
Following connections:
• Data flow between components
• Communication between platform-specific implementations and core engine
• Storage mechanisms (IndexedDB, File System)
• External services integration
Specific Implementation Details
Technical aspects:
• Web Workers for heavy computations
• SharedWorkers for cross-tab synchronization
• WebComponents for editor embedding
• End-to-end encryption flow
• Real-time collaboration architecture