# herobrine643928/chest-ui architecture

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

- Interactive diagram: https://gitdiagram.com/herobrine643928/chest-ui
- Repository: https://github.com/herobrine643928/chest-ui
- Video tour (about a minute): https://gitdiagram.com/herobrine643928/chest-ui/video

## Overview

Chest-UI is a Minecraft: Bedrock Script API pack for building chest- and furnace-styled action forms. Its example workflow starts when a player uses a compass, opens a chest menu, and handles the selection; the example can open a furnace menu and return to the chest menu. The form builders format item labels, lore, stack counts and durability, then show the form and return a response. The resource pack supplies layouts and textures. README capabilities include inventory display, custom sizes, patterns and custom item mappings; unsampled UI configuration links are based on the tree and README, not inspected source.

Main entry points: [`BP/scripts/extensions/forms.js`](https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/forms.js) (Chest form builder), [`BP/scripts/index.js`](https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/index.js) (Example event menus), [`RP/ui/chest_server_form.json`](https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/chest_server_form.json) (Chest layout), [`RP/ui/_global_variables.json`](https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/_global_variables.json) (UI settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_example["Example workflow"]
  node_index["Example event menus<br/>[index.js]"]
end

subgraph group_builders["Form builders"]
  node_chest["Chest form builder<br/>[forms.js]"]
  node_furnace["Furnace form builder<br/>[forms.js]"]
  node_constants["Sizes and item config<br/>[constants.js]"]
  node_ids["Texture ID maps<br/>[typeIds.js]"]
end

subgraph group_resourcepack["Resource pack"]
  node_chestlayout["Chest layout"]
  node_furnacelayout["Furnace layout"]
  node_inventorylayout["Inventory section"]
  node_uiglobals["UI settings"]
  node_uidefs["UI definitions<br/>[_ui_defs.json]"]
  node_textures["UI textures"]
end

node_player(("Player"))
node_bedrock["Bedrock Script API"]
node_actionforms["Action forms"]

node_player -->|"uses item"| node_bedrock
node_bedrock -->|"dispatches event"| node_index
node_index -->|"builds menu"| node_chest
node_index -->|"builds menu"| node_furnace
node_chest -->|"reads config"| node_constants
node_furnace -->|"reads config"| node_constants
node_chest -->|"maps icons"| node_ids
node_furnace -->|"maps icons"| node_ids
node_chest -->|"creates and shows"| node_actionforms
node_furnace -->|"creates and shows"| node_actionforms
node_actionforms -->|"shows form"| node_player
node_player -->|"selects button"| node_actionforms
node_actionforms -->|"returns response"| node_index
node_uiglobals -->|"configures layouts"| node_chestlayout
node_uiglobals -->|"configures section"| node_inventorylayout
node_uidefs -->|"defines UI"| node_chestlayout
node_uidefs -->|"defines UI"| node_furnacelayout
node_textures -->|"supplies visuals"| node_chestlayout
node_textures -->|"supplies visuals"| node_furnacelayout

click node_index "https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/index.js"
click node_chest "https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/forms.js"
click node_furnace "https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/forms.js"
click node_constants "https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/constants.js"
click node_ids "https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/typeIds.js"
click node_chestlayout "https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/chest_server_form.json"
click node_furnacelayout "https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/furnace_server_form.json"
click node_inventorylayout "https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/chest_inventory_system.json"
click node_uiglobals "https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/_global_variables.json"
click node_uidefs "https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/_ui_defs.json"
click node_textures "https://github.com/herobrine643928/chest-ui/tree/main/RP/textures/ui"

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_index toneBlue
class node_chest,node_furnace,node_constants,node_ids toneAmber
class node_chestlayout,node_furnacelayout,node_inventorylayout,node_uiglobals,node_uidefs,node_textures,node_bedrock toneMint
class node_player,node_actionforms toneIndigo
```

## Components

### Example workflow

- [Example event menus](https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/index.js): `BP/scripts/index.js`

### Form builders

- [Chest form builder](https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/forms.js): `BP/scripts/extensions/forms.js`
- [Furnace form builder](https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/forms.js): `BP/scripts/extensions/forms.js`
- [Sizes and item config](https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/constants.js): `BP/scripts/extensions/constants.js`
- [Texture ID maps](https://github.com/herobrine643928/chest-ui/blob/main/BP/scripts/extensions/typeIds.js): `BP/scripts/extensions/typeIds.js`

### Resource pack

- [Chest layout](https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/chest_server_form.json): `RP/ui/chest_server_form.json`
- [Furnace layout](https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/furnace_server_form.json): `RP/ui/furnace_server_form.json`
- [Inventory section](https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/chest_inventory_system.json): `RP/ui/chest_inventory_system.json`
- [UI settings](https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/_global_variables.json): `RP/ui/_global_variables.json`
- [UI definitions](https://github.com/herobrine643928/chest-ui/blob/main/RP/ui/_ui_defs.json): `RP/ui/_ui_defs.json`
- [UI textures](https://github.com/herobrine643928/chest-ui/tree/main/RP/textures/ui): `RP/textures/ui`

### Other components

- **Player**
- **Bedrock Script API**
- **Action forms**

## Connections

- Player → Bedrock Script API: uses item
- Bedrock Script API → Example event menus: dispatches event
- Example event menus → Chest form builder: builds menu
- Example event menus → Furnace form builder: builds menu
- Chest form builder → Sizes and item config: reads config
- Furnace form builder → Sizes and item config: reads config
- Chest form builder → Texture ID maps: maps icons
- Furnace form builder → Texture ID maps: maps icons
- Chest form builder → Action forms: creates and shows
- Furnace form builder → Action forms: creates and shows
- Action forms → Player: shows form
- Player → Action forms: selects button
- Action forms → Example event menus: returns response
- UI settings → Chest layout: configures layouts
- UI settings → Inventory section: configures section
- UI definitions → Chest layout: defines UI
- UI definitions → Furnace layout: defines UI
- UI textures → Chest layout: supplies visuals
- UI textures → Furnace layout: supplies visuals
