# zku11y/vulkan_journey architecture

> Architecture diagram of the GitHub repository zku11y/vulkan_journey, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zku11y/vulkan_journey
- Repository: https://github.com/zku11y/vulkan_journey

## Overview

##### File structure
- Top level:
- README.md (empty or rate-limit error)
- working_prototype/ – contains all source and build artifacts
- working_prototype/:
- .vscode/ – editor settings (launch configs, include paths)
- Makefile & build.sh – build scripts invoking compiler and Vulkan SDK tools
- main.cpp – application entry point & game loop
- includes/header1.c – utility or platform-abstraction code
- game/ – game-specific logic module(s)
- shader.frag & shader.vert – GLSL source for fragment and vertex shaders
- shaders/frag.spv & shaders/vert.spv – compiled SPIR-V binaries
- vulkan_triangle/ – sample or helper code for basic triangle rendering

##### (Empty) README insights
- No architectural hints beyond “Vulkan triangle demo”

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build System Layer
    subgraph "Build System" 
        direction TB
        Makefile["Makefile"]:::build
        BuildScript["build.sh"]:::build
        VSCode[".vscode"]:::build
    end

    %% Source Code Modules
    subgraph "Source Modules"
        direction TB
        AppCore["Application Core\n(main.cpp)"]:::app
        Platform["Platform Abstraction\n(header1.c)"]:::app
        GameLogic["Game Logic Module\n(game/)"]:::app
        Renderer["Rendering Engine\n(vulkan_triangle/)"]:::app
        VertSrc["Vertex Shader Source\n(shader.vert)"]:::app
        FragSrc["Fragment Shader Source\n(shader.frag)"]:::app
    end

    %% Shader Compilation Pipeline
    subgraph "Shader Compilation"
        direction TB
        VertSrc -->|"compile"| VertBin[(vert.spv)]:::data
        FragSrc -->|"compile"| FragBin[(frag.spv)]:::data
    end

    %% Runtime Layer
    subgraph "Runtime Pipeline"
        direction TB
        AppCore -->|"init"| Platform
        AppCore -->|"invoke"| Renderer
        Platform -->|"create instance"| VulkanAPI["Vulkan API"]:::external
        Renderer -->|"load shaders"| VertBin
        Renderer -->|"load shaders"| FragBin
        Renderer -->|"call"| VulkanAPI
        GameLogic -->|"update per-frame"| Renderer
        VulkanAPI -->|"driver calls"| GPUDriver["GPU Driver"]:::external
        GPUDriver -->|"executes"| GPU["GPU Hardware"]:::external
        OS["OS Windowing\n(GLFW/etc)"]:::external
        OS -->|"window events"| AppCore
    end

    %% Build Flow Connections
    Makefile -->|"uses"| AppCore
    Makefile -->|"uses"| Platform
    Makefile -->|"uses"| GameLogic
    Makefile -->|"uses"| Renderer
    Makefile -->|"runs"| BuildScript
    BuildScript -->|"invokes glslangValidator"| VertSrc
    BuildScript -->|"invokes glslangValidator"| FragSrc

    %% Click Events
    click AppCore "https://github.com/zku11y/vulkan_journey/blob/main/working_prototype/main.cpp"
    click Platform "https://github.com/zku11y/vulkan_journey/blob/main/working_prototype/includes/header1.c"
    click GameLogic "https://github.com/zku11y/vulkan_journey/tree/main/working_prototype/game"
    click Renderer "https://github.com/zku11y/vulkan_journey/tree/main/working_prototype/vulkan_triangle"
    click VertSrc "https://github.com/zku11y/vulkan_journey/blob/main/working_prototype/shader.vert"
    click FragSrc "https://github.com/zku11y/vulkan_journey/blob/main/working_prototype/shader.frag"
    click VertBin "https://github.com/zku11y/vulkan_journey/blob/main/working_prototype/shaders/vert.spv"
    click FragBin "https://github.com/zku11y/vulkan_journey/blob/main/working_prototype/shaders/frag.spv"
    click Makefile "https://github.com/zku11y/vulkan_journey/tree/main/working_prototype/Makefile"
    click BuildScript "https://github.com/zku11y/vulkan_journey/blob/main/working_prototype/build.sh"
    click VSCode "https://github.com/zku11y/vulkan_journey/blob/main/working_prototype/.vscode"

    %% Styles
    classDef app fill:#D0E8FF,stroke:#0366d6;
    classDef build fill:#D8F5D8,stroke:#28a745;
    classDef external fill:#FFE8A8,stroke:#d73a49;
    classDef data fill:#F0D0FF,stroke:#6f42c1;
```
