# samedifier/vanilla-modules architecture

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

- Interactive diagram: https://gitdiagram.com/samedifier/vanilla-modules
- Repository: https://github.com/samedifier/vanilla-modules

## Overview

VANILLA_WINDOW is a C-based window and Vulkan rendering module that appears designed to consume ANYCORE scene/model data. The likely user-to-result path is application startup, window/input handling, renderer initialization, scene/model upload, and frame drawing. The Vulkan utility header explicitly sequences renderer initialization; SOURCE INDEX references establish several module dependencies. The README is empty, and main.c’s excerpt is mostly embedded shader data, so runtime behavior beyond those references is not inferred.

Main entry points: [`VANILLA_WINDOW/v1.0.0/src/main.c`](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/main.c) (Runtime entry), [`VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h`](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h) (Renderer setup), [`VANILLA_WINDOW/v1.0.0/include/main.h`](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/main.h) (Renderer data API), [`VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c`](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c) (Scene analyzer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application runtime"]
  node_main["Runtime entry<br/>[main.c]"]
  node_settings["Configuration<br/>[configuration.h]"]
  node_shared["Shared types<br/>[primitives.h]"]
  node_main_helpers["Main helpers<br/>[main_utils.h]"]
end

subgraph group_window["Window and input"]
  node_window_state["GLFW window"]
  node_glfw_helpers["GLFW helpers"]
  node_input["Input events"]
  node_input_types["Input API"]
  node_input_helpers["Input helpers"]
end

subgraph group_render["Vulkan rendering"]
  node_vk_init["Renderer setup"]
  node_vk_instance["Instance and device"]
  node_vk_surface["Surface and swapchain"]
  node_vk_buffers["GPU buffers"]
  node_vk_pipeline["Pipeline and commands"]
  node_vk_draw["Frame drawing"]
  node_vk_assets["Textures and materials<br/>[src]"]
  node_api_types["Renderer data API<br/>[main.h]"]
end

subgraph group_scene["Scene and assets"]
  node_camera["Camera"]
  node_math["View math<br/>[vanilla_math.h]"]
  node_components["Entity components"]
  node_analyzer["Scene analyzer<br/>[vanilla_analyzer.c]"]
  node_analyzer_api["Analyzer API<br/>[vanilla_analyzer.h]"]
end

node_actor(("Application host"))

node_actor -.->|"starts"| node_main
node_main -->|"references"| node_main_helpers
node_main -->|"references"| node_glfw_helpers
node_main -->|"references"| node_vk_init
node_main -->|"references"| node_input_helpers
node_main -->|"references"| node_analyzer_api
node_main -->|"references"| node_camera
node_main -->|"references"| node_components
node_vk_init -->|"initializes"| node_vk_instance
node_vk_init -->|"initializes"| node_vk_surface
node_vk_init -->|"initializes"| node_vk_buffers
node_vk_init -->|"initializes"| node_vk_pipeline
node_vk_init -->|"initializes"| node_vk_draw
node_vk_instance -->|"references"| node_window_state
node_vk_surface -->|"references"| node_window_state
node_vk_pipeline -->|"references"| node_math
node_vk_pipeline -->|"references"| node_camera
node_vk_assets -->|"references"| node_components
node_analyzer -->|"references"| node_vk_init
node_analyzer -->|"references"| node_components
node_analyzer -->|"references"| node_shared
node_analyzer_api -->|"implemented by"| node_analyzer
node_input -->|"references"| node_input_helpers
node_input_helpers -->|"references"| node_input_types
node_window_state -->|"references"| node_api_types
node_api_types -->|"references"| node_settings
node_api_types -->|"references"| node_shared
node_api_types -->|"references"| node_components
node_vk_buffers -->|"references"| node_api_types

click node_main "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/main.c"
click node_settings "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/configuration.h"
click node_shared "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/primitives.h"
click node_main_helpers "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/main_utils.h"
click node_window_state "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_glfw.c"
click node_glfw_helpers "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_glfw_utils.h"
click node_input "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_input.c"
click node_input_types "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_input.h"
click node_input_helpers "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_input_utils.h"
click node_vk_init "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h"
click node_vk_instance "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_instance.c"
click node_vk_surface "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_swapchain.c"
click node_vk_buffers "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_buffers.c"
click node_vk_pipeline "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_commandbuffer.c"
click node_vk_draw "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_draw.c"
click node_vk_assets "https://github.com/samedifier/vanilla-modules/tree/main/VANILLA_WINDOW/v1.0.0/src"
click node_camera "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_camera.h"
click node_math "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_math.h"
click node_components "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/standardcomponent_utils.h"
click node_analyzer "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c"
click node_analyzer_api "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_analyzer.h"
click node_api_types "https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/main.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_main,node_settings,node_shared,node_main_helpers toneBlue
class node_window_state,node_glfw_helpers,node_input,node_input_types,node_input_helpers toneAmber
class node_vk_init,node_vk_instance,node_vk_surface,node_vk_buffers,node_vk_pipeline,node_vk_draw,node_vk_assets,node_api_types toneMint
class node_camera,node_math,node_components,node_analyzer,node_analyzer_api toneRose
class node_actor toneIndigo
```

## Components

### Application runtime

- [Runtime entry](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/main.c): `VANILLA_WINDOW/v1.0.0/src/main.c`
- [Configuration](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/configuration.h): `VANILLA_WINDOW/v1.0.0/configuration.h`
- [Shared types](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/primitives.h): `VANILLA_WINDOW/v1.0.0/primitives.h`
- [Main helpers](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/main_utils.h): `VANILLA_WINDOW/v1.0.0/include/main_utils.h`

### Window and input

- [GLFW window](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_glfw.c): `VANILLA_WINDOW/v1.0.0/src/vanilla_window_glfw.c`
- [GLFW helpers](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_glfw_utils.h): `VANILLA_WINDOW/v1.0.0/include/vanilla_window_glfw_utils.h`
- [Input events](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_input.c): `VANILLA_WINDOW/v1.0.0/src/vanilla_window_input.c`
- [Input API](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_input.h): `VANILLA_WINDOW/v1.0.0/include/vanilla_window_input.h`
- [Input helpers](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_input_utils.h): `VANILLA_WINDOW/v1.0.0/include/vanilla_window_input_utils.h`

### Vulkan rendering

- [Renderer setup](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h): `VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h`
- [Instance and device](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_instance.c): `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_instance.c`
- [Surface and swapchain](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_swapchain.c): `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_swapchain.c`
- [GPU buffers](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_buffers.c): `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_buffers.c`
- [Pipeline and commands](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_commandbuffer.c): `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_commandbuffer.c`
- [Frame drawing](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_draw.c): `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_draw.c`
- [Textures and materials](https://github.com/samedifier/vanilla-modules/tree/main/VANILLA_WINDOW/v1.0.0/src): `VANILLA_WINDOW/v1.0.0/src`
- [Renderer data API](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/main.h): `VANILLA_WINDOW/v1.0.0/include/main.h`

### Scene and assets

- [Camera](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_window_camera.h): `VANILLA_WINDOW/v1.0.0/include/vanilla_window_camera.h`
- [View math](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_math.h): `VANILLA_WINDOW/v1.0.0/include/vanilla_math.h`
- [Entity components](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/standardcomponent_utils.h): `VANILLA_WINDOW/v1.0.0/include/standardcomponent_utils.h`
- [Scene analyzer](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c): `VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c`
- [Analyzer API](https://github.com/samedifier/vanilla-modules/blob/main/VANILLA_WINDOW/v1.0.0/include/vanilla_analyzer.h): `VANILLA_WINDOW/v1.0.0/include/vanilla_analyzer.h`

### Other components

- **Application host**

## Connections

- Application host → Runtime entry: starts
- Runtime entry → Main helpers: references (evidence: `VANILLA_WINDOW/v1.0.0/src/main.c`)
- Runtime entry → GLFW helpers: references (evidence: `VANILLA_WINDOW/v1.0.0/src/main.c`)
- Runtime entry → Renderer setup: references (evidence: `VANILLA_WINDOW/v1.0.0/src/main.c`)
- Runtime entry → Input helpers: references (evidence: `VANILLA_WINDOW/v1.0.0/src/main.c`)
- Runtime entry → Analyzer API: references (evidence: `VANILLA_WINDOW/v1.0.0/src/main.c`)
- Runtime entry → Camera: references (evidence: `VANILLA_WINDOW/v1.0.0/src/main.c`)
- Runtime entry → Entity components: references (evidence: `VANILLA_WINDOW/v1.0.0/src/main.c`)
- Renderer setup → Instance and device: initializes (evidence: `VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h`)
- Renderer setup → Surface and swapchain: initializes (evidence: `VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h`)
- Renderer setup → GPU buffers: initializes (evidence: `VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h`)
- Renderer setup → Pipeline and commands: initializes (evidence: `VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h`)
- Renderer setup → Frame drawing: initializes (evidence: `VANILLA_WINDOW/v1.0.0/include/vanilla_window_vulkan_utils.h`)
- Instance and device → GLFW window: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_instance.c`)
- Surface and swapchain → GLFW window: references
- Pipeline and commands → View math: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_commandbuffer.c`)
- Pipeline and commands → Camera: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_commandbuffer.c`)
- Textures and materials → Entity components: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_material.c`)
- Scene analyzer → Renderer setup: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c`)
- Scene analyzer → Entity components: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c`)
- Scene analyzer → Shared types: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c`)
- Analyzer API → Scene analyzer: implemented by (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_analyzer.c`)
- Input events → Input helpers: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_window_input.c`)
- Input helpers → Input API: references (evidence: `VANILLA_WINDOW/v1.0.0/include/vanilla_window_input_utils.h`)
- GLFW window → Renderer data API: references
- Renderer data API → Configuration: references (evidence: `VANILLA_WINDOW/v1.0.0/include/main.h`)
- Renderer data API → Shared types: references (evidence: `VANILLA_WINDOW/v1.0.0/include/main.h`)
- Renderer data API → Entity components: references (evidence: `VANILLA_WINDOW/v1.0.0/include/main.h`)
- GPU buffers → Renderer data API: references (evidence: `VANILLA_WINDOW/v1.0.0/src/vanilla_window_vulkan_buffers.c`)
