# skypjack/entt architecture

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

- Interactive diagram: https://gitdiagram.com/skypjack/entt
- Repository: https://github.com/skypjack/entt

## Overview

EnTT is a header-only C++ library for game programming, centered on entity-component-system workflows and accompanied by independent runtime utilities. The documented user path is to create entities, attach components through a registry, then query them with a view while application code updates results. The README also identifies reflection, execution graphs, resource management, signals, polymorphism, containers, RTTI, and customizable STL support. Source excerpts are limited, so links between internal subsystems are omitted where call ownership is not shown.

Main entry points: [`src/entt/entity/registry.hpp`](https://github.com/skypjack/entt/blob/main/src/entt/entity/registry.hpp) (Entity Registry), [`src/entt/entity/view.hpp`](https://github.com/skypjack/entt/blob/main/src/entt/entity/view.hpp) (Entity Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ecs["Entity Components"]
  node_registry["Entity Registry<br/>[registry.hpp]"]
  node_storage[("Component Storage<br/>[storage.hpp]")]
  node_sparse["Sparse Sets<br/>[sparse_set.hpp]"]
  node_views["Entity Views<br/>[view.hpp]"]
end

subgraph group_core["Core Foundations"]
  node_coretraits["Type Traits<br/>[type_traits.hpp]"]
  node_corepair["Compressed Pair"]
  node_coreiterator["Iterator Utilities<br/>[iterator.hpp]"]
  node_densemap["Dense Map<br/>[dense_map.hpp]"]
  node_dense_set["Dense Set<br/>[dense_set.hpp]"]
end

subgraph group_runtime["Runtime Utilities"]
  node_reflection["Runtime Reflection<br/>[meta.hpp]"]
  node_flow["Execution Graph<br/>[flow.hpp]"]
  node_resources["Resource Management<br/>[cache.hpp]"]
  node_signals["Signals and Events<br/>[sigh.hpp]"]
  node_polymorphism["Static Polymorphism<br/>[poly.hpp]"]
  node_rtti["Runtime Type Info<br/>[type_info.hpp]"]
end

subgraph group_compat["STL Compatibility"]
  node_stl["STL Compatibility Layer<br/>[concepts.hpp]"]
end

node_developer(("C++ Application"))

node_developer -->|"creates entities"| node_registry
node_developer -->|"adds components"| node_registry
node_developer -->|"queries components"| node_views

click node_registry "https://github.com/skypjack/entt/blob/main/src/entt/entity/registry.hpp"
click node_storage "https://github.com/skypjack/entt/blob/main/src/entt/entity/storage.hpp"
click node_sparse "https://github.com/skypjack/entt/blob/main/src/entt/entity/sparse_set.hpp"
click node_views "https://github.com/skypjack/entt/blob/main/src/entt/entity/view.hpp"
click node_coretraits "https://github.com/skypjack/entt/blob/main/src/entt/core/type_traits.hpp"
click node_corepair "https://github.com/skypjack/entt/blob/main/src/entt/core/compressed_pair.hpp"
click node_coreiterator "https://github.com/skypjack/entt/blob/main/src/entt/core/iterator.hpp"
click node_densemap "https://github.com/skypjack/entt/blob/main/src/entt/container/dense_map.hpp"
click node_dense_set "https://github.com/skypjack/entt/blob/main/src/entt/container/dense_set.hpp"
click node_reflection "https://github.com/skypjack/entt/blob/main/src/entt/meta/meta.hpp"
click node_flow "https://github.com/skypjack/entt/blob/main/src/entt/graph/flow.hpp"
click node_resources "https://github.com/skypjack/entt/blob/main/src/entt/resource/cache.hpp"
click node_signals "https://github.com/skypjack/entt/blob/main/src/entt/signal/sigh.hpp"
click node_polymorphism "https://github.com/skypjack/entt/blob/main/src/entt/poly/poly.hpp"
click node_rtti "https://github.com/skypjack/entt/blob/main/src/entt/core/type_info.hpp"
click node_stl "https://github.com/skypjack/entt/blob/main/src/entt/stl/concepts.hpp"

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_registry,node_storage,node_sparse,node_views toneBlue
class node_coretraits,node_corepair,node_coreiterator,node_densemap,node_dense_set toneAmber
class node_reflection,node_flow,node_resources,node_signals,node_polymorphism,node_rtti toneMint
class node_stl toneRose
class node_developer toneIndigo
```

## Components

### Entity Components

- [Entity Registry](https://github.com/skypjack/entt/blob/main/src/entt/entity/registry.hpp): `src/entt/entity/registry.hpp`
- [Component Storage](https://github.com/skypjack/entt/blob/main/src/entt/entity/storage.hpp): `src/entt/entity/storage.hpp`
- [Sparse Sets](https://github.com/skypjack/entt/blob/main/src/entt/entity/sparse_set.hpp): `src/entt/entity/sparse_set.hpp`
- [Entity Views](https://github.com/skypjack/entt/blob/main/src/entt/entity/view.hpp): `src/entt/entity/view.hpp`

### Core Foundations

- [Type Traits](https://github.com/skypjack/entt/blob/main/src/entt/core/type_traits.hpp): `src/entt/core/type_traits.hpp`
- [Compressed Pair](https://github.com/skypjack/entt/blob/main/src/entt/core/compressed_pair.hpp): `src/entt/core/compressed_pair.hpp`
- [Iterator Utilities](https://github.com/skypjack/entt/blob/main/src/entt/core/iterator.hpp): `src/entt/core/iterator.hpp`
- [Dense Map](https://github.com/skypjack/entt/blob/main/src/entt/container/dense_map.hpp): `src/entt/container/dense_map.hpp`
- [Dense Set](https://github.com/skypjack/entt/blob/main/src/entt/container/dense_set.hpp): `src/entt/container/dense_set.hpp`

### Runtime Utilities

- [Runtime Reflection](https://github.com/skypjack/entt/blob/main/src/entt/meta/meta.hpp): `src/entt/meta/meta.hpp`
- [Execution Graph](https://github.com/skypjack/entt/blob/main/src/entt/graph/flow.hpp): `src/entt/graph/flow.hpp`
- [Resource Management](https://github.com/skypjack/entt/blob/main/src/entt/resource/cache.hpp): `src/entt/resource/cache.hpp`
- [Signals and Events](https://github.com/skypjack/entt/blob/main/src/entt/signal/sigh.hpp): `src/entt/signal/sigh.hpp`
- [Static Polymorphism](https://github.com/skypjack/entt/blob/main/src/entt/poly/poly.hpp): `src/entt/poly/poly.hpp`
- [Runtime Type Info](https://github.com/skypjack/entt/blob/main/src/entt/core/type_info.hpp): `src/entt/core/type_info.hpp`

### STL Compatibility

- [STL Compatibility Layer](https://github.com/skypjack/entt/blob/main/src/entt/stl/concepts.hpp): `src/entt/stl/concepts.hpp`

### Other components

- **C++ Application**

## Connections

- C++ Application → Entity Registry: creates entities
- C++ Application → Entity Registry: adds components
- C++ Application → Entity Views: queries components
