# bpmn-io/bpmn-js-properties-panel architecture

> Architecture diagram of the GitHub repository bpmn-io/bpmn-js-properties-panel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bpmn-io/bpmn-js-properties-panel
- Repository: https://github.com/bpmn-io/bpmn-js-properties-panel

## Overview

##### Main Components

Core Components:
- BPMN Properties Panel (Core)
- Properties Providers
- BPMN Provider
- Camunda Platform Provider
- Zeebe Provider
- Context System
- Rendering System
- Command System

Integration Points:
- bpmn-js Integration
- Moddle Extensions Interface
- External Styling System

**Blue: Core Components**
**Green: Integration Points**
**Orange: Extension Points**
**Gray: External Dependencies**

**[Component Layout]**

- [External Styling]
- ↓
**[bpmn-js] ←→ [BPMN Properties Panel Core] ←→ [Moddle Extensions]**
- ↓
- [Context System]
- ↓
- [Command Handler]
- ↓
- ┌─────────┴──────────┐
- ↓                    ↓
**[Rendering System]    [Properties Providers]**
- ↓
- ┌────┬────┬────┐
- ↓    ↓    ↓    ↓
- [BPMN] [C7] [C8] [Custom]

##### Key Relationships to Highlight

a) Core Integration:
- Bidirectional connection between bpmn-js and the properties panel
- How the context system feeds into providers

b) Provider System:
- Hierarchical relationship of different providers
- Extension points for custom providers

c) Data Flow:
- How properties flow from moddle extensions through the system
- Command/event flow for property updates

##### Important Implementation Details

Technical notes:
- Provider Registration System (priority-based)
- Dynamic Attachment/Detachment capability
- Moddle Extension Integration
- Event/Command handling system

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef core fill:#2196F3,color:white
    classDef integration fill:#4CAF50,color:white
    classDef extension fill:#FF9800,color:white
    classDef external fill:#9E9E9E,color:white

    %% External Dependencies
    extStyle[External Styling]:::external
    bpmnjs[bpmn-js]:::external
    moddle[Moddle Extensions]:::external

    %% Core Components
    core[BPMN Properties Panel Core]:::core
    click core "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/render/BpmnPropertiesPanel.js"

    context[Context System]:::core
    click context "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/context/BpmnPropertiesPanelContext.js"

    cmdHandler[Command Handler]:::core
    click cmdHandler "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/cmd/MultiCommandHandler.js"

    renderSys[Rendering System]:::core
    click renderSys "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/render/BpmnPropertiesPanelRenderer.js"

    %% Providers Section
    subgraph Providers
        propProviders[Properties Providers]:::core
        bpmnProv[BPMN Provider]:::extension
        click bpmnProv "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/provider/bpmn/BpmnPropertiesProvider.js"
        
        camundaProv[Camunda Platform Provider]:::extension
        click camundaProv "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/provider/camunda-platform/CamundaPlatformPropertiesProvider.js"
        
        zeebeProv[Zeebe Provider]:::extension
        click zeebeProv "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/provider/zeebe/ZeebePropertiesProvider.js"
        
        customProv[Custom Providers]:::extension
    end

    %% Context Providers
    subgraph ContextProviders
        tooltipC7[Camunda Platform Tooltips]:::extension
        click tooltipC7 "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/contextProvider/camunda-platform/TooltipProvider.js"
        
        tooltipZeebe[Zeebe Tooltips]:::extension
        click tooltipZeebe "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/contextProvider/zeebe/TooltipProvider.js"
    end

    %% Utility Systems
    subgraph Utils
        elementUtil[Element Utilities]:::core
        click elementUtil "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/utils/ElementUtil.js"
        
        eventUtil[Event Definition Utils]:::core
        click eventUtil "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/utils/EventDefinitionUtil.js"
        
        extensionUtil[Extension Elements Utils]:::core
        click extensionUtil "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/utils/ExtensionElementsUtil.js"
        
        validationUtil[Validation Utils]:::core
        click validationUtil "https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/src/utils/ValidationUtil.js"
    end

    %% Relationships
    extStyle --> core
    bpmnjs <--> core
    core <--> moddle
    core --> context
    context --> cmdHandler
    cmdHandler --> renderSys
    cmdHandler --> propProviders
    propProviders --> bpmnProv & camundaProv & zeebeProv & customProv
    context --> ContextProviders
    renderSys --> Utils

    %% Legend
    subgraph Legend
        coreL[Core Components]:::core
        intL[Integration Points]:::integration
        extL[Extension Points]:::extension
        extDepL[External Dependencies]:::external
    end
```
