# orion-automation/orion-engine architecture

> Architecture diagram of the GitHub repository orion-automation/orion-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/orion-automation/orion-engine
- Repository: https://github.com/orion-automation/orion-engine

## Overview

1. **System shape**  
   ORION Engine is a single deployable Spring Boot application with an embedded Vue frontend. The backend provides the runtime, security, persistence, and REST entry points; the frontend provides the user-facing design and operations console for process orchestration, decision management, and task handling.

2. **Build and deployment boundary**  
   The project is Maven-based and produces an executable JAR. The frontend lives under `src/main/frontend` and is built into the application artifact, so the browser UI and backend API are shipped together. CI workflows also indicate a packaged executable release flow.

3. **Backend core**  
   The Java backend is intentionally small in this repo: a main application class, one inbound controller, and a configuration layer. Most domain capability appears to be assembled through Spring, Camunda-related integrations, plugins, and database configuration rather than large custom business services in this repository.

4. **Backend infrastructure concerns**  
   The `config` package covers authentication, CORS, datasource setup, MyBatis-Plus integration, enum scanning, and initialization of default groups/tenants. This tells you the backend is responsible for bootstrapping the runtime environment and enforcing access control before requests reach the engine APIs.

5. **Persistent data and migration**  
   Persistence is database-backed and migration-oriented. The README lists support for H2, MySQL, PostgreSQL, and Oracle, while `src/main/resources/changelog` suggests schema evolution is managed through changelog files. Tests also include seed/query/update JSON fixtures and SQL cleanup scripts, indicating data-driven integration testing around the engine APIs.

6. **Frontend application structure**  
   The Vue frontend is split into three runtime shells: desktop, mobile, and a viewer mode (`main.js`, `main.mobile.js`, `main.viewer.js`). Layouts and routers are separated the same way, which means the UI architecture is not one monolithic SPA but a set of mode-specific shells sharing common components and stores.

7. **Primary UI domains**  
   The UI is organized by business function:  
   - **Design**: applications, collaboration, knowledge, pages/forms  
   - **Automation**: BPMN/DMN viewing, deployment, process and decision inspection  
   - **Task**: user task lists, task detail, mobile task handling, guest access  
   - **Admin**: users, groups, tenants, authorization, settings, licensing  
   - **Login/Home**: entry and landing pages  
   This separation is important for an architecture diagram because each domain maps to a distinct navigation and API surface.

8. **Process and decision modeling subsystem**  
   A major subsystem is the in-browser modeler stack for BPMN and DMN. The repo includes custom wrappers around `bpmn-js`, DMN viewers, modeler helpers, descriptors, and provider plugins. This is where process diagrams and decision logic are created, edited, validated, and saved back through the API layer.

9. **Form and low-code rendering subsystem**  
   The `formio` directory contains custom components such as list, datatable, kanban, stepper, and timeline widgets, each with form definitions and edit forms. This shows the product is also a low-code UI builder/runtime, not just a workflow console. These components are reused across design and task flows to render dynamic business forms.

10. **Shared frontend services and state**  
   API modules are grouped by backend resource (`process`, `decision`, `task`, `instance`, `user`, `tenant`, `group`, `job`, `signal`, `message`, `batch`, etc.), all funneled through a shared request utility. Global concerns such as authentication, permissions, localization, and app state are handled by `store`, `permission.js`, `auth.js`, and `i18n`, which form the client-side boundary around all business features.

11. **External/plugin-driven capabilities**  
   The README lists installed plugins for email incident notification, external launching, collaboration, application management, delegation, user settings, and process drafts, plus Camunda Connect and Spin. Architecturally, this means core behavior is extended through plugin-style integrations rather than hard-coding every domain capability in the repo itself.

12. **What to show in a diagram**  
   The clearest architecture is: browser shells (desktop/mobile/viewer) → shared Vue UI and API modules → Spring Boot REST and security/config layer → workflow/decision engine and plugins → database. Around that core, the modeler/form-rendering subsystems are the main differentiators, because they handle the creation and execution of BPMN/DMN artifacts and low-code business UI.

