# vasylkhreptak/projecttemplate architecture

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

- Interactive diagram: https://gitdiagram.com/vasylkhreptak/projecttemplate
- Repository: https://github.com/vasylkhreptak/projecttemplate

## Overview

This is a reusable Unity project template: its documented workflow organizes application flow into project-, menu-, and gameplay-level state machines, each responsible for initialization and loading in its context. Global services live in a project scope, while scenes receive isolated scopes; VContainer provides dependency injection, and a centralized window system manages UI screens. The tree also contains reusable runtime plugins for audio, pooling, health, banks, and value properties. No application source excerpts were available, so links among those plugins and the documented app subsystems are not inferred.

Main entry points: [`Assets`](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets) (Project State Machine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_flow["Application Flow"]
  node_project_sm["Project State Machine"]
  node_menu_sm["Main Menu State Machine"]
  node_gameplay_sm["Gameplay State Machine"]
end

subgraph group_scopes_ui["Scopes And UI"]
  node_project_scope["Project Scope"]
  node_scene_scopes["Scene Scopes"]
  node_vcontainer["VContainer DI"]
  node_window_system["Window System"]
  node_ui_screens["UI Screens"]
end

subgraph group_runtime_services["Runtime Services"]
  node_audio_service["Audio Service<br/>[AudioService.cs]"]
  node_id_service["ID Service<br/>[IDService.cs]"]
  node_object_pools["Object Pools<br/>[ObjectPools.cs]"]
end

subgraph group_runtime_primitives["Runtime Primitives"]
  node_health["Health<br/>[Health.cs]"]
  node_banks["Numeric Banks<br/>[BaseBank.cs]"]
  node_clamped_banks["Clamped Banks<br/>[BaseClampedBank.cs]"]
  node_minmax["Min-Max Values<br/>[MinMaxProperty.cs]"]
  node_extensions["Unity Extensions"]
end

node_unity(("Unity Application"))

node_unity -->|"starts flow"| node_project_sm
node_project_sm -->|"coordinates flow"| node_menu_sm
node_project_sm -->|"coordinates flow"| node_gameplay_sm
node_project_sm -->|"uses global scope"| node_project_scope
node_scene_scopes -->|"isolate dependencies"| node_project_scope
node_vcontainer -->|"injects dependencies"| node_project_scope
node_vcontainer -->|"injects dependencies"| node_scene_scopes
node_window_system -->|"opens and closes"| node_ui_screens

click node_project_sm "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets"
click node_menu_sm "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets"
click node_gameplay_sm "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets"
click node_project_scope "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets"
click node_scene_scopes "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets"
click node_vcontainer "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets"
click node_window_system "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets"
click node_ui_screens "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets"
click node_audio_service "https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/AudioService/AudioService.cs"
click node_id_service "https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/AudioService/Services/ID/IDService.cs"
click node_object_pools "https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/ObjectPoolSystem/ObjectPools.cs"
click node_health "https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/Health/Health.cs"
click node_banks "https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/Banks/Core/BaseBank.cs"
click node_clamped_banks "https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/Banks/Core/BaseClampedBank.cs"
click node_minmax "https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/MinMaxProperties/Core/MinMaxProperty.cs"
click node_extensions "https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets/Plugins/Extensions"

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_project_sm,node_menu_sm,node_gameplay_sm toneBlue
class node_project_scope,node_scene_scopes,node_vcontainer,node_window_system,node_ui_screens toneAmber
class node_audio_service,node_id_service,node_object_pools toneMint
class node_health,node_banks,node_clamped_banks,node_minmax,node_extensions toneRose
class node_unity toneIndigo
```

## Components

### Application Flow

- [Project State Machine](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets): `Assets`
- [Main Menu State Machine](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets): `Assets`
- [Gameplay State Machine](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets): `Assets`

### Scopes And UI

- [Project Scope](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets): `Assets`
- [Scene Scopes](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets): `Assets`
- [VContainer DI](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets): `Assets`
- [Window System](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets): `Assets`
- [UI Screens](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets): `Assets`

### Runtime Services

- [Audio Service](https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/AudioService/AudioService.cs): `Assets/Plugins/AudioService/AudioService.cs`
- [ID Service](https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/AudioService/Services/ID/IDService.cs): `Assets/Plugins/AudioService/Services/ID/IDService.cs`
- [Object Pools](https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/ObjectPoolSystem/ObjectPools.cs): `Assets/Plugins/ObjectPoolSystem/ObjectPools.cs`

### Runtime Primitives

- [Health](https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/Health/Health.cs): `Assets/Plugins/Health/Health.cs`
- [Numeric Banks](https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/Banks/Core/BaseBank.cs): `Assets/Plugins/Banks/Core/BaseBank.cs`
- [Clamped Banks](https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/Banks/Core/BaseClampedBank.cs): `Assets/Plugins/Banks/Core/BaseClampedBank.cs`
- [Min-Max Values](https://github.com/vasylkhreptak/projecttemplate/blob/main/Assets/Plugins/MinMaxProperties/Core/MinMaxProperty.cs): `Assets/Plugins/MinMaxProperties/Core/MinMaxProperty.cs`
- [Unity Extensions](https://github.com/vasylkhreptak/projecttemplate/tree/main/Assets/Plugins/Extensions): `Assets/Plugins/Extensions`

### Other components

- **Unity Application**

## Connections

- Unity Application → Project State Machine: starts flow
- Project State Machine → Main Menu State Machine: coordinates flow
- Project State Machine → Gameplay State Machine: coordinates flow
- Project State Machine → Project Scope: uses global scope
- Scene Scopes → Project Scope: isolate dependencies
- VContainer DI → Project Scope: injects dependencies
- VContainer DI → Scene Scopes: injects dependencies
- Window System → UI Screens: opens and closes
