# mauriceos/mixar-app architecture

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

- Interactive diagram: https://gitdiagram.com/mauriceos/mixar-app
- Repository: https://github.com/mauriceos/mixar-app

## Overview

#### Purpose and Entry Points
Mixar is a native desktop 3D-creation application: a Blender 5.0 fork augmented with AI-assisted scene workflows, custom editor spaces, and layered texture painting. The compiled application starts through Blender’s creator layer, while Mixar Python modules load into the embedded Blender runtime.
- `src/source/creator/creator.cc`
- `src/source/creator/creator_startup.cc`
- `src/scripts/mixar/bootstrap/scene_graph_module.py`

#### Source Overlay and Build Boundary
`src/` is not built in place. Build scripts compose a generated `source/` tree by copying the upstream Blender submodule and overlaying Mixar changes, then CMake compiles the native app and installs Python dependencies. This preserves a boundary between upstream engine code and Mixar-owned modifications.
- `Makefile`
- `scripts/unix/build.sh`
- `cmake/mixar_overrides.cmake`

#### Native Blender Integration
C++ overlay code extends Blender’s editor/window-manager and RNA/DNA-facing surfaces with Mixar spaces and interactions. Native spaces own high-performance drawing, event handling, and layout; Python modules supply feature behavior, operators, and remote-service orchestration.
- `src/source/blender/editors/space_mixie/space_mixie.cc`
- `src/source/blender/editors/space_mixie_chat/space_mixie_chat.cc`
- `src/source/blender/makesrna/intern/rna_wm_mixar.cc`

#### Bootstrap and Feature Registration
The embedded Python addon is organized around bootstrap modules that register and coordinate independently deployable features at application startup/shutdown: chat, paint, moodboard, scene graph, workflow, analytics, updates, and safety guards.
- `src/scripts/mixar/bootstrap/agent_connection.py`
- `src/scripts/mixar/bootstrap/workflow_module.py`
- `src/scripts/mixar/bootstrap/shutdown_hooks.py`

#### AI Agent and Remote Transport
Mixie chat turns UI prompts into authenticated remote requests, receives streaming/SSE or WebSocket activity, queues work, and marshals scene-affecting execution back to Blender’s main thread. Agent-provided scripts pass through sandbox transformation and validation before execution. The hosted Mixar backend is external; BYOK can route agent use through user-provided model-provider credentials.
- `src/scripts/mixar/modules/space_mixie_chat/core/connection_manager.py`
- `src/scripts/mixar/modules/space_mixie_chat/core/sse_handler.py`
- `src/scripts/mixar/modules/space_mixie_chat/core/sandbox_validator.py`

#### Generation Job Pipeline
Async generation features share a client/service abstraction and local job queue. Feature modules enqueue image, model, reconstruction, segmentation, retopology, UV, or scene-generation requests; queue management polls/downloads results and imports them into Blender scene data. This is the principal boundary between local Blender state and hosted AI services.
- `src/scripts/mixar/modules/common/api/client.py`
- `src/scripts/mixar/modules/common/job_queue/core/queue_manager.py`
- `src/scripts/mixar/modules/moodboard/core/node_job_bridge.py`

#### Creative Workspaces and Persistent Scene State
Moodboard represents references and generated assets as a node graph, then drives scene-generation/import workflows. The scene graph maintains queryable hierarchy/state for agents. Director provides camera, timeline, capture, and render-output workflows. Operation history captures scene changes for recoverability and agent-facing context.
- `src/scripts/mixar/modules/moodboard/core/node_graph.py`
- `src/scripts/mixar/modules/scene_graph/core/store.py`
- `src/scripts/mixar/modules/director/core/timeline.py`

#### Layered Paint and Asset Output
The paint subsystem is a substantial local-only material authoring stack: layers, masks, channels, modifiers, and Blender shader-node graphs are constructed and maintained in Python, with native baking-space support. It can bake/export authored assets to standard DCC/game-engine formats without requiring account or backend access.
- `src/scripts/mixar/modules/paint/core/node/node_graph.py`
- `src/scripts/mixar/modules/paint/layered_build/builder.py`
- `src/source/blender/editors/space_baking/space_baking.cc`