Main entry points: [`src/main/java/com/eorion/bo/engine/OrionAutomationApplication.java`](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/OrionAutomationApplication.java) (Engine App), [`src/main/frontend/src/components`](https://github.com/orion-automation/orion-engine/tree/main/src/main/frontend/src/components) (Business UI), [`src/main/java/com/eorion/bo/engine/adapter/inbound/OrionProcessDefinitionController.java`](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/adapter/inbound/OrionProcessDefinitionController.java) (Process API), [`src/main/frontend/src/utils/request.js`](https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/utils/request.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_repo["ORION Engine"]
end

subgraph group_backend["Backend"]
  node_app_main["Engine App<br/>Spring Boot entrypoint"]
  node_process_controller["Process API<br/>REST controller"]
  node_auth_config["Auth filter<br/>security config"]
  node_datasource_config[("Datasource<br/>persistence config")]
  node_mybatis_config["MyBatis Plus<br/>orm config"]
  node_tenant_bootstrap["Seed tenants<br/>bootstrap config"]
  node_cors_config["CORS<br/>web config"]
  node_enum_scan["Enum scan<br/>scanner"]
  node_plugins["Engine plugins<br/>integration layer<br/>[README.md]"]
  node_db[("Database<br/>persistent store")]
end

subgraph group_frontend["Frontend"]
  node_frontend_main["Vue entry<br/>frontend bootstrap<br/>[main.js]"]
  node_frontend_router["Routers<br/>navigation layer<br/>[index.js]"]
  node_frontend_store["Store<br/>state layer<br/>[index.js]"]
  node_frontend_request["API client<br/>request layer<br/>[request.js]"]
  node_frontend_perm["Auth guard<br/>client security<br/>[permission.js]"]
  node_shells["UI shells<br/>vue shells<br/>[index.vue]"]
  node_domains["Business UI<br/>feature domains"]
end

subgraph group_modeling["Modeling"]
  node_modeler{{"Modeler stack<br/>process/decision modeling"}}
end

subgraph group_lowcode["Low-code UI"]
  node_formio{{"Form runtime<br/>low-code rendering"}}
end

node_frontend_main -->|"boots"| node_shells
node_shells -->|"navigates"| node_frontend_router
node_frontend_router -->|"loads"| node_domains
node_domains -->|"calls"| node_frontend_request
node_frontend_request -->|"REST"| node_process_controller
node_frontend_perm -->|"guards"| node_frontend_request
node_frontend_store -->|"feeds"| node_domains
node_domains -->|"uses"| node_modeler
node_domains -->|"renders"| node_formio
node_modeler -->|"saves"| node_process_controller
node_formio -->|"fetches"| node_frontend_request
node_app_main -->|"wires"| node_auth_config
node_app_main -->|"wires"| node_datasource_config
node_app_main -->|"wires"| node_mybatis_config
node_app_main -->|"initializes"| node_tenant_bootstrap
node_app_main -->|"wires"| node_cors_config
node_app_main -->|"wires"| node_enum_scan
node_process_controller -->|"persists"| node_db
node_datasource_config -->|"connects"| node_db
node_mybatis_config -->|"maps"| node_db
node_tenant_bootstrap -->|"seeds"| node_db
node_plugins -->|"extends"| node_process_controller

click node_app_main "https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/OrionAutomationApplication.java"
click node_process_controller "https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/adapter/inbound/OrionProcessDefinitionController.java"
click node_auth_config "https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/AuthenticationConfiguration.java"
click node_datasource_config "https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/DatasourceConfiguration.java"
click node_mybatis_config "https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/MyBatisPlusConfig.java"
click node_tenant_bootstrap "https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/InitialGroupTenantConfiguration.java"
click node_cors_config "https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/CorsConfigurationProperties.java"
click node_enum_scan "https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/TypeEnumsPackageScanner.java"
click node_frontend_main "https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/main.js"
click node_frontend_router "https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/router/index.js"
click node_frontend_store "https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/store/index.js"
click node_frontend_request "https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/utils/request.js"
click node_frontend_perm "https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/permission.js"
click node_shells "https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/layout/index.vue"
click node_domains "https://github.com/orion-automation/orion-engine/tree/main/src/main/frontend/src/components"
click node_modeler "https://github.com/orion-automation/orion-engine/tree/main/src/main/frontend/src/components/common/modeler"
click node_formio "https://github.com/orion-automation/orion-engine/tree/main/src/main/frontend/src/formio"
click node_plugins "https://github.com/orion-automation/orion-engine/blob/main/README.md"
click node_db "https://github.com/orion-automation/orion-engine/blob/main/src/main/resources/changelog/master-changelog.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_main,node_process_controller,node_auth_config,node_datasource_config,node_mybatis_config,node_tenant_bootstrap,node_cors_config,node_enum_scan,node_plugins,node_db toneAmber
class node_frontend_main,node_frontend_router,node_frontend_store,node_frontend_request,node_frontend_perm,node_shells,node_domains toneMint
class node_modeler toneRose
class node_formio toneIndigo
```

## Components

### Backend

Spring Boot runtime, security, persistence, and REST entry points.

- [Engine App](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/OrionAutomationApplication.java): Spring Boot entrypoint · Executable application bootstrap and startup wiring. · `src/main/java/com/eorion/bo/engine/OrionAutomationApplication.java`
- [Process API](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/adapter/inbound/OrionProcessDefinitionController.java): REST controller · Inbound controller exposing engine-facing HTTP endpoints. · `src/main/java/com/eorion/bo/engine/adapter/inbound/OrionProcessDefinitionController.java`
- [Auth filter](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/AuthenticationConfiguration.java): security config · Authentication and request protection for engine APIs. · `src/main/java/com/eorion/bo/engine/config/AuthenticationConfiguration.java`
- [Datasource](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/DatasourceConfiguration.java): persistence config · Database setup and runtime datasource wiring. · `src/main/java/com/eorion/bo/engine/config/DatasourceConfiguration.java`
- [MyBatis Plus](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/MyBatisPlusConfig.java): orm config · MyBatis-Plus integration and insert/update handling. · `src/main/java/com/eorion/bo/engine/config/MyBatisPlusConfig.java`
- [Seed tenants](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/InitialGroupTenantConfiguration.java): bootstrap config · Default group and tenant initialization at startup. · `src/main/java/com/eorion/bo/engine/config/InitialGroupTenantConfiguration.java`
- [CORS](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/CorsConfigurationProperties.java): web config · Cross-origin request policy for browser clients. · `src/main/java/com/eorion/bo/engine/config/CorsConfigurationProperties.java`
- [Enum scan](https://github.com/orion-automation/orion-engine/blob/main/src/main/java/com/eorion/bo/engine/config/TypeEnumsPackageScanner.java): scanner · Package scanning for enum and type metadata. · `src/main/java/com/eorion/bo/engine/config/TypeEnumsPackageScanner.java`
- [Engine plugins](https://github.com/orion-automation/orion-engine/blob/main/README.md): integration layer · Plugin-driven capabilities such as collaboration, notifications, launchers, and drafts. · `README.md`
- [Database](https://github.com/orion-automation/orion-engine/blob/main/src/main/resources/changelog/master-changelog.yaml): persistent store · Multi-database persistence with changelog-managed schema evolution. · `src/main/resources/changelog/master-changelog.yaml`

### Frontend

Mode-specific Vue shells, shared UI, and API clients.

- [Vue entry](https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/main.js): frontend bootstrap · Build entrypoints for desktop, mobile, and viewer shells. · `src/main/frontend/src/main.js`
- [Routers](https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/router/index.js): navigation layer · Mode-specific routing for desktop, mobile, and viewer UI shells. · `src/main/frontend/src/router/index.js`
- [Store](https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/store/index.js): state layer · Shared client state for common, local, page, geo, and user data. · `src/main/frontend/src/store/index.js`
- [API client](https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/utils/request.js): request layer · Shared request utility and resource-specific API modules. · `src/main/frontend/src/utils/request.js`
- [Auth guard](https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/permission.js): client security · Permission and authentication boundary on the browser side. · `src/main/frontend/src/permission.js`
- [UI shells](https://github.com/orion-automation/orion-engine/blob/main/src/main/frontend/src/layout/index.vue): vue shells · Desktop, mobile, and viewer application shells. · `src/main/frontend/src/layout/index.vue`
- [Business UI](https://github.com/orion-automation/orion-engine/tree/main/src/main/frontend/src/components): feature domains · Design, automation, task, admin, login, and home views. · `src/main/frontend/src/components`

### Modeling

Process and decision modeling stack.

- [Modeler stack](https://github.com/orion-automation/orion-engine/tree/main/src/main/frontend/src/components/common/modeler): process/decision modeling · BPMN and DMN modeling, validation, and viewer plugins. · `src/main/frontend/src/components/common/modeler`

### Low-code UI

Dynamic form and widget rendering subsystem.

- [Form runtime](https://github.com/orion-automation/orion-engine/tree/main/src/main/frontend/src/formio): low-code rendering · Custom Form.io components for list, table, kanban, stepper, and timeline UI. · `src/main/frontend/src/formio`

## Connections

- Vue entry → UI shells: boots · Creates the desktop, mobile, and viewer runtime shells.
- UI shells → Routers: navigates · Routes users into mode-specific application areas.
- Routers → Business UI: loads · Opens the feature domains for design, automation, task, admin, and entry pages.
- Business UI → API client: calls · Uses shared API modules to reach backend resources.
- API client → Process API: REST · Browser features communicate with the Spring Boot API layer.
- Auth guard → API client: guards · Authentication and permission checks wrap API usage.
- Store → Business UI: feeds · Shared state supports feature screens and navigation.
- Business UI → Modeler stack: uses · Design and automation views rely on BPMN and DMN tooling.
- Business UI → Form runtime: renders · Task and design flows reuse dynamic form widgets.
- Modeler stack → Process API: saves · Modeled process and decision artifacts are persisted through backend APIs.
- Form runtime → API client: fetches · Form widgets load data and submit runtime actions through shared API modules.
- Engine App → Auth filter: wires · Application startup activates security configuration.
- Engine App → Datasource: wires · Application startup activates database configuration.
- Engine App → MyBatis Plus: wires · Application startup activates ORM integration.
- Engine App → Seed tenants: initializes · Application startup seeds default groups and tenants.
- Engine App → CORS: wires · Application startup configures browser access policy.
- Engine App → Enum scan: wires · Application startup scans type metadata packages.
- Process API → Database: persists · REST operations ultimately read and write database-backed engine state.
- Datasource → Database: connects · Datasource configuration points the application to the persistent store.
- MyBatis Plus → Database: maps · ORM layer translates domain data to database operations.
- Seed tenants → Database: seeds · Initial groups and tenants are stored in the database.
- Engine plugins → Process API: extends · Installed plugins augment engine behavior exposed through the API surface.
