# wend4r/sourcesdk architecture

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

- Interactive diagram: https://gitdiagram.com/wend4r/sourcesdk
- Repository: https://github.com/wend4r/sourcesdk

## Overview

This repository is a Source SDK: C++ interfaces and runtime modules for building and integrating games with the Source engine, rather than a standalone game. The broad workflow is game or plugin code using SDK contracts to interact with engine services and domain systems such as entities, networking, and Counter-Strike bots. The tree and source index also show Steam/GC, matchmaking, sound, and foundational utility capabilities. The README is empty, and many modules are represented only by interfaces or index references, so the graph shows only documented or indexed dependencies.

Main entry points: [`public/interfaces/interfaces.h`](https://github.com/wend4r/sourcesdk/blob/main/public/interfaces/interfaces.h) (Interface registry), [`public/tier0/platform.h`](https://github.com/wend4r/sourcesdk/blob/main/public/tier0/platform.h) (Platform layer), [`public/tier1`](https://github.com/wend4r/sourcesdk/tree/main/public/tier1) (SDK containers), [`public/mathlib/vector.h`](https://github.com/wend4r/sourcesdk/blob/main/public/mathlib/vector.h) (Math vectors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_contracts["SDK Contracts"]
  node_sdk_interfaces["Interface registry<br/>[interfaces.h]"]
  node_engine_api["Engine API<br/>[isource2engine.h]"]
  node_run_engine["Engine launcher<br/>[IRunGameEngine.h]"]
  node_matchmaking_api["Matchmaking API"]
  node_sound_api["Sound API<br/>[IEngineSound.h]"]
  node_app_system["Application system<br/>[iappsystem.h]"]
end

subgraph group_runtime["Game Runtime"]
  node_entity_system["Entity system"]
  node_pulse_context["Pulse context"]
  node_bot_manager["Bot manager<br/>[bot_manager.h]"]
  node_cs_bot_manager["Counter-Strike bots<br/>[cs_bot_manager.h]"]
  node_bot_timers["Bot timers<br/>[cs_bot_timers.h]"]
  node_network_messages["Network messages"]
end

subgraph group_services["Platform Services"]
  node_gc_client["GC client<br/>[gcclient.h]"]
  node_gc_cache["Shared-object cache"]
  node_steam_api["Steam API<br/>[steam_api_common.h]"]
  node_remote_storage["Remote storage"]
end

subgraph group_foundation["Core Foundation"]
  node_platform["Platform layer<br/>[platform.h]"]
  node_base_types["Base types<br/>[basetypes.h]"]
  node_debug["Debug utilities<br/>[dbg.h]"]
  node_vector["Math vectors<br/>[vector.h]"]
  node_containers["SDK containers"]
  node_keyvalues3["KeyValues3<br/>[keyvalues3.h]"]
end

node_game_code(("Game code"))

node_game_code -.->|"uses contracts"| node_sdk_interfaces
node_sdk_interfaces -->|"includes"| node_platform
node_engine_api -->|"extends"| node_app_system
node_engine_api -->|"uses interfaces"| node_sdk_interfaces
node_pulse_context -->|"uses values"| node_keyvalues3
node_pulse_context -->|"uses vectors"| node_vector
node_cs_bot_manager -->|"extends manager"| node_bot_manager
node_cs_bot_manager -->|"uses timers"| node_bot_timers
node_bot_manager -->|"uses timers"| node_bot_timers
node_gc_client -->|"notifies cache"| node_gc_cache
node_gc_client -->|"uses Steam"| node_steam_api
node_remote_storage -->|"uses common API"| node_steam_api
node_matchmaking_api -.->|"uses interface base"| node_sdk_interfaces
node_sound_api -->|"uses interfaces"| node_sdk_interfaces
node_platform -.->|"defines platform types"| node_base_types
node_vector -->|"uses platform layer"| node_platform
node_vector -->|"uses base types"| node_base_types
node_containers -->|"uses platform layer"| node_platform
node_containers -->|"uses diagnostics"| node_debug
node_containers -->|"uses base types"| node_base_types
node_app_system -->|"uses interface base"| node_sdk_interfaces

click node_sdk_interfaces "https://github.com/wend4r/sourcesdk/blob/main/public/interfaces/interfaces.h"
click node_engine_api "https://github.com/wend4r/sourcesdk/blob/main/public/isource2engine.h"
click node_run_engine "https://github.com/wend4r/sourcesdk/blob/main/common/IRunGameEngine.h"
click node_matchmaking_api "https://github.com/wend4r/sourcesdk/tree/main/public/matchmaking"
click node_sound_api "https://github.com/wend4r/sourcesdk/blob/main/public/engine/IEngineSound.h"
click node_entity_system "https://github.com/wend4r/sourcesdk/tree/main/entity2"
click node_pulse_context "https://github.com/wend4r/sourcesdk/blob/main/entity2/entitypulsecallcontext.cpp"
click node_bot_manager "https://github.com/wend4r/sourcesdk/blob/main/game/server/cstrike15/bot/bot_manager.h"
click node_cs_bot_manager "https://github.com/wend4r/sourcesdk/blob/main/game/server/cstrike15/bot/cs_bot_manager.h"
click node_bot_timers "https://github.com/wend4r/sourcesdk/blob/main/game/server/cstrike15/bot/cs_bot_timers.h"
click node_network_messages "https://github.com/wend4r/sourcesdk/blob/main/networksystem/networkmessages.cpp"
click node_gc_client "https://github.com/wend4r/sourcesdk/blob/main/public/gcsdk/gcclient.h"
click node_gc_cache "https://github.com/wend4r/sourcesdk/blob/main/public/gcsdk/gcclient_sharedobjectcache.h"
click node_steam_api "https://github.com/wend4r/sourcesdk/blob/main/public/steam/steam_api_common.h"
click node_remote_storage "https://github.com/wend4r/sourcesdk/blob/main/public/steam/isteamremotestorage.h"
click node_platform "https://github.com/wend4r/sourcesdk/blob/main/public/tier0/platform.h"
click node_base_types "https://github.com/wend4r/sourcesdk/blob/main/public/tier0/basetypes.h"
click node_debug "https://github.com/wend4r/sourcesdk/blob/main/public/tier0/dbg.h"
click node_vector "https://github.com/wend4r/sourcesdk/blob/main/public/mathlib/vector.h"
click node_containers "https://github.com/wend4r/sourcesdk/tree/main/public/tier1"
click node_keyvalues3 "https://github.com/wend4r/sourcesdk/blob/main/public/tier1/keyvalues3.h"
click node_app_system "https://github.com/wend4r/sourcesdk/blob/main/public/appframework/iappsystem.h"

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_sdk_interfaces,node_engine_api,node_run_engine,node_matchmaking_api,node_sound_api,node_app_system toneBlue
class node_entity_system,node_pulse_context,node_bot_manager,node_cs_bot_manager,node_bot_timers,node_network_messages toneAmber
class node_gc_client,node_gc_cache,node_steam_api,node_remote_storage toneMint
class node_platform,node_base_types,node_debug,node_vector,node_containers,node_keyvalues3 toneRose
class node_game_code toneIndigo
```

## Components

### SDK Contracts

- [Interface registry](https://github.com/wend4r/sourcesdk/blob/main/public/interfaces/interfaces.h): `public/interfaces/interfaces.h`
- [Engine API](https://github.com/wend4r/sourcesdk/blob/main/public/isource2engine.h): `public/isource2engine.h`
- [Engine launcher](https://github.com/wend4r/sourcesdk/blob/main/common/IRunGameEngine.h): `common/IRunGameEngine.h`
- [Matchmaking API](https://github.com/wend4r/sourcesdk/tree/main/public/matchmaking): `public/matchmaking`
- [Sound API](https://github.com/wend4r/sourcesdk/blob/main/public/engine/IEngineSound.h): `public/engine/IEngineSound.h`
- [Application system](https://github.com/wend4r/sourcesdk/blob/main/public/appframework/iappsystem.h): `public/appframework/iappsystem.h`

### Game Runtime

- [Entity system](https://github.com/wend4r/sourcesdk/tree/main/entity2): `entity2`
- [Pulse context](https://github.com/wend4r/sourcesdk/blob/main/entity2/entitypulsecallcontext.cpp): `entity2/entitypulsecallcontext.cpp`
- [Bot manager](https://github.com/wend4r/sourcesdk/blob/main/game/server/cstrike15/bot/bot_manager.h): `game/server/cstrike15/bot/bot_manager.h`
- [Counter-Strike bots](https://github.com/wend4r/sourcesdk/blob/main/game/server/cstrike15/bot/cs_bot_manager.h): `game/server/cstrike15/bot/cs_bot_manager.h`
- [Bot timers](https://github.com/wend4r/sourcesdk/blob/main/game/server/cstrike15/bot/cs_bot_timers.h): `game/server/cstrike15/bot/cs_bot_timers.h`
- [Network messages](https://github.com/wend4r/sourcesdk/blob/main/networksystem/networkmessages.cpp): `networksystem/networkmessages.cpp`

### Platform Services

- [GC client](https://github.com/wend4r/sourcesdk/blob/main/public/gcsdk/gcclient.h): `public/gcsdk/gcclient.h`
- [Shared-object cache](https://github.com/wend4r/sourcesdk/blob/main/public/gcsdk/gcclient_sharedobjectcache.h): `public/gcsdk/gcclient_sharedobjectcache.h`
- [Steam API](https://github.com/wend4r/sourcesdk/blob/main/public/steam/steam_api_common.h): `public/steam/steam_api_common.h`
- [Remote storage](https://github.com/wend4r/sourcesdk/blob/main/public/steam/isteamremotestorage.h): `public/steam/isteamremotestorage.h`

### Core Foundation

- [Platform layer](https://github.com/wend4r/sourcesdk/blob/main/public/tier0/platform.h): `public/tier0/platform.h`
- [Base types](https://github.com/wend4r/sourcesdk/blob/main/public/tier0/basetypes.h): `public/tier0/basetypes.h`
- [Debug utilities](https://github.com/wend4r/sourcesdk/blob/main/public/tier0/dbg.h): `public/tier0/dbg.h`
- [Math vectors](https://github.com/wend4r/sourcesdk/blob/main/public/mathlib/vector.h): `public/mathlib/vector.h`
- [SDK containers](https://github.com/wend4r/sourcesdk/tree/main/public/tier1): `public/tier1`
- [KeyValues3](https://github.com/wend4r/sourcesdk/blob/main/public/tier1/keyvalues3.h): `public/tier1/keyvalues3.h`

### Other components

- **Game code**

## Connections

- Game code → Interface registry: uses contracts
- Interface registry → Platform layer: includes (evidence: `public/interfaces/interfaces.h`)
- Engine API → Application system: extends (evidence: `public/isource2engine.h`)
- Engine API → Interface registry: uses interfaces
- Pulse context → KeyValues3: uses values
- Pulse context → Math vectors: uses vectors (evidence: `entity2/entitypulsecallcontext.cpp`)
- Counter-Strike bots → Bot manager: extends manager (evidence: `game/server/cstrike15/bot/cs_bot_manager.h`)
- Counter-Strike bots → Bot timers: uses timers (evidence: `game/server/cstrike15/bot/cs_bot_manager.h`)
- Bot manager → Bot timers: uses timers (evidence: `game/server/cstrike15/bot/bot_manager.h`)
- GC client → Shared-object cache: notifies cache (evidence: `public/gcsdk/gcclient.h`)
- GC client → Steam API: uses Steam (evidence: `public/gcsdk/gcclient.h`)
- Remote storage → Steam API: uses common API (evidence: `public/steam/isteamremotestorage.h`)
- Matchmaking API → Interface registry: uses interface base
- Sound API → Interface registry: uses interfaces (evidence: `public/engine/IEngineSound.h`)
- Platform layer → Base types: defines platform types
- Math vectors → Platform layer: uses platform layer (evidence: `public/mathlib/vector.h`)
- Math vectors → Base types: uses base types (evidence: `public/mathlib/vector.h`)
- SDK containers → Platform layer: uses platform layer (evidence: `public/tier1/utlvector.h`)
- SDK containers → Debug utilities: uses diagnostics (evidence: `public/tier1/utlvector.h`)
- SDK containers → Base types: uses base types (evidence: `public/tier1/utllinkedlist.h`)
- Application system → Interface registry: uses interface base (evidence: `public/appframework/iappsystem.h`)
