# langxiyi/inventorymanager architecture

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

- Interactive diagram: https://gitdiagram.com/langxiyi/inventorymanager
- Repository: https://github.com/langxiyi/inventorymanager

## Overview

InventoryManager is an Unreal Engine inventory system built around replicated UObject item instances and composable inventory modules. The principal flow is player/controller requests modifying an inventory component, which manages item instances and container modules; the grid extension adds position- and size-aware placement. Item definitions provide fragment-based configuration, while pickable world items and inventory widgets expose interaction and presentation capabilities. Edges are limited to README documentation and shown/indexed references; unsampled implementations and wiring are not inferred.

Main entry points: [`Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp`](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp) (Inventory controller), [`Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryComponent.cpp`](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryComponent.cpp) (Inventory component), [`Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_InventoryItemDefinition.h`](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_InventoryItemDefinition.h) (Item definitions), [`Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_GridInventoryControllerComponent.cpp`](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_GridInventoryControllerComponent.cpp) (Grid controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Inventory core"]
  node_controller["Inventory controller"]
  node_inventory["Inventory component"]
  node_modules["Container modules"]
  node_inventory_objects["Inventory objects"]
  node_content_mapping["Content mapping"]
end

subgraph group_items["Items and world"]
  node_item_definitions["Item definitions"]
  node_item_fragments["Definition fragments"]
  node_item_instances["Item instances"]
  node_pickables["Pickable items"]
  node_storage_bin["Storage bin"]
end

subgraph group_grid["Grid extension"]
  node_grid_controller["Grid controller"]
  node_grid_inventory["Grid inventory"]
  node_grid_modules["Grid container modules"]
  node_grid_positions["Grid item positions"]
end

subgraph group_messaging["UI and messaging"]
  node_inventory_hud["Inventory HUD"]
  node_inventory_widgets["Inventory widgets"]
  node_message_router["Gameplay message router"]
  node_async_listener["Async message listener"]
end

node_player(("Player"))

node_player -.->|"requests actions"| node_controller
node_controller -->|"invokes operations"| node_inventory
node_inventory -.->|"manages modules"| node_modules
node_inventory -.->|"builds objects"| node_inventory_objects
node_content_mapping -.->|"maps contents"| node_inventory_objects
node_item_definitions -->|"contains fragments"| node_item_fragments
node_item_definitions -.->|"configures instances"| node_item_instances
node_controller -->|"handles pickup"| node_pickables
node_grid_controller -->|"updates inventory"| node_grid_inventory
node_grid_controller -->|"checks placement"| node_grid_modules
node_grid_positions -.->|"stores position data"| node_grid_inventory
node_controller -->|"constructs HUD"| node_inventory_hud
node_inventory_hud -.->|"presents inventory"| node_inventory_widgets
node_controller -->|"broadcasts drag state"| node_message_router
node_async_listener -->|"registers listener"| node_message_router
node_storage_bin -.->|"stores inventory"| node_inventory

click node_controller "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp"
click node_inventory "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryComponent.cpp"
click node_modules "https://github.com/langxiyi/inventorymanager/tree/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InventoryObject/Fragment"
click node_inventory_objects "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InventoryObject/InvSys_BaseInventoryObject.cpp"
click node_content_mapping "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Data/InvSys_InventoryContentMapping.cpp"
click node_item_definitions "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_InventoryItemDefinition.h"
click node_item_fragments "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_ItemFragment_BaseItem.h"
click node_item_instances "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Data/InvSys_InventoryItemInstance.cpp"
click node_pickables "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Items/InvSys_PickableItems.cpp"
click node_storage_bin "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Items/InvSys_StorageBin.cpp"
click node_grid_controller "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_GridInventoryControllerComponent.cpp"
click node_grid_inventory "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_InventoryComponent.cpp"
click node_grid_modules "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/InventoryObject/Fragment/GridInvSys_InventoryModule_Container.cpp"
click node_grid_positions "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Public/GridInvSys_CommonType.h"
click node_inventory_hud "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Widgets/InvSys_InventoryHUD.cpp"
click node_inventory_widgets "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Widgets/InvSys_InventoryWidget.cpp"
click node_message_router "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GameplayMessageRouter/Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp"
click node_async_listener "https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GameplayMessageRouter/Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp"

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_controller,node_inventory,node_modules,node_inventory_objects,node_content_mapping toneBlue
class node_item_definitions,node_item_fragments,node_item_instances,node_pickables,node_storage_bin toneAmber
class node_grid_controller,node_grid_inventory,node_grid_modules,node_grid_positions toneMint
class node_inventory_hud,node_inventory_widgets,node_message_router,node_async_listener toneRose
class node_player toneIndigo
```

## Components

### Inventory core

- [Inventory controller](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp`
- [Inventory component](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryComponent.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryComponent.cpp`
- [Container modules](https://github.com/langxiyi/inventorymanager/tree/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InventoryObject/Fragment): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InventoryObject/Fragment`
- [Inventory objects](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InventoryObject/InvSys_BaseInventoryObject.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InventoryObject/InvSys_BaseInventoryObject.cpp`
- [Content mapping](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Data/InvSys_InventoryContentMapping.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Data/InvSys_InventoryContentMapping.cpp`

### Items and world

- [Item definitions](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_InventoryItemDefinition.h): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_InventoryItemDefinition.h`
- [Definition fragments](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_ItemFragment_BaseItem.h): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_ItemFragment_BaseItem.h`
- [Item instances](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Data/InvSys_InventoryItemInstance.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Data/InvSys_InventoryItemInstance.cpp`
- [Pickable items](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Items/InvSys_PickableItems.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Items/InvSys_PickableItems.cpp`
- [Storage bin](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Items/InvSys_StorageBin.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Items/InvSys_StorageBin.cpp`

### Grid extension

- [Grid controller](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_GridInventoryControllerComponent.cpp): `Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_GridInventoryControllerComponent.cpp`
- [Grid inventory](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_InventoryComponent.cpp): `Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_InventoryComponent.cpp`
- [Grid container modules](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/InventoryObject/Fragment/GridInvSys_InventoryModule_Container.cpp): `Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/InventoryObject/Fragment/GridInvSys_InventoryModule_Container.cpp`
- [Grid item positions](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GridInventorySystem/Source/GridInventorySystem/Public/GridInvSys_CommonType.h): `Plugins/GridInventorySystem/Source/GridInventorySystem/Public/GridInvSys_CommonType.h`

### UI and messaging

- [Inventory HUD](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Widgets/InvSys_InventoryHUD.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Widgets/InvSys_InventoryHUD.cpp`
- [Inventory widgets](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Widgets/InvSys_InventoryWidget.cpp): `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Widgets/InvSys_InventoryWidget.cpp`
- [Gameplay message router](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GameplayMessageRouter/Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp): `Plugins/GameplayMessageRouter/Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp`
- [Async message listener](https://github.com/langxiyi/inventorymanager/blob/master/Plugins/GameplayMessageRouter/Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp): `Plugins/GameplayMessageRouter/Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp`

### Other components

- **Player**

## Connections

- Player → Inventory controller: requests actions
- Inventory controller → Inventory component: invokes operations (evidence: `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp`)
- Inventory component → Container modules: manages modules
- Inventory component → Inventory objects: builds objects
- Content mapping → Inventory objects: maps contents
- Item definitions → Definition fragments: contains fragments (evidence: `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Public/Data/InvSys_InventoryItemDefinition.h`)
- Item definitions → Item instances: configures instances
- Inventory controller → Pickable items: handles pickup (evidence: `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp`)
- Grid controller → Grid inventory: updates inventory (evidence: `Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_GridInventoryControllerComponent.cpp`)
- Grid controller → Grid container modules: checks placement (evidence: `Plugins/GridInventorySystem/Source/GridInventorySystem/Private/Components/GridInvSys_GridInventoryControllerComponent.cpp`)
- Grid item positions → Grid inventory: stores position data (evidence: `Plugins/GridInventorySystem/Source/GridInventorySystem/Public/GridInvSys_CommonType.h`)
- Inventory controller → Inventory HUD: constructs HUD (evidence: `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp`)
- Inventory HUD → Inventory widgets: presents inventory
- Inventory controller → Gameplay message router: broadcasts drag state (evidence: `Plugins/BaseInventorySystem/Source/BaseInventorySystem/Private/Components/InvSys_InventoryControllerComponent.cpp`)
- Async message listener → Gameplay message router: registers listener
- Storage bin → Inventory component: stores inventory
