# camunda/camunda-modeler architecture

> Architecture diagram of the GitHub repository camunda/camunda-modeler, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/camunda/camunda-modeler
- Repository: https://github.com/camunda/camunda-modeler

## Overview

##### Main components
- Backend/Core Application (under the “app” directory): This contains the core logic including configuration, logging, system utilities, file handling, plugin management, and window management. It encompasses modules such as file-context, config providers, connector templates, and API interaction with Zeebe.
- Client/User Interface (under the “client” directory): This layer is responsible for rendering the UI, managing state, handling user interactions, and integrating the visual elements of BPMN, DMN, CMMN, Forms, and various editor tabs.
- Plugin Architecture: There is an extensive “plugins” structure (found under both “client/src/plugins” and resources for plugins) which allows extension of the core capabilities. Plugins such as the Camunda plugin, connector-templates, and others extend editor functionalities.
- Build & Deployment Pipeline: There is a robust set of configuration and task scripts (see directories like “tasks”, “build”, “webpack.config.js”, and “.github/workflows”) which automate the building, testing, and deployment process.

##### Relationships and interactions
- The Core Application (backend) interacts with the OS (via Electron integrations, configuration, platform-specific adaptations from app/lib/platform) and provides services (file operations, system hooks) that the UI accesses.
- The Client Interface communicates with the Core using remote processes (evident from the “client/src/remote” folder), which encapsulate APIs such as file-system access, logging, and clipboard operations.
- The Plugin system provides hooks both to the client and core application, allowing dynamic extension of features. Plugins register themselves, provide UI elements (via shared UI components) and access to specialized functions.
- Data flow is primarily from the user side through the client UI, which passes commands to the core (for instance, opening files, logging, processing BPMN files) and then receives updates (error messages, updates on deployment, etc.).

##### Architectural patterns and design principles
- Modular separation: Clear distinction between core application logic, UI components, and extension plugins.
- Plugin/extensibility framework: Designed to allow third-party additions and customizations.
- Electron-based desktop architecture: Separation into main (backend) and renderer (client) processes.
- Clear use of testing: Folder structures in “__tests__” indicate an emphasis on automated testing for reliability.
- Configuration and task automation: Usage of scripts and workflows (GitHub Actions, tasks scripts) to automate builds and deployments.

##### Relevant technologies
- Electron framework (for desktop app shell).
- Node.js, with npm scripts driving development (npm run dev, npm run build, etc.).
- Modern JavaScript frameworks for the UI, possibly React or similar (based on the structure in the “client/src/app” and the presence of JSX/LESS files).
- Integration with libraries from the bpmn.io ecosystem: bpmn-js, dmn-js, cmmn-js, and form-js.
- Testing frameworks (e.g., Mocha/Chai or Jest) across different folders.
- Workflow automation via GitHub Actions.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Infrastructure Layer
    subgraph "Infrastructure"
        A["Build & Deployment Pipeline"]:::build
        B["Resources & Assets"]:::assets
    end

    %% Application Layer
    subgraph "Application Layer"
        C["Core Application Services (Backend)"]:::backend
        F["IPC Communication"]:::ipc
        D["User Interface (Client)"]:::frontend
    end

    %% Plugin System (extends both backend and client)
    E["Plugin System"]:::plugin

    %% Relationships
    A -->|"builds"| C
    A -->|"builds"| D
    B -->|"supplies"| C
    B -->|"supplies"| D
    C -->|"via IPC"| F
    F -->|"via IPC"| D
    E -->|"extends"| C
    E -->|"extends"| D

    %% Click Events
    click C "https://github.com/camunda/camunda-modeler/tree/develop/app"
    click D "https://github.com/camunda/camunda-modeler/tree/develop/client"
    click E "https://github.com/camunda/camunda-modeler/tree/develop/client/src/plugins"
    click B "https://github.com/camunda/camunda-modeler/tree/develop/resources"
    click A "https://github.com/camunda/camunda-modeler/tree/develop/tasks"

    %% Styles
    classDef backend fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef frontend fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef plugin fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef assets fill:#FFA07A,stroke:#333,stroke-width:2px;
    classDef build fill:#D3D3D3,stroke:#333,stroke-width:2px;
    classDef ipc fill:#E0FFFF,stroke:#333,stroke-width:2px, font-style:italic;
```
