# memati8383/tengri-theme architecture

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

- Interactive diagram: https://gitdiagram.com/memati8383/tengri-theme
- Repository: https://github.com/memati8383/tengri-theme

## Overview

TENGRİ Theme is a Windows Dear ImGui monochrome UI theme and reusable application-shell starter. The principal workflow is Win32/DX11 startup, theme initialization, shell frame construction and page dispatch into either the starter app or the showcase; widgets and drawing assets produce the visible result. The README documents additional theme capabilities preserved here, including typography, effects, icons, branding, and notifications. Edges are limited to excerpted imports/calls and README statements; unsampled implementations are not inferred beyond those documented links.

Main entry points: [`src/main.cpp`](https://github.com/memati8383/tengri-theme/blob/main/src/main.cpp) (Win32 host), [`src/app/shell.cpp`](https://github.com/memati8383/tengri-theme/blob/main/src/app/shell.cpp) (Application shell), [`src/demo.cpp`](https://github.com/memati8383/tengri-theme/blob/main/src/demo.cpp) (Theme showcase), [`src/gui/theme.cpp`](https://github.com/memati8383/tengri-theme/blob/main/src/gui/theme.cpp) (Style and typography)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Window and rendering"]
  node_main["Win32 host<br/>[main.cpp]"]
  node_windowhit["Window hit testing<br/>[window_hit.hpp]"]
end

subgraph group_app["Application content"]
  node_shell["Application shell<br/>[shell.cpp]"]
  node_contract["Content contract<br/>[shell.hpp]"]
  node_starter["Starter pages<br/>[my_app.cpp]"]
  node_showcase["Theme showcase<br/>[demo.cpp]"]
end

subgraph group_design["Theme and drawing"]
  node_theme["Style and typography<br/>[theme.cpp]"]
  node_fontdata["Embedded Inter fonts<br/>[font_data.cpp]"]
  node_widgets["Controls and toasts<br/>[widgets.cpp]"]
  node_effects["Background effects<br/>[fx.cpp]"]
  node_icons["Vector icons<br/>[icons.cpp]"]
  node_brandicons["Brand icon paths<br/>[brand_icons.cpp]"]
  node_logo["Brand image<br/>[logo.cpp]"]
  node_logodata["Embedded logo data<br/>[logo_data.cpp]"]
end

subgraph group_vendor["UI foundation"]
  node_imgui["Dear ImGui core<br/>[imgui.cpp]"]
  node_winbackend["Win32 backend"]
  node_dxbackend["DX11 backend"]
end

node_user(("App user"))
node_windows["Windows and DX11"]

node_user -->|"starts app"| node_main
node_main -->|"creates window and device"| node_windows
node_main -->|"handles Win32 events"| node_winbackend
node_main -->|"renders with DX11"| node_dxbackend
node_main -.->|"runs UI context"| node_imgui
node_main -->|"uses hit testing"| node_windowhit
node_main -->|"initializes and frames"| node_shell
node_main -->|"initializes theme"| node_theme
node_main -->|"initializes logo"| node_logo
node_shell -->|"uses content contract"| node_contract
node_starter -->|"provides content"| node_contract
node_showcase -->|"provides content"| node_contract
node_shell -->|"draws shell controls"| node_widgets
node_shell -->|"draws background"| node_effects
node_shell -->|"uses tokens"| node_theme
node_shell -->|"uses navigation icons"| node_icons
node_shell -->|"draws branding"| node_logo
node_starter -->|"builds pages with"| node_widgets
node_starter -->|"edits effect settings"| node_effects
node_starter -->|"uses typography"| node_theme
node_showcase -->|"showcases controls"| node_widgets
node_showcase -->|"showcases primitives"| node_effects
node_showcase -->|"shows theme tokens"| node_theme
node_showcase -->|"shows icons"| node_icons
node_showcase -->|"shows brand image"| node_logo
node_widgets -->|"uses style tokens"| node_theme
node_widgets -->|"draws gradients"| node_effects
node_theme -->|"loads embedded fonts"| node_fontdata
node_icons -->|"draws brand glyphs"| node_brandicons
node_logo -->|"loads logo resource"| node_logodata

click node_main "https://github.com/memati8383/tengri-theme/blob/main/src/main.cpp"
click node_windowhit "https://github.com/memati8383/tengri-theme/blob/main/src/window_hit.hpp"
click node_shell "https://github.com/memati8383/tengri-theme/blob/main/src/app/shell.cpp"
click node_contract "https://github.com/memati8383/tengri-theme/blob/main/src/app/shell.hpp"
click node_starter "https://github.com/memati8383/tengri-theme/blob/main/src/app/my_app.cpp"
click node_showcase "https://github.com/memati8383/tengri-theme/blob/main/src/demo.cpp"
click node_theme "https://github.com/memati8383/tengri-theme/blob/main/src/gui/theme.cpp"
click node_fontdata "https://github.com/memati8383/tengri-theme/blob/main/src/gui/font_data.cpp"
click node_widgets "https://github.com/memati8383/tengri-theme/blob/main/src/gui/widgets.cpp"
click node_effects "https://github.com/memati8383/tengri-theme/blob/main/src/gui/fx.cpp"
click node_icons "https://github.com/memati8383/tengri-theme/blob/main/src/gui/icons.cpp"
click node_brandicons "https://github.com/memati8383/tengri-theme/blob/main/src/gui/brand_icons.cpp"
click node_logo "https://github.com/memati8383/tengri-theme/blob/main/src/gui/logo.cpp"
click node_logodata "https://github.com/memati8383/tengri-theme/blob/main/src/gui/logo_data.cpp"
click node_imgui "https://github.com/memati8383/tengri-theme/blob/main/third_party/imgui/imgui.cpp"
click node_winbackend "https://github.com/memati8383/tengri-theme/blob/main/third_party/imgui/backends/imgui_impl_win32.cpp"
click node_dxbackend "https://github.com/memati8383/tengri-theme/blob/main/third_party/imgui/backends/imgui_impl_dx11.cpp"

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_main,node_windowhit,node_user toneBlue
class node_shell,node_contract,node_starter,node_showcase toneAmber
class node_theme,node_fontdata,node_widgets,node_effects,node_icons,node_brandicons,node_logo,node_logodata toneMint
class node_imgui,node_winbackend,node_dxbackend toneRose
class node_windows toneIndigo
```

## Components

### Window and rendering

- [Win32 host](https://github.com/memati8383/tengri-theme/blob/main/src/main.cpp): `src/main.cpp`
- [Window hit testing](https://github.com/memati8383/tengri-theme/blob/main/src/window_hit.hpp): `src/window_hit.hpp`

### Application content

- [Application shell](https://github.com/memati8383/tengri-theme/blob/main/src/app/shell.cpp): `src/app/shell.cpp`
- [Content contract](https://github.com/memati8383/tengri-theme/blob/main/src/app/shell.hpp): `src/app/shell.hpp`
- [Starter pages](https://github.com/memati8383/tengri-theme/blob/main/src/app/my_app.cpp): `src/app/my_app.cpp`
- [Theme showcase](https://github.com/memati8383/tengri-theme/blob/main/src/demo.cpp): `src/demo.cpp`

### Theme and drawing

- [Style and typography](https://github.com/memati8383/tengri-theme/blob/main/src/gui/theme.cpp): `src/gui/theme.cpp`
- [Embedded Inter fonts](https://github.com/memati8383/tengri-theme/blob/main/src/gui/font_data.cpp): `src/gui/font_data.cpp`
- [Controls and toasts](https://github.com/memati8383/tengri-theme/blob/main/src/gui/widgets.cpp): `src/gui/widgets.cpp`
- [Background effects](https://github.com/memati8383/tengri-theme/blob/main/src/gui/fx.cpp): `src/gui/fx.cpp`
- [Vector icons](https://github.com/memati8383/tengri-theme/blob/main/src/gui/icons.cpp): `src/gui/icons.cpp`
- [Brand icon paths](https://github.com/memati8383/tengri-theme/blob/main/src/gui/brand_icons.cpp): `src/gui/brand_icons.cpp`
- [Brand image](https://github.com/memati8383/tengri-theme/blob/main/src/gui/logo.cpp): `src/gui/logo.cpp`
- [Embedded logo data](https://github.com/memati8383/tengri-theme/blob/main/src/gui/logo_data.cpp): `src/gui/logo_data.cpp`

### UI foundation

- [Dear ImGui core](https://github.com/memati8383/tengri-theme/blob/main/third_party/imgui/imgui.cpp): `third_party/imgui/imgui.cpp`
- [Win32 backend](https://github.com/memati8383/tengri-theme/blob/main/third_party/imgui/backends/imgui_impl_win32.cpp): `third_party/imgui/backends/imgui_impl_win32.cpp`
- [DX11 backend](https://github.com/memati8383/tengri-theme/blob/main/third_party/imgui/backends/imgui_impl_dx11.cpp): `third_party/imgui/backends/imgui_impl_dx11.cpp`

### Other components

- **App user**
- **Windows and DX11**

## Connections

- App user → Win32 host: starts app (evidence: `README.md`)
- Win32 host → Windows and DX11: creates window and device (evidence: `src/main.cpp`)
- Win32 host → Win32 backend: handles Win32 events (evidence: `src/main.cpp`)
- Win32 host → DX11 backend: renders with DX11 (evidence: `src/main.cpp`)
- Win32 host → Dear ImGui core: runs UI context (evidence: `README.md`)
- Win32 host → Window hit testing: uses hit testing (evidence: `src/main.cpp`)
- Win32 host → Application shell: initializes and frames (evidence: `src/main.cpp`)
- Win32 host → Style and typography: initializes theme (evidence: `src/main.cpp`)
- Win32 host → Brand image: initializes logo (evidence: `src/main.cpp`)
- Application shell → Content contract: uses content contract (evidence: `src/app/shell.cpp`)
- Starter pages → Content contract: provides content (evidence: `README.md`)
- Theme showcase → Content contract: provides content (evidence: `src/demo.cpp`)
- Application shell → Controls and toasts: draws shell controls (evidence: `src/app/shell.cpp`)
- Application shell → Background effects: draws background (evidence: `src/app/shell.cpp`)
- Application shell → Style and typography: uses tokens (evidence: `src/app/shell.cpp`)
- Application shell → Vector icons: uses navigation icons (evidence: `src/app/shell.cpp`)
- Application shell → Brand image: draws branding (evidence: `src/app/shell.cpp`)
- Starter pages → Controls and toasts: builds pages with (evidence: `src/app/my_app.cpp`)
- Starter pages → Background effects: edits effect settings (evidence: `src/app/my_app.cpp`)
- Starter pages → Style and typography: uses typography (evidence: `src/app/my_app.cpp`)
- Theme showcase → Controls and toasts: showcases controls (evidence: `src/demo.cpp`)
- Theme showcase → Background effects: showcases primitives (evidence: `src/demo.cpp`)
- Theme showcase → Style and typography: shows theme tokens (evidence: `src/demo.cpp`)
- Theme showcase → Vector icons: shows icons (evidence: `src/demo.cpp`)
- Theme showcase → Brand image: shows brand image (evidence: `src/demo.cpp`)
- Controls and toasts → Style and typography: uses style tokens (evidence: `src/gui/widgets.cpp`)
- Controls and toasts → Background effects: draws gradients (evidence: `src/gui/widgets.cpp`)
- Style and typography → Embedded Inter fonts: loads embedded fonts (evidence: `src/gui/theme.cpp`)
- Vector icons → Brand icon paths: draws brand glyphs (evidence: `src/gui/icons.cpp`)
- Brand image → Embedded logo data: loads logo resource (evidence: `src/gui/logo.cpp`)
