# stopnerfacaci/datt_hellkitchen architecture

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

- Interactive diagram: https://gitdiagram.com/stopnerfacaci/datt_hellkitchen
- Repository: https://github.com/stopnerfacaci/datt_hellkitchen

## Overview

##### Project type and purpose
- This is a Unity-based full game project (“Kitchen2”), implementing a real-time, multiplayer cooking simulator.
- It uses Unity Scenes, Prefabs, MonoBehaviour scripts, ScriptableObjects (SO) for data, the new Input System, URP graphics, and Unity Netcode for GameObjects for networking.

##### File structure
- Top-level Unity essentials:
– Assets/Scenes: Scene files (CharacterSelect, LevelSelect, Level_1…6, Lobby, Loading, MainMenu, etc.)
– Assets/Prefabs: game object templates (Counters, KitchenObjects, UI elements, Player, etc.)
– Assets/Scripts: C# scripts organized into feature directories (Managers, Multiplayer, UI, Counter, Kitchen Object, Player, SO)
– Assets/Scripts/SO: ScriptableObject data (recipes, kitchen object definitions, audio refs)
– Packages/manifest.json: Unity packages (Netcode, Input System, URP)
– ProjectSettings: Unity project configuration (graphics, input, render pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Top-level
    UnityEngine["Unity Engine (Runtime Host)"]:::external
    Scenes["Scenes"]:::frontend
    Loader["Loader"]:::frontend
    Prefabs["Asset/Prefab Repository"]:::dataassets
    DataLayer["Data Layer (ScriptableObjects)"]:::dataassets
    InputActions["Actions.inputactions"]:::uiinput
    GameInput["GameInput.cs"]:::uiinput
    subgraph "Gameplay Domain Layer"
        Managers["Managers"]:::gameplay
        subgraph "Domain Entities"
            Counters["Counters"]:::gameplay
            KitchenObjects["KitchenObjects"]:::gameplay
            Players["Players"]:::gameplay
        end
    end
    UILayer["UI Layer"]:::uiinput
    subgraph "Networking Layer"
        Netcode["KitchenGameMultiplayer"]:::networking
        TransformSync["ClientNetworkTransform"]:::networking
        AnimatorSync["OwnerNetworkAnimator"]:::networking
    end
    External["External Services (Relay/Lobby)"]:::external

    %% Connections
    UnityEngine --> Scenes
    UnityEngine --> Loader
    UnityEngine --> Prefabs
    UnityEngine --> DataLayer
    UnityEngine --> InputActions
    UnityEngine --> GameInput
    Scenes -->|LoadScene→InstantiateManagers| Managers
    Loader -->|calls| Managers
    Loader -->|calls| UILayer
    Prefabs -->|instantiates| Managers
    Prefabs -->|instantiates| Players
    Prefabs -->|instantiates| KitchenObjects
    Prefabs -->|instantiates| Counters
    DataLayer -.->|Read:RecipeSO etc.| Managers
    DataLayer -.->|Read:KitchenObjectSO| KitchenObjects
    DataLayer -.->|Read:AudioClipRefsSO| Managers
    InputActions -->|input| GameInput
    GameInput -->|controls| Players
    Managers -->|spawn/move| Counters
    Managers -->|spawn/move| KitchenObjects
    Managers -->|coordinate| Players
    UILayer <-->|events/status| Managers
    Netcode -->|RPCs/SyncVars| Managers
    Netcode -->|sync transforms| TransformSync
    Netcode -->|sync animations| AnimatorSync
    External -->|provides relay/lobby| Netcode

    %% Click Events
    click UnityEngine "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/ProjectSettings"
    click UnityEngine "https://github.com/stopnerfacaci/datt_hellkitchen/blob/main/Packages/manifest.json"
    click Scenes "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/Assets/Scenes"
    click Loader "https://github.com/stopnerfacaci/datt_hellkitchen/blob/main/Assets/Scripts/Loader.cs"
    click Prefabs "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/Assets/Prefabs"
    click Managers "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/Assets/Scripts/Managers"
    click Counters "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/Assets/Scripts/Counter"
    click KitchenObjects "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/Assets/Scripts/Kitchen Object"
    click Players "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/Assets/Scripts/Player"
    click UILayer "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/Assets/Scripts/UI"
    click DataLayer "https://github.com/stopnerfacaci/datt_hellkitchen/tree/main/Assets/Scripts/SO"
    click InputActions "https://github.com/stopnerfacaci/datt_hellkitchen/blob/main/Assets/Actions.inputactions"
    click GameInput "https://github.com/stopnerfacaci/datt_hellkitchen/blob/main/Assets/Scripts/Player/GameInput.cs"
    click Netcode "https://github.com/stopnerfacaci/datt_hellkitchen/blob/main/Assets/Scripts/Multiplayer/KitchenGameMultiplayer.cs"
    click TransformSync "https://github.com/stopnerfacaci/datt_hellkitchen/blob/main/Assets/Scripts/Multiplayer/ClientNetworkTransform.cs"
    click AnimatorSync "https://github.com/stopnerfacaci/datt_hellkitchen/blob/main/Assets/Scripts/Multiplayer/OwnerNetworkAnimator.cs"

    %% Styles
    classDef dataassets fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef gameplay fill:#90EE90,stroke:#000,stroke-width:1px
    classDef uiinput fill:#FFA500,stroke:#000,stroke-width:1px
    classDef networking fill:#DDA0DD,stroke:#000,stroke-width:1px
    classDef external fill:#D3D3D3,stroke:#000,stroke-width:1px
```
