How bpmn-io/bpmn-js works
Main Components
a) Core Components:
• BaseViewer/BaseModeler as the foundation
• BPMN Moddle (for XML parsing/serialization)
b) Feature Modules:
• Modeling features
• Import/Export handling
• Viewer/Editor components
• Interactive features (palette, context pad, popup menu)
Business Logic Layer
• Modeling operations
• Rules engine
• Command handling
• Event system
Data Layer
• BPMN model (moddle)
• XML import/export
• Canvas and element registry
Component Relationships
Following interactions:
• Modeling features → Command Stack
• Import/Export → BPMN Moddle
• Features → Core services
Specific Elements
a) Core Services (lib/core):
• Command Stack
• Event Bus
• Element Registry
• Canvas
b) Feature Modules (lib/features):
• Modeling
• Palette
• Context Pad
• Rules
• Snapping
• Space Tool
• BpmnRenderer
• PathMap
• TextRenderer
Implementation Details
Implementation aspects:
• Extension points
• Plugin architecture
• Event system
• Command pattern implementation
External Dependencies
Connections to:
• bpmn-moddle
• Browser DOM
• External BPMN services