# kumarmageshr/n8n architecture

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

- Interactive diagram: https://gitdiagram.com/kumarmageshr/n8n
- Repository: https://github.com/kumarmageshr/n8n

## Overview

n8n is a self-hostable workflow-automation platform: users assemble workflows in the editor, configure integrations, and run automations. The map highlights workflow authoring and execution, execution state, integration nodes, and AI capabilities, alongside OAuth and binary-data support. The README documents broad capabilities such as code, 400+ integrations, and AI workflows. Several runtime modules are named in the SOURCE INDEX but were not excerpted; uncertain connections are omitted or shown as unverified.

Main entry points: [`packages/cli/src/workflows/workflows.controller.ts`](https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflows.controller.ts) (Workflow API), [`packages/cli/src/workflows/workflow-execution.service.ts`](https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflow-execution.service.ts) (Workflow execution service), [`packages/core/src/execution-engine/node-execution-context/node-execution-context.ts`](https://github.com/kumarmageshr/n8n/blob/master/packages/core/src/execution-engine/node-execution-context/node-execution-context.ts) (Node execution context), [`packages/core/src/execution-engine/node-execution-context/webhook-context.ts`](https://github.com/kumarmageshr/n8n/blob/master/packages/core/src/execution-engine/node-execution-context/webhook-context.ts) (Webhook context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Workflow authoring"]
  node_editor["Workflow editor<br/>[App.vue]"]
  node_workflow_api["Workflow API"]
  node_workflow_service["Workflow service"]
  node_workflow_finder["Workflow finder"]
end

subgraph group_runtime["Execution runtime"]
  node_workflow_exec["Workflow execution service"]
  node_execution_service["Execution service"]
  node_active_workflows["Active workflows"]
  node_node_context["Node execution context"]
  node_webhook_context["Webhook context<br/>[webhook-context.ts]"]
  node_binary_store[("Binary data storage")]
end

subgraph group_integrations["Nodes and integrations"]
  node_storage_node["Cloud storage node"]
  node_azure_node["Azure Storage node"]
end

subgraph group_platform["Platform services"]
  node_workflow_db[("Workflow and execution data")]
  node_oauth_client["OAuth2 client<br/>[client-oauth2.ts]"]
end

subgraph group_ai["AI capabilities"]
  node_ai_builder["AI workflow builder"]
  node_node_search["Node search engine"]
  node_langchain_memory["LangChain memory node"]
end

node_user(("Technical user"))
node_external_services(("External services"))

node_user -->|"authors in"| node_editor
node_editor -.->|"manages workflows"| node_workflow_api
node_workflow_api -->|"delegates"| node_workflow_service
node_workflow_api -->|"looks up"| node_workflow_finder
node_workflow_api -->|"starts runs"| node_workflow_exec
node_workflow_exec -.->|"records runs"| node_execution_service
node_execution_service -.->|"persists state"| node_workflow_db
node_active_workflows -.->|"manages activation"| node_workflow_exec
node_workflow_exec -.->|"executes nodes"| node_node_context
node_webhook_context -->|"provides context"| node_node_context
node_webhook_context -->|"copies binary data"| node_binary_store
node_node_context -.->|"runs node"| node_storage_node
node_storage_node -.->|"accesses cloud storage"| node_external_services
node_azure_node -.->|"accesses Azure"| node_external_services
node_azure_node -.->|"supports OAuth2"| node_oauth_client
node_user -.->|"requests AI workflow"| node_ai_builder
node_ai_builder -.->|"searches nodes"| node_node_search
node_langchain_memory -.->|"uses AI ecosystem"| node_external_services

click node_editor "https://github.com/kumarmageshr/n8n/blob/master/packages/frontend/editor-ui/src/App.vue"
click node_workflow_api "https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflows.controller.ts"
click node_workflow_service "https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflow.service.ts"
click node_workflow_finder "https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflow-finder.service.ts"
click node_workflow_exec "https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflow-execution.service.ts"
click node_execution_service "https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/executions/execution.service.ts"
click node_active_workflows "https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/active-workflow-manager.ts"
click node_node_context "https://github.com/kumarmageshr/n8n/blob/master/packages/core/src/execution-engine/node-execution-context/node-execution-context.ts"
click node_webhook_context "https://github.com/kumarmageshr/n8n/blob/master/packages/core/src/execution-engine/node-execution-context/webhook-context.ts"
click node_binary_store "https://github.com/kumarmageshr/n8n/blob/master/packages/core/src/binary-data/file-system.manager.ts"
click node_workflow_db "https://github.com/kumarmageshr/n8n/tree/master/packages/%40n8n/db/src/entities"
click node_storage_node "https://github.com/kumarmageshr/n8n/blob/master/packages/nodes-base/nodes/Google/CloudStorage/GoogleCloudStorage.node.ts"
click node_azure_node "https://github.com/kumarmageshr/n8n/blob/master/packages/nodes-base/nodes/Microsoft/Storage/AzureStorage.node.ts"
click node_oauth_client "https://github.com/kumarmageshr/n8n/blob/master/packages/%40n8n/client-oauth2/src/client-oauth2.ts"
click node_ai_builder "https://github.com/kumarmageshr/n8n/blob/master/packages/%40n8n/ai-workflow-builder.ee/src/ai-workflow-builder-agent.service.ts"
click node_node_search "https://github.com/kumarmageshr/n8n/blob/master/packages/%40n8n/ai-workflow-builder.ee/src/tools/engines/node-search-engine.ts"
click node_langchain_memory "https://github.com/kumarmageshr/n8n/blob/master/packages/%40n8n/nodes-langchain/nodes/memory/MemoryManager/MemoryManager.node.ts"

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_editor,node_workflow_api,node_workflow_service,node_workflow_finder,node_user toneBlue
class node_workflow_exec,node_execution_service,node_active_workflows,node_node_context,node_webhook_context,node_binary_store toneAmber
class node_storage_node,node_azure_node toneMint
class node_workflow_db,node_oauth_client toneRose
class node_ai_builder,node_node_search,node_langchain_memory,node_external_services toneIndigo
```

## Components

### Workflow authoring

- [Workflow editor](https://github.com/kumarmageshr/n8n/blob/master/packages/frontend/editor-ui/src/App.vue): `packages/frontend/editor-ui/src/App.vue`
- [Workflow API](https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflows.controller.ts): `packages/cli/src/workflows/workflows.controller.ts`
- [Workflow service](https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflow.service.ts): `packages/cli/src/workflows/workflow.service.ts`
- [Workflow finder](https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflow-finder.service.ts): `packages/cli/src/workflows/workflow-finder.service.ts`

### Execution runtime

- [Workflow execution service](https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/workflows/workflow-execution.service.ts): `packages/cli/src/workflows/workflow-execution.service.ts`
- [Execution service](https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/executions/execution.service.ts): `packages/cli/src/executions/execution.service.ts`
- [Active workflows](https://github.com/kumarmageshr/n8n/blob/master/packages/cli/src/active-workflow-manager.ts): `packages/cli/src/active-workflow-manager.ts`
- [Node execution context](https://github.com/kumarmageshr/n8n/blob/master/packages/core/src/execution-engine/node-execution-context/node-execution-context.ts): `packages/core/src/execution-engine/node-execution-context/node-execution-context.ts`
- [Webhook context](https://github.com/kumarmageshr/n8n/blob/master/packages/core/src/execution-engine/node-execution-context/webhook-context.ts): `packages/core/src/execution-engine/node-execution-context/webhook-context.ts`
- [Binary data storage](https://github.com/kumarmageshr/n8n/blob/master/packages/core/src/binary-data/file-system.manager.ts): `packages/core/src/binary-data/file-system.manager.ts`

### Nodes and integrations

- [Cloud storage node](https://github.com/kumarmageshr/n8n/blob/master/packages/nodes-base/nodes/Google/CloudStorage/GoogleCloudStorage.node.ts): `packages/nodes-base/nodes/Google/CloudStorage/GoogleCloudStorage.node.ts`
- [Azure Storage node](https://github.com/kumarmageshr/n8n/blob/master/packages/nodes-base/nodes/Microsoft/Storage/AzureStorage.node.ts): `packages/nodes-base/nodes/Microsoft/Storage/AzureStorage.node.ts`

### Platform services

- [Workflow and execution data](https://github.com/kumarmageshr/n8n/tree/master/packages/%40n8n/db/src/entities): `packages/@n8n/db/src/entities`
- [OAuth2 client](https://github.com/kumarmageshr/n8n/blob/master/packages/%40n8n/client-oauth2/src/client-oauth2.ts): `packages/@n8n/client-oauth2/src/client-oauth2.ts`

### AI capabilities

- [AI workflow builder](https://github.com/kumarmageshr/n8n/blob/master/packages/%40n8n/ai-workflow-builder.ee/src/ai-workflow-builder-agent.service.ts): `packages/@n8n/ai-workflow-builder.ee/src/ai-workflow-builder-agent.service.ts`
- [Node search engine](https://github.com/kumarmageshr/n8n/blob/master/packages/%40n8n/ai-workflow-builder.ee/src/tools/engines/node-search-engine.ts): `packages/@n8n/ai-workflow-builder.ee/src/tools/engines/node-search-engine.ts`
- [LangChain memory node](https://github.com/kumarmageshr/n8n/blob/master/packages/%40n8n/nodes-langchain/nodes/memory/MemoryManager/MemoryManager.node.ts): `packages/@n8n/nodes-langchain/nodes/memory/MemoryManager/MemoryManager.node.ts`

### Other components

- **Technical user**
- **External services**

## Connections

- Technical user → Workflow editor: authors in (evidence: `README.md`)
- Workflow editor → Workflow API: manages workflows
- Workflow API → Workflow service: delegates (evidence: `packages/cli/src/workflows/workflows.controller.ts`)
- Workflow API → Workflow finder: looks up (evidence: `packages/cli/src/workflows/workflows.controller.ts`)
- Workflow API → Workflow execution service: starts runs (evidence: `packages/cli/src/workflows/workflows.controller.ts`)
- Workflow execution service → Execution service: records runs
- Execution service → Workflow and execution data: persists state
- Active workflows → Workflow execution service: manages activation
- Workflow execution service → Node execution context: executes nodes
- Webhook context → Node execution context: provides context (evidence: `packages/core/src/execution-engine/node-execution-context/webhook-context.ts`)
- Webhook context → Binary data storage: copies binary data (evidence: `packages/core/src/execution-engine/node-execution-context/webhook-context.ts`)
- Node execution context → Cloud storage node: runs node
- Cloud storage node → External services: accesses cloud storage
- Azure Storage node → External services: accesses Azure
- Azure Storage node → OAuth2 client: supports OAuth2
- Technical user → AI workflow builder: requests AI workflow
- AI workflow builder → Node search engine: searches nodes
- LangChain memory node → External services: uses AI ecosystem