Main entry points: [`src/scripts/mixar/bootstrap/scene_graph_module.py`](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/bootstrap/scene_graph_module.py) (Feature bootstrap), [`src/scripts/mixar/modules/space_mixie_chat/core/connection_manager.py`](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/space_mixie_chat/core/connection_manager.py) (Chat connection manager), [`src/scripts/mixar/modules/moodboard/core/node_graph.py`](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/moodboard/core/node_graph.py) (Moodboard graph), [`src/source/creator/creator_startup.cc`](https://github.com/mauriceos/mixar-app/blob/main/src/source/creator/creator_startup.cc) (Creator startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_build["Build Overlay"]
  node_makefile["Build entrypoint<br/>Make"]
  node_build_script["Overlay build script<br/>shell build<br/>[build.sh]"]
  node_cmake_overrides["CMake overrides"]
end

subgraph group_native["Native Runtime"]
  node_creator["Application creator<br/>C++ entrypoint<br/>[creator.cc]"]
  node_creator_startup["Creator startup<br/>C++ startup<br/>[creator_startup.cc]"]
  node_native_spaces["Mixar editor spaces<br/>C++ UI spaces<br/>[space_mixie.cc]"]
  node_rna_wm["RNA window-manager API<br/>C++ integration<br/>[rna_wm_mixar.cc]"]
  node_baking_space["Native baking space<br/>C++ UI space<br/>[space_baking.cc]"]
end

subgraph group_python["Embedded Python"]
  node_bootstrap["Feature bootstrap<br/>Python bootstrap"]
  node_chat_connection["Chat connection manager<br/>Python transport"]
  node_sse_handler["Streaming handler<br/>Python transport<br/>[sse_handler.py]"]
  node_sandbox["Script sandbox<br/>Python validator"]
  node_api_client["Generation API client<br/>Python service client<br/>[client.py]"]
  node_job_queue["Local job queue<br/>Python queue<br/>[queue_manager.py]"]
  node_moodboard["Moodboard graph<br/>Python workspace<br/>[node_graph.py]"]
  node_scene_graph[("Scene graph store<br/>Python scene state<br/>[store.py]")]
  node_director["Director timeline<br/>Python workflow<br/>[timeline.py]"]
  node_paint["Layered paint graph<br/>Python authoring<br/>[node_graph.py]"]
  node_paint_builder["Paint material builder<br/>Python builder<br/>[builder.py]"]
end

subgraph group_remote["Hosted AI"]
  node_hosted_agent{{"Hosted agent service<br/>external AI backend"}}
  node_hosted_generation{{"Hosted generation service<br/>external AI backend"}}
end

node_makefile -->|"invokes"| node_build_script
node_build_script -->|"configures"| node_cmake_overrides
node_cmake_overrides -->|"builds"| node_creator
node_creator -->|"initializes"| node_creator_startup
node_creator_startup -->|"loads embedded modules"| node_bootstrap
node_creator_startup -->|"initializes UI"| node_native_spaces
node_rna_wm -->|"supports Mixar UI API"| node_native_spaces
node_bootstrap -->|"registers chat"| node_chat_connection
node_bootstrap -->|"registers scene state"| node_scene_graph
node_bootstrap -->|"registers workspace"| node_moodboard
node_bootstrap -->|"registers workflow"| node_director
node_bootstrap -->|"registers paint"| node_paint
node_native_spaces -->|"prompt UI"| node_chat_connection
node_chat_connection -->|"streams through"| node_sse_handler
node_chat_connection -->|"authenticated requests"| node_hosted_agent
node_sse_handler -->|"agent scripts"| node_sandbox
node_sandbox -->|"validated scene actions"| node_scene_graph
node_moodboard -->|"submits generation"| node_api_client
node_api_client -->|"creates jobs"| node_job_queue
node_api_client -->|"remote requests"| node_hosted_generation
node_job_queue -->|"imports results"| node_moodboard
node_moodboard -->|"drives scene import"| node_scene_graph
node_paint -->|"constructs materials"| node_paint_builder
node_paint_builder -->|"uses native baking UI"| node_baking_space

click node_makefile "https://github.com/mauriceos/mixar-app/blob/main/Makefile"
click node_build_script "https://github.com/mauriceos/mixar-app/blob/main/scripts/unix/build.sh"
click node_cmake_overrides "https://github.com/mauriceos/mixar-app/blob/main/cmake/mixar_overrides.cmake"
click node_creator "https://github.com/mauriceos/mixar-app/blob/main/src/source/creator/creator.cc"
click node_creator_startup "https://github.com/mauriceos/mixar-app/blob/main/src/source/creator/creator_startup.cc"
click node_native_spaces "https://github.com/mauriceos/mixar-app/blob/main/src/source/blender/editors/space_mixie/space_mixie.cc"
click node_rna_wm "https://github.com/mauriceos/mixar-app/blob/main/src/source/blender/makesrna/intern/rna_wm_mixar.cc"
click node_baking_space "https://github.com/mauriceos/mixar-app/blob/main/src/source/blender/editors/space_baking/space_baking.cc"
click node_bootstrap "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/bootstrap/scene_graph_module.py"
click node_chat_connection "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/space_mixie_chat/core/connection_manager.py"
click node_sse_handler "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/space_mixie_chat/core/sse_handler.py"
click node_sandbox "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/space_mixie_chat/core/sandbox_validator.py"
click node_api_client "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/common/api/client.py"
click node_job_queue "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/common/job_queue/core/queue_manager.py"
click node_moodboard "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/moodboard/core/node_graph.py"
click node_scene_graph "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/scene_graph/core/store.py"
click node_director "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/director/core/timeline.py"
click node_paint "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/paint/core/node/node_graph.py"
click node_paint_builder "https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/paint/layered_build/builder.py"

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_makefile,node_build_script,node_cmake_overrides toneBlue
class node_creator,node_creator_startup,node_native_spaces,node_rna_wm,node_baking_space toneAmber
class node_bootstrap,node_chat_connection,node_sse_handler,node_sandbox,node_api_client,node_job_queue,node_moodboard,node_scene_graph,node_director,node_paint,node_paint_builder toneMint
class node_hosted_agent,node_hosted_generation toneRose
```

## Components

### Build Overlay

Builds a generated Blender source tree with Mixar overlays.

- [Build entrypoint](https://github.com/mauriceos/mixar-app/blob/main/Makefile): Make · `Makefile`
- [Overlay build script](https://github.com/mauriceos/mixar-app/blob/main/scripts/unix/build.sh): shell build · Copies upstream Blender and Mixar changes into generated source/. · `scripts/unix/build.sh`
- [CMake overrides](https://github.com/mauriceos/mixar-app/blob/main/cmake/mixar_overrides.cmake): CMake · `cmake/mixar_overrides.cmake`

### Native Runtime

Compiled Blender integration and custom editor spaces.

- [Application creator](https://github.com/mauriceos/mixar-app/blob/main/src/source/creator/creator.cc): C++ entrypoint · Starts the compiled Blender-derived desktop application. · `src/source/creator/creator.cc`
- [Creator startup](https://github.com/mauriceos/mixar-app/blob/main/src/source/creator/creator_startup.cc): C++ startup · `src/source/creator/creator_startup.cc`
- [Mixar editor spaces](https://github.com/mauriceos/mixar-app/blob/main/src/source/blender/editors/space_mixie/space_mixie.cc): C++ UI spaces · Own drawing, layout, and event handling for Mixar workspaces. · `src/source/blender/editors/space_mixie/space_mixie.cc`
- [RNA window-manager API](https://github.com/mauriceos/mixar-app/blob/main/src/source/blender/makesrna/intern/rna_wm_mixar.cc): C++ integration · Exposes Mixar-facing Blender window-manager surfaces. · `src/source/blender/makesrna/intern/rna_wm_mixar.cc`
- [Native baking space](https://github.com/mauriceos/mixar-app/blob/main/src/source/blender/editors/space_baking/space_baking.cc): C++ UI space · `src/source/blender/editors/space_baking/space_baking.cc`

### Embedded Python

Mixar features running inside Blender's Python runtime.

- [Feature bootstrap](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/bootstrap/scene_graph_module.py): Python bootstrap · Registers coordinated Mixar features during embedded-runtime startup. · `src/scripts/mixar/bootstrap/scene_graph_module.py`
- [Chat connection manager](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/space_mixie_chat/core/connection_manager.py): Python transport · Authenticates agent requests and coordinates streaming activity. · `src/scripts/mixar/modules/space_mixie_chat/core/connection_manager.py`
- [Streaming handler](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/space_mixie_chat/core/sse_handler.py): Python transport · Consumes SSE or WebSocket agent activity. · `src/scripts/mixar/modules/space_mixie_chat/core/sse_handler.py`
- [Script sandbox](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/space_mixie_chat/core/sandbox_validator.py): Python validator · Transforms and validates agent-provided scripts before execution. · `src/scripts/mixar/modules/space_mixie_chat/core/sandbox_validator.py`
- [Generation API client](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/common/api/client.py): Python service client · Shared client abstraction for hosted generation features. · `src/scripts/mixar/modules/common/api/client.py`
- [Local job queue](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/common/job_queue/core/queue_manager.py): Python queue · Polls jobs, downloads results, and imports them into Blender. · `src/scripts/mixar/modules/common/job_queue/core/queue_manager.py`
- [Moodboard graph](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/moodboard/core/node_graph.py): Python workspace · Manages reference and generated assets as a node graph. · `src/scripts/mixar/modules/moodboard/core/node_graph.py`
- [Scene graph store](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/scene_graph/core/store.py): Python scene state · Maintains queryable scene hierarchy and state for agents. · `src/scripts/mixar/modules/scene_graph/core/store.py`
- [Director timeline](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/director/core/timeline.py): Python workflow · Coordinates camera, timeline, capture, and render-output workflows. · `src/scripts/mixar/modules/director/core/timeline.py`
- [Layered paint graph](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/paint/core/node/node_graph.py): Python authoring · Builds layers, masks, channels, and shader-node materials locally. · `src/scripts/mixar/modules/paint/core/node/node_graph.py`
- [Paint material builder](https://github.com/mauriceos/mixar-app/blob/main/src/scripts/mixar/modules/paint/layered_build/builder.py): Python builder · `src/scripts/mixar/modules/paint/layered_build/builder.py`

### Hosted AI

External authenticated agent and generation services.

- **Hosted agent service**: external AI backend · Mixar backend or BYOK-routed model provider.
- **Hosted generation service**: external AI backend · Processes image, model, reconstruction, and scene jobs.

## Connections

- Build entrypoint → Overlay build script: invokes
- Overlay build script → CMake overrides: configures
- CMake overrides → Application creator: builds
- Application creator → Creator startup: initializes
- Creator startup → Feature bootstrap: loads embedded modules
- Creator startup → Mixar editor spaces: initializes UI
- RNA window-manager API → Mixar editor spaces: supports Mixar UI API
- Feature bootstrap → Chat connection manager: registers chat
- Feature bootstrap → Scene graph store: registers scene state
- Feature bootstrap → Moodboard graph: registers workspace
- Feature bootstrap → Director timeline: registers workflow
- Feature bootstrap → Layered paint graph: registers paint
- Mixar editor spaces → Chat connection manager: prompt UI
- Chat connection manager → Streaming handler: streams through
- Chat connection manager → Hosted agent service: authenticated requests
- Streaming handler → Script sandbox: agent scripts
- Script sandbox → Scene graph store: validated scene actions
- Moodboard graph → Generation API client: submits generation
- Generation API client → Local job queue: creates jobs
- Generation API client → Hosted generation service: remote requests
- Local job queue → Moodboard graph: imports results
- Moodboard graph → Scene graph store: drives scene import
- Layered paint graph → Paint material builder: constructs materials
- Paint material builder → Native baking space: uses native baking UI
