# acidicoala/smokeapi architecture

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

- Interactive diagram: https://gitdiagram.com/acidicoala/smokeapi
- Repository: https://github.com/acidicoala/smokeapi

## Overview

SmokeAPI is a Steamworks compatibility layer that emulates DLC and inventory ownership checks in legitimately owned games while leaving other Steamworks behavior intact. The documented workflow is game launch/loading, interception of Steamworks calls through hook or proxy mode, then ownership responses to the game. CMake identifies runtime entry points and API/interface source files, but their implementation was not sampled, so internal call wiring is intentionally limited. Optional configuration is documented, though its implementation path is not established by the excerpts.

Main entry points: [`static/smoke_api/api.cpp`](https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/api.cpp) (Steam API Facade), [`src/smoke_api/smoke_api.cpp`](https://github.com/acidicoala/smokeapi/blob/master/src/smoke_api/smoke_api.cpp) (SmokeAPI Runtime), [`src/main_win.cpp`](https://github.com/acidicoala/smokeapi/blob/master/src/main_win.cpp) (Windows Entry), [`src/main_linux.cpp`](https://github.com/acidicoala/smokeapi/blob/master/src/main_linux.cpp) (Linux Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_loading["Runtime Loading"]
  node_win_entry["Windows Entry<br/>[main_win.cpp]"]
  node_linux_entry["Linux Entry<br/>[main_linux.cpp]"]
  node_runtime["SmokeAPI Runtime<br/>[smoke_api.cpp]"]
  node_hook_mode["Hook Mode"]
  node_proxy_mode["Proxy Mode"]
end

subgraph group_emulation["Ownership Emulation"]
  node_steam_inventory["Inventory Interface"]
  node_ownership["DLC Ownership<br/>[isteamapps.cpp]"]
  node_inventory_ownership["Inventory Ownership"]
  node_cache["Runtime Cache<br/>[cache.hpp]"]
  node_configuration["Optional Configuration"]
end

subgraph group_steamworks["Steamworks Compatibility"]
  node_steam_api["Steam API Facade<br/>[api.cpp]"]
  node_steam_apps["App Interface<br/>[steam_apps.cpp]"]
  node_steam_user["User Interface<br/>[steam_user.cpp]"]
  node_steam_http["HTTP Interface<br/>[steam_http.cpp]"]
  node_steamworks_sdk["Steamworks SDK<br/>[isteamapps.h]"]
end

node_game(("Game Process"))

node_game -->|"loads on Windows"| node_win_entry
node_game -->|"loads on Linux"| node_linux_entry
node_hook_mode -->|"loads runtime"| node_runtime
node_proxy_mode -->|"loads runtime"| node_runtime
node_runtime -->|"exposes API"| node_steam_api
node_steam_api -->|"presents compatibility"| node_steamworks_sdk
node_game -->|"calls Steamworks"| node_steam_api
node_steam_api -->|"handles DLC checks"| node_ownership
node_steam_api -->|"handles inventory checks"| node_inventory_ownership
node_steam_api -->|"uses app interface"| node_steam_apps
node_steam_api -->|"uses user interface"| node_steam_user
node_steam_api -->|"uses HTTP interface"| node_steam_http
node_steam_api -->|"uses inventory interface"| node_steam_inventory

click node_win_entry "https://github.com/acidicoala/smokeapi/blob/master/src/main_win.cpp"
click node_linux_entry "https://github.com/acidicoala/smokeapi/blob/master/src/main_linux.cpp"
click node_runtime "https://github.com/acidicoala/smokeapi/blob/master/src/smoke_api/smoke_api.cpp"
click node_steam_api "https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/api.cpp"
click node_steam_apps "https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_apps.cpp"
click node_steam_user "https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_user.cpp"
click node_steam_http "https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_http.cpp"
click node_steam_inventory "https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_inventory.cpp"
click node_ownership "https://github.com/acidicoala/smokeapi/blob/master/src/steam_api/virtuals/isteamapps.cpp"
click node_inventory_ownership "https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_inventory.cpp"
click node_cache "https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/cache.hpp"
click node_steamworks_sdk "https://github.com/acidicoala/smokeapi/blob/master/res/steamworks/122/headers/steam/isteamapps.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_win_entry,node_linux_entry,node_runtime,node_hook_mode,node_proxy_mode toneBlue
class node_steam_inventory,node_ownership,node_inventory_ownership,node_cache,node_configuration toneAmber
class node_steam_api,node_steam_apps,node_steam_user,node_steam_http,node_steamworks_sdk toneMint
class node_game toneIndigo
```

## Components

### Runtime Loading

- [Windows Entry](https://github.com/acidicoala/smokeapi/blob/master/src/main_win.cpp): `src/main_win.cpp`
- [Linux Entry](https://github.com/acidicoala/smokeapi/blob/master/src/main_linux.cpp): `src/main_linux.cpp`
- [SmokeAPI Runtime](https://github.com/acidicoala/smokeapi/blob/master/src/smoke_api/smoke_api.cpp): `src/smoke_api/smoke_api.cpp`
- **Hook Mode**
- **Proxy Mode**

### Ownership Emulation

- [Inventory Interface](https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_inventory.cpp): `static/smoke_api/interfaces/steam_inventory.cpp`
- [DLC Ownership](https://github.com/acidicoala/smokeapi/blob/master/src/steam_api/virtuals/isteamapps.cpp): `src/steam_api/virtuals/isteamapps.cpp`
- [Inventory Ownership](https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_inventory.cpp): `static/smoke_api/interfaces/steam_inventory.cpp`
- [Runtime Cache](https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/cache.hpp): `static/smoke_api/cache.hpp`
- **Optional Configuration**

### Steamworks Compatibility

- [Steam API Facade](https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/api.cpp): `static/smoke_api/api.cpp`
- [App Interface](https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_apps.cpp): `static/smoke_api/interfaces/steam_apps.cpp`
- [User Interface](https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_user.cpp): `static/smoke_api/interfaces/steam_user.cpp`
- [HTTP Interface](https://github.com/acidicoala/smokeapi/blob/master/static/smoke_api/interfaces/steam_http.cpp): `static/smoke_api/interfaces/steam_http.cpp`
- [Steamworks SDK](https://github.com/acidicoala/smokeapi/blob/master/res/steamworks/122/headers/steam/isteamapps.h): `res/steamworks/122/headers/steam/isteamapps.h`

### Other components

- **Game Process**

## Connections

- Game Process → Windows Entry: loads on Windows
- Game Process → Linux Entry: loads on Linux
- Hook Mode → SmokeAPI Runtime: loads runtime
- Proxy Mode → SmokeAPI Runtime: loads runtime
- SmokeAPI Runtime → Steam API Facade: exposes API
- Steam API Facade → Steamworks SDK: presents compatibility
- Game Process → Steam API Facade: calls Steamworks
- Steam API Facade → DLC Ownership: handles DLC checks
- Steam API Facade → Inventory Ownership: handles inventory checks
- Steam API Facade → App Interface: uses app interface
- Steam API Facade → User Interface: uses user interface
- Steam API Facade → HTTP Interface: uses HTTP interface
- Steam API Facade → Inventory Interface: uses inventory interface
