# funcfusion/mc-dp-icons architecture

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

- Interactive diagram: https://gitdiagram.com/funcfusion/mc-dp-icons
- Repository: https://github.com/funcfusion/mc-dp-icons

## Overview

Datapack Icons is a VS Code icon-theme extension. Its main workflow detects or watches a workspace, collects Java datapack and Bedrock-specific dynamic mappings, combines them with the static Minecraft icon catalog, and writes an active theme. Settings and commands configure the experience; documented features also include special function, namespace, overlay, nested-file, Christmas, and folder-arrow icons. Some subsystem links are documented rather than visible in sampled implementation, so those edges are dashed.

Main entry points: [`src/dynamicIcons/index.ts`](https://github.com/funcfusion/mc-dp-icons/blob/main/src/dynamicIcons/index.ts) (Dynamic theme update), [`src/extension.ts`](https://github.com/funcfusion/mc-dp-icons/blob/main/src/extension.ts) (Extension entry), [`src/configuration/configManager.ts`](https://github.com/funcfusion/mc-dp-icons/blob/main/src/configuration/configManager.ts) (Configuration), [`src/dynamicIcons/utils.ts`](https://github.com/funcfusion/mc-dp-icons/blob/main/src/dynamicIcons/utils.ts) (File and tag matching)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_activation["Extension activation"]
  node_activation["Extension entry<br/>[extension.ts]"]
  node_watcher["Workspace watcher<br/>[watcher.ts]"]
  node_commands["Commands<br/>[index.ts]"]
end

subgraph group_catalog["Static icon theme"]
  node_iconcatalog["Icon definitions"]
  node_basegeneration["Base theme generation<br/>[baseTheme.ts]"]
end

subgraph group_dynamic["Dynamic icons"]
  node_workspace["Workspace detection<br/>[workspace.ts]"]
  node_java["Java pack icons"]
  node_bedrock["Bedrock pack icons"]
  node_dynamicutils["File and tag matching<br/>[utils.ts]"]
  node_dynamicentry["Dynamic theme update<br/>[index.ts]"]
end

subgraph group_output["Theme output"]
  node_themebuilder["Theme builder<br/>[themeBuilder.ts]"]
  node_activefile["Active theme file"]
end

subgraph group_settings["Settings and commands"]
  node_config["Configuration<br/>[configManager.ts]"]
  node_iconcommands["Custom icon assignment<br/>[setIcon.ts]"]
  node_prompts["Workspace warnings"]
  node_logger["Diagnostic logging<br/>[logger.ts]"]
end

node_developer(("VS Code user"))
node_vscode["VS Code"]

node_developer -->|"uses"| node_vscode
node_vscode -.->|"activates"| node_activation
node_activation -->|"starts updates"| node_dynamicentry
node_activation -.->|"creates watcher"| node_watcher
node_activation -->|"registers commands"| node_commands
node_watcher -.->|"requests refresh"| node_dynamicentry
node_dynamicentry -->|"checks workspace"| node_workspace
node_dynamicentry -->|"collects mappings"| node_java
node_dynamicentry -->|"collects mappings"| node_bedrock
node_java -->|"uses helpers"| node_dynamicutils
node_bedrock -->|"uses helpers"| node_dynamicutils
node_java -->|"provides mappings"| node_dynamicentry
node_bedrock -->|"provides mappings"| node_dynamicentry
node_dynamicentry -->|"adds mappings"| node_themebuilder
node_iconcatalog -->|"supplies definitions"| node_basegeneration
node_basegeneration -.->|"provides base schema"| node_themebuilder
node_themebuilder -->|"writes theme"| node_activefile
node_config -->|"controls detection"| node_workspace
node_config -->|"controls icon options"| node_dynamicutils
node_config -->|"controls theme settings"| node_themebuilder
node_developer -.->|"assigns custom icons"| node_commands
node_commands -->|"registers handlers"| node_iconcommands
node_iconcommands -->|"updates settings"| node_config
node_dynamicutils -->|"warns on large packs"| node_prompts
node_dynamicentry -->|"logs updates"| node_logger

click node_activation "https://github.com/funcfusion/mc-dp-icons/blob/main/src/extension.ts"
click node_watcher "https://github.com/funcfusion/mc-dp-icons/blob/main/src/watcher.ts"
click node_commands "https://github.com/funcfusion/mc-dp-icons/blob/main/src/commands/index.ts"
click node_workspace "https://github.com/funcfusion/mc-dp-icons/blob/main/src/dynamicIcons/workspace.ts"
click node_java "https://github.com/funcfusion/mc-dp-icons/tree/main/src/dynamicIcons/java"
click node_bedrock "https://github.com/funcfusion/mc-dp-icons/tree/main/src/dynamicIcons/bedrock"
click node_dynamicutils "https://github.com/funcfusion/mc-dp-icons/blob/main/src/dynamicIcons/utils.ts"
click node_config "https://github.com/funcfusion/mc-dp-icons/blob/main/src/configuration/configManager.ts"
click node_iconcommands "https://github.com/funcfusion/mc-dp-icons/blob/main/src/commands/setIcon.ts"
click node_iconcatalog "https://github.com/funcfusion/mc-dp-icons/tree/main/src/data/icons"
click node_basegeneration "https://github.com/funcfusion/mc-dp-icons/blob/main/src/generate/baseTheme.ts"
click node_themebuilder "https://github.com/funcfusion/mc-dp-icons/blob/main/src/theme/themeBuilder.ts"
click node_dynamicentry "https://github.com/funcfusion/mc-dp-icons/blob/main/src/dynamicIcons/index.ts"
click node_prompts "https://github.com/funcfusion/mc-dp-icons/blob/main/src/prompts/tooManyFilesPrompt.ts"
click node_logger "https://github.com/funcfusion/mc-dp-icons/blob/main/src/common/logger.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_activation,node_watcher,node_commands,node_developer toneBlue
class node_iconcatalog,node_basegeneration toneAmber
class node_workspace,node_java,node_bedrock,node_dynamicutils,node_dynamicentry toneMint
class node_themebuilder,node_activefile toneRose
class node_config,node_iconcommands,node_prompts,node_logger,node_vscode toneIndigo
```

## Components

### Extension activation

- [Extension entry](https://github.com/funcfusion/mc-dp-icons/blob/main/src/extension.ts): `src/extension.ts`
- [Workspace watcher](https://github.com/funcfusion/mc-dp-icons/blob/main/src/watcher.ts): `src/watcher.ts`
- [Commands](https://github.com/funcfusion/mc-dp-icons/blob/main/src/commands/index.ts): `src/commands/index.ts`

### Static icon theme

- [Icon definitions](https://github.com/funcfusion/mc-dp-icons/tree/main/src/data/icons): `src/data/icons`
- [Base theme generation](https://github.com/funcfusion/mc-dp-icons/blob/main/src/generate/baseTheme.ts): `src/generate/baseTheme.ts`

### Dynamic icons

- [Workspace detection](https://github.com/funcfusion/mc-dp-icons/blob/main/src/dynamicIcons/workspace.ts): `src/dynamicIcons/workspace.ts`
- [Java pack icons](https://github.com/funcfusion/mc-dp-icons/tree/main/src/dynamicIcons/java): `src/dynamicIcons/java`
- [Bedrock pack icons](https://github.com/funcfusion/mc-dp-icons/tree/main/src/dynamicIcons/bedrock): `src/dynamicIcons/bedrock`
- [File and tag matching](https://github.com/funcfusion/mc-dp-icons/blob/main/src/dynamicIcons/utils.ts): `src/dynamicIcons/utils.ts`
- [Dynamic theme update](https://github.com/funcfusion/mc-dp-icons/blob/main/src/dynamicIcons/index.ts): `src/dynamicIcons/index.ts`

### Theme output

- [Theme builder](https://github.com/funcfusion/mc-dp-icons/blob/main/src/theme/themeBuilder.ts): `src/theme/themeBuilder.ts`
- **Active theme file**

### Settings and commands

- [Configuration](https://github.com/funcfusion/mc-dp-icons/blob/main/src/configuration/configManager.ts): `src/configuration/configManager.ts`
- [Custom icon assignment](https://github.com/funcfusion/mc-dp-icons/blob/main/src/commands/setIcon.ts): `src/commands/setIcon.ts`
- [Workspace warnings](https://github.com/funcfusion/mc-dp-icons/blob/main/src/prompts/tooManyFilesPrompt.ts): `src/prompts/tooManyFilesPrompt.ts`
- [Diagnostic logging](https://github.com/funcfusion/mc-dp-icons/blob/main/src/common/logger.ts): `src/common/logger.ts`

### Other components

- **VS Code user**
- **VS Code**

## Connections

- VS Code user → VS Code: uses (evidence: `README.md`)
- VS Code → Extension entry: activates
- Extension entry → Dynamic theme update: starts updates (evidence: `src/extension.ts`)
- Extension entry → Workspace watcher: creates watcher (evidence: `src/extension.ts`)
- Extension entry → Commands: registers commands (evidence: `src/extension.ts`)
- Workspace watcher → Dynamic theme update: requests refresh
- Dynamic theme update → Workspace detection: checks workspace (evidence: `src/dynamicIcons/index.ts`)
- Dynamic theme update → Java pack icons: collects mappings (evidence: `src/dynamicIcons/index.ts`)
- Dynamic theme update → Bedrock pack icons: collects mappings (evidence: `src/dynamicIcons/index.ts`)
- Java pack icons → File and tag matching: uses helpers (evidence: `src/dynamicIcons/java/index.ts`)
- Bedrock pack icons → File and tag matching: uses helpers (evidence: `src/dynamicIcons/bedrock/index.ts`)
- Java pack icons → Dynamic theme update: provides mappings (evidence: `src/dynamicIcons/index.ts`)
- Bedrock pack icons → Dynamic theme update: provides mappings (evidence: `src/dynamicIcons/index.ts`)
- Dynamic theme update → Theme builder: adds mappings (evidence: `src/dynamicIcons/index.ts`)
- Icon definitions → Base theme generation: supplies definitions (evidence: `src/generate/baseTheme.ts`)
- Base theme generation → Theme builder: provides base schema
- Theme builder → Active theme file: writes theme (evidence: `src/theme/themeBuilder.ts`)
- Configuration → Workspace detection: controls detection (evidence: `src/dynamicIcons/workspace.ts`)
- Configuration → File and tag matching: controls icon options (evidence: `src/dynamicIcons/utils.ts`)
- Configuration → Theme builder: controls theme settings (evidence: `src/theme/themeBuilder.ts`)
- VS Code user → Commands: assigns custom icons (evidence: `README.md`)
- Commands → Custom icon assignment: registers handlers (evidence: `src/commands/index.ts`)
- Custom icon assignment → Configuration: updates settings (evidence: `src/commands/setIcon.ts`)
- File and tag matching → Workspace warnings: warns on large packs (evidence: `src/dynamicIcons/utils.ts`)
- Dynamic theme update → Diagnostic logging: logs updates (evidence: `src/dynamicIcons/index.ts`)
