# naolshow/sacados architecture

> Architecture diagram of the GitHub repository naolshow/sacados, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/naolshow/sacados
- Repository: https://github.com/naolshow/sacados

## Overview

##### Main Components Identification

The system should be represented with these key components:

a) Core Inventory System:
- Container Management
- Item Management
- Slot Management
- UI System

b) Networking Layer:
- Network Synchronization
- State Management

c) Editor Tools:
- Container Editor
- Inspector Integration

**[Client Layer]**

- UI System (IContainerUI, ISlotUI)
- UI Implementation (SlotUI, ClassicContainerUI)

**[Core Layer]**

- Container System
- IContainer Interface
- ISlot Interface
- IStackContainer Interface

- Item System
- Item Base
- ItemStack

**[Network Layer]**

- NetworkStandardList
- Netcode for GameObjects Integration

##### Key Relationships to Highlight

- Relationship between Containers and Slots
- How the UI system interfaces with the core container system
- Demonstrate the network synchronization flow
- How the editor tools integrate with the core system

##### Implementation Details

- Container event system
- Extension methods for containers, slots, and items
- Sample implementation patterns
- Editor tooling integration points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        UI[UI System]
        ContainerUI[IContainerUI]:::interface
        SlotUI[ISlotUI]:::interface
        ClassicUI[ClassicContainerUI]:::implementation
        SlotUIImpl[SlotUI Implementation]:::implementation
    end

    subgraph Core
        Container[Container System]
        IContainer[IContainer]:::interface
        ContainerImpl[Container]:::implementation
        IStackContainer[IStackContainer]:::interface
        
        Slot[Slot System]
        ISlot[ISlot]:::interface
        SlotImpl[Slot]:::implementation
        
        Item[Item System]
        ItemBase[Item Base]:::implementation
        ItemStack[ItemStack]:::implementation
        
        Extensions[Extension System]
        ContainerExt[Container Extensions]:::implementation
        SlotExt[Slot Extensions]:::implementation
        ItemExt[Item Extensions]:::implementation
        ItemStackExt[ItemStack Extensions]:::implementation
    end

    subgraph Network
        NetSync[Network Synchronization]
        NetList[NetworkStandardList]:::implementation
    end

    subgraph Editor
        ContainerEditor[Container Editor]:::editor
        InspectorInt[Inspector Integration]:::editor
        ItemSelection[Item Selection]:::editor
    end

    subgraph Samples
        FixedContainer[Fixed Size Container]:::sample
        FlexibleContainer[Flexible Size Container]:::sample
    end

    %% Relationships
    UI --> ContainerUI & SlotUI
    ContainerUI --> ClassicUI
    SlotUI --> SlotUIImpl
    
    Container --> IContainer & IStackContainer
    IContainer --> ContainerImpl
    
    Slot --> ISlot
    ISlot --> SlotImpl
    
    Item --> ItemBase & ItemStack
    
    Extensions --> ContainerExt & SlotExt & ItemExt & ItemStackExt
    
    NetSync --> NetList
    
    %% Click events
    click Container "https://github.com/NaolShow/Sacados/tree/main/Assets/Sacados/Containers/"
    click IContainer "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Containers/IContainer.cs"
    click ContainerImpl "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Containers/Container.cs"
    click IStackContainer "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Containers/IStackContainer.cs"
    click ISlot "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Containers/ISlot.cs"
    click SlotImpl "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Containers/Slot.cs"
    click ContainerUI "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Containers/UI/IContainerUI.cs"
    click SlotUI "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Containers/UI/ISlotUI.cs"
    click SlotUIImpl "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Containers/UI/SlotUI.cs"
    click ItemBase "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Items/Item.cs"
    click ItemStack "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Items/ItemStack.cs"
    click NetList "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Network/NetworkStandardList.cs"
    click ContainerEditor "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Editor/ContainerEditorWindow.cs"
    click InspectorInt "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Editor/ContainerInspector.cs"
    click ItemSelection "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Editor/ItemDropDown.cs"
    click ContainerExt "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Extensions/IContainerExtensions.cs"
    click SlotExt "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Extensions/ISlotExtensions.cs"
    click ItemExt "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Extensions/ItemExtensions.cs"
    click ItemStackExt "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Extensions/ItemStackExtensions.cs"
    click FixedContainer "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Samples/Fixed Size/Scripts/FixedSizeContainer.cs"
    click FlexibleContainer "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Samples/Flexible Size/Scripts/FlexibleSizeContainer.cs"
    click ClassicUI "https://github.com/NaolShow/Sacados/blob/main/Assets/Sacados/Samples/Common/Scripts/ClassicContainerUI.cs"

    %% Styling
    classDef interface fill:#f9f,stroke:#333,stroke-width:2px
    classDef implementation fill:#bbf,stroke:#333,stroke-width:2px
    classDef editor fill:#fbb,stroke:#333,stroke-width:2px
    classDef sample fill:#bfb,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[Interface]:::interface
        L2[Implementation]:::implementation
        L3[Editor Tool]:::editor
        L4[Sample]:::sample
    end
```
