# mayanksingh-07/cyberchef architecture

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

- Interactive diagram: https://gitdiagram.com/mayanksingh-07/cyberchef
- Repository: https://github.com/mayanksingh-07/cyberchef

## Overview

CyberChef is a browser-based data transformation workbench, with a Node.js API as a second way to use its operations. The main user workflow is to provide input, compose a recipe, run it in the browser’s Chef worker, and inspect the resulting output. Its core models data as typed Dishes and executes configurable Operations; the large operation catalog covers encoding, cryptography, compression, parsing, image processing, and analysis. The README documents additional user features, including Magic detection, breakpoints, recipe sharing, and file handling. Some UI-to-worker wiring and feature implementations are unsampled, so those links rely only on documented behavior.

Main entry points: [`src/web/Manager.mjs`](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/Manager.mjs) (Event Manager), [`src/core/Dish.mjs`](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Dish.mjs) (Typed Dish), [`src/web/App.mjs`](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/App.mjs) (Application UI), [`src/core/Operation.mjs`](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Operation.mjs) (Operation Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser Workbench"]
  node_app["Application UI<br/>[App.mjs]"]
  node_manager["Event Manager<br/>[Manager.mjs]"]
  node_recipeui["Recipe Controls<br/>[RecipeWaiter.mjs]"]
  node_inputui["Input Handling<br/>[InputWaiter.mjs]"]
  node_outputui["Output Display<br/>[OutputWaiter.mjs]"]
  node_status["Status Display<br/>[statusBar.mjs]"]
  node_magic["Magic Detection"]
end

subgraph group_execution["Recipe Execution"]
  node_workerwaiter["Worker Coordination<br/>[WorkerWaiter.mjs]"]
  node_chefworker["Chef Worker<br/>[ChefWorker.js]"]
  node_chef["Recipe Engine<br/>[Chef.mjs]"]
  node_recipe["Recipe Model<br/>[Recipe.mjs]"]
  node_operation["Operation Model<br/>[Operation.mjs]"]
end

subgraph group_data["Typed Data"]
  node_dish["Typed Dish<br/>[Dish.mjs]"]
  node_dishworker["Dish Conversion<br/>[DishWorker.mjs]"]
  node_utils["Data Utilities<br/>[Utils.mjs]"]
  node_filetype["File Detection<br/>[FileType.mjs]"]
end

subgraph group_operations["Operation Catalog"]
  node_catalog["Operations Catalog"]
  node_libraries["Algorithm Libraries"]
end

subgraph group_node["Node Interface"]
  node_nodeapi["Node API<br/>[api.mjs]"]
  node_noderecipe["Node Recipe<br/>[NodeRecipe.mjs]"]
  node_nodedish["Node Dish<br/>[NodeDish.mjs]"]
end

node_analyst(("Analyst"))
node_external["External Services"]

node_analyst -->|"uses"| node_app
node_app -->|"configures"| node_manager
node_manager -->|"sets up"| node_inputui
node_manager -->|"sets up"| node_recipeui
node_manager -->|"sets up"| node_workerwaiter
node_app -.->|"shows results"| node_outputui
node_outputui -->|"updates"| node_status
node_manager -->|"registers worker"| node_magic
node_workerwaiter -->|"dispatches work"| node_chefworker
node_chefworker -->|"delegates"| node_chef
node_chef -->|"executes"| node_recipe
node_chef -->|"uses"| node_dish
node_recipe -.->|"runs steps"| node_operation
node_operation -->|"converts data"| node_dish
node_dish -->|"uses"| node_utils
node_dish -->|"detects type"| node_filetype
node_dishworker -->|"converts"| node_dish
node_catalog -.->|"provides operations"| node_operation
node_operation -.->|"uses algorithms"| node_libraries
node_nodeapi -->|"creates recipe"| node_noderecipe
node_nodeapi -->|"returns dish"| node_nodedish
node_noderecipe -->|"executes recipe"| node_nodeapi
node_analyst -->|"uses API"| node_nodeapi
node_magic -->|"runs detection"| node_chefworker
node_app -.->|"requests data"| node_external

click node_app "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/App.mjs"
click node_manager "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/Manager.mjs"
click node_recipeui "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/RecipeWaiter.mjs"
click node_inputui "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/InputWaiter.mjs"
click node_outputui "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/OutputWaiter.mjs"
click node_status "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/utils/statusBar.mjs"
click node_magic "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/BackgroundWorkerWaiter.mjs"
click node_workerwaiter "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/WorkerWaiter.mjs"
click node_chefworker "https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/ChefWorker.js"
click node_chef "https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Chef.mjs"
click node_recipe "https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Recipe.mjs"
click node_operation "https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Operation.mjs"
click node_dish "https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Dish.mjs"
click node_dishworker "https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/workers/DishWorker.mjs"
click node_utils "https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Utils.mjs"
click node_filetype "https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/lib/FileType.mjs"
click node_catalog "https://github.com/mayanksingh-07/cyberchef/tree/master/src/core/operations"
click node_libraries "https://github.com/mayanksingh-07/cyberchef/tree/master/src/core/lib"
click node_nodeapi "https://github.com/mayanksingh-07/cyberchef/blob/master/src/node/api.mjs"
click node_noderecipe "https://github.com/mayanksingh-07/cyberchef/blob/master/src/node/NodeRecipe.mjs"
click node_nodedish "https://github.com/mayanksingh-07/cyberchef/blob/master/src/node/NodeDish.mjs"

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,node_manager,node_recipeui,node_inputui,node_outputui,node_status,node_magic toneBlue
class node_workerwaiter,node_chefworker,node_chef,node_recipe,node_operation toneAmber
class node_dish,node_dishworker,node_utils,node_filetype toneMint
class node_catalog,node_libraries toneRose
class node_nodeapi,node_noderecipe,node_nodedish,node_analyst,node_external toneIndigo
```

## Components

### Browser Workbench

- [Application UI](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/App.mjs): `src/web/App.mjs`
- [Event Manager](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/Manager.mjs): `src/web/Manager.mjs`
- [Recipe Controls](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/RecipeWaiter.mjs): `src/web/waiters/RecipeWaiter.mjs`
- [Input Handling](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/InputWaiter.mjs): `src/web/waiters/InputWaiter.mjs`
- [Output Display](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/OutputWaiter.mjs): `src/web/waiters/OutputWaiter.mjs`
- [Status Display](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/utils/statusBar.mjs): `src/web/utils/statusBar.mjs`
- [Magic Detection](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/BackgroundWorkerWaiter.mjs): `src/web/waiters/BackgroundWorkerWaiter.mjs`

### Recipe Execution

- [Worker Coordination](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/waiters/WorkerWaiter.mjs): `src/web/waiters/WorkerWaiter.mjs`
- [Chef Worker](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/ChefWorker.js): `src/core/ChefWorker.js`
- [Recipe Engine](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Chef.mjs): `src/core/Chef.mjs`
- [Recipe Model](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Recipe.mjs): `src/core/Recipe.mjs`
- [Operation Model](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Operation.mjs): `src/core/Operation.mjs`

### Typed Data

- [Typed Dish](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Dish.mjs): `src/core/Dish.mjs`
- [Dish Conversion](https://github.com/mayanksingh-07/cyberchef/blob/master/src/web/workers/DishWorker.mjs): `src/web/workers/DishWorker.mjs`
- [Data Utilities](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/Utils.mjs): `src/core/Utils.mjs`
- [File Detection](https://github.com/mayanksingh-07/cyberchef/blob/master/src/core/lib/FileType.mjs): `src/core/lib/FileType.mjs`

### Operation Catalog

- [Operations Catalog](https://github.com/mayanksingh-07/cyberchef/tree/master/src/core/operations): `src/core/operations`
- [Algorithm Libraries](https://github.com/mayanksingh-07/cyberchef/tree/master/src/core/lib): `src/core/lib`

### Node Interface

- [Node API](https://github.com/mayanksingh-07/cyberchef/blob/master/src/node/api.mjs): `src/node/api.mjs`
- [Node Recipe](https://github.com/mayanksingh-07/cyberchef/blob/master/src/node/NodeRecipe.mjs): `src/node/NodeRecipe.mjs`
- [Node Dish](https://github.com/mayanksingh-07/cyberchef/blob/master/src/node/NodeDish.mjs): `src/node/NodeDish.mjs`

### Other components

- **Analyst**
- **External Services**

## Connections

- Analyst → Application UI: uses
- Application UI → Event Manager: configures (evidence: `src/web/App.mjs`)
- Event Manager → Input Handling: sets up (evidence: `src/web/Manager.mjs`)
- Event Manager → Recipe Controls: sets up (evidence: `src/web/Manager.mjs`)
- Event Manager → Worker Coordination: sets up (evidence: `src/web/Manager.mjs`)
- Application UI → Output Display: shows results
- Output Display → Status Display: updates (evidence: `src/web/waiters/OutputWaiter.mjs`)
- Event Manager → Magic Detection: registers worker (evidence: `src/web/Manager.mjs`)
- Worker Coordination → Chef Worker: dispatches work (evidence: `src/web/waiters/WorkerWaiter.mjs`)
- Chef Worker → Recipe Engine: delegates (evidence: `src/core/ChefWorker.js`)
- Recipe Engine → Recipe Model: executes (evidence: `src/core/Chef.mjs`)
- Recipe Engine → Typed Dish: uses (evidence: `src/core/Chef.mjs`)
- Recipe Model → Operation Model: runs steps
- Operation Model → Typed Dish: converts data (evidence: `src/core/Operation.mjs`)
- Typed Dish → Data Utilities: uses (evidence: `src/core/Dish.mjs`)
- Typed Dish → File Detection: detects type (evidence: `src/core/Dish.mjs`)
- Dish Conversion → Typed Dish: converts (evidence: `src/web/workers/DishWorker.mjs`)
- Operations Catalog → Operation Model: provides operations (evidence: `src/core/operations/HASSHClientFingerprint.mjs`)
- Operation Model → Algorithm Libraries: uses algorithms
- Node API → Node Recipe: creates recipe (evidence: `src/node/api.mjs`)
- Node API → Node Dish: returns dish (evidence: `src/node/api.mjs`)
- Node Recipe → Node API: executes recipe (evidence: `src/node/NodeRecipe.mjs`)
- Analyst → Node API: uses API
- Magic Detection → Chef Worker: runs detection (evidence: `src/web/waiters/BackgroundWorkerWaiter.mjs`)
- Application UI → External Services: requests data
