# 5ymph0en1x/syfrack architecture

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

- Interactive diagram: https://gitdiagram.com/5ymph0en1x/syfrack
- Repository: https://github.com/5ymph0en1x/syfrack

## Overview

SyFrack Studio is a fractal-art authoring application with a separate headless CLI. Artists edit 2D or 3D scenes in Studio, preview them, configure a final render, and export image files alongside an editable scene. The graph preserves scene editing, graph evaluation, GPU rendering, color development, and export as distinct stages, plus the CLI and localization capabilities documented in the README. Some subsystem links are documented rather than source-verified; unsampled implementation details are not inferred.

Main entry points: [`crates/syfrack-app/src/ui/mod.rs`](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/mod.rs) (Studio UI), [`crates/syfrack-app/src/state.rs`](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/state.rs) (Document State), [`crates/syfrack-render/src/renderer.rs`](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/renderer.rs) (GPU Renderer), [`crates/syfrack-core/src/scene/mod.rs`](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/scene/mod.rs) (Scene Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_studio["Studio"]
  node_studio_ui["Studio UI<br/>[mod.rs]"]
  node_studio_state["Document State<br/>[state.rs]"]
  node_form_editor["Form Editor<br/>[mod.rs]"]
  node_scene_panels["Scene Controls<br/>[mod.rs]"]
  node_viewport["Viewport<br/>[viewport.rs]"]
  node_preview["Preview<br/>[preview.rs]"]
  node_file_browser["Scene Browser<br/>[file_browser.rs]"]
  node_gallery["Gallery<br/>[gallery.rs]"]
end

subgraph group_scene["Scene Model"]
  node_scene["Scene Model<br/>[mod.rs]"]
  node_parameters["Scene Parameters<br/>[params.rs]"]
  node_graph_language["Graph Language<br/>[language.rs]"]
  node_graph_eval["Graph Evaluation<br/>[eval.rs]"]
end

subgraph group_render["Rendering"]
  node_render_session["Render Session<br/>[session.rs]"]
  node_renderer["GPU Renderer<br/>[renderer.rs]"]
  node_graph_shader["Graph Shader<br/>[graph_wgsl.rs]"]
  node_guiding["Light Guiding<br/>[guiding.rs]"]
  node_particles["Flame Particles<br/>[particles.rs]"]
end

subgraph group_output["Image Output"]
  node_color_develop["Color Development<br/>[tonemap.rs]"]
  node_image_export["Image Export<br/>[export.rs]"]
end

subgraph group_entry["Entry Points"]
  node_cli["Render CLI<br/>[main.rs]"]
  node_localization["Localization<br/>[lib.rs]"]
end

node_artist(("Artist"))

node_artist -->|"edits scenes"| node_studio_ui
node_studio_ui -->|"updates state"| node_studio_state
node_studio_ui -->|"shows editor"| node_form_editor
node_studio_ui -->|"shows controls"| node_scene_panels
node_studio_ui -->|"shows viewport"| node_viewport
node_studio_ui -->|"opens scenes"| node_file_browser
node_studio_ui -->|"offers gallery"| node_gallery
node_form_editor -->|"edits graph"| node_studio_state
node_scene_panels -->|"edits scene"| node_studio_state
node_viewport -->|"displays preview"| node_preview
node_studio_state -->|"holds scene"| node_scene
node_file_browser -->|"loads scenes"| node_studio_state
node_scene -->|"validates values"| node_parameters
node_scene -->|"contains graph"| node_graph_language
node_graph_eval -->|"evaluates fractal"| node_scene
node_artist -->|"requests render"| node_cli
node_cli -->|"starts render"| node_render_session
node_preview -.->|"renders preview"| node_render_session
node_render_session -->|"dispatches work"| node_renderer
node_renderer -->|"compiles graph"| node_graph_shader
node_renderer -->|"uses guiding"| node_guiding
node_renderer -->|"uses particles"| node_particles
node_render_session -.->|"develops image"| node_color_develop
node_color_develop -->|"encodes output"| node_image_export
node_artist -->|"chooses language"| node_localization

click node_studio_ui "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/mod.rs"
click node_studio_state "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/state.rs"
click node_form_editor "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/form_panel/mod.rs"
click node_scene_panels "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/panels/mod.rs"
click node_viewport "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/viewport.rs"
click node_preview "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/preview.rs"
click node_file_browser "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/file_browser.rs"
click node_gallery "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/gallery.rs"
click node_scene "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/scene/mod.rs"
click node_parameters "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/params.rs"
click node_graph_language "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/scene/graph/language.rs"
click node_graph_eval "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/scene/graph/eval.rs"
click node_cli "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-cli/src/main.rs"
click node_render_session "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/session.rs"
click node_renderer "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/renderer.rs"
click node_graph_shader "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/graph_wgsl.rs"
click node_guiding "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/guiding.rs"
click node_particles "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/particles.rs"
click node_color_develop "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-color/src/tonemap.rs"
click node_image_export "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-color/src/export.rs"
click node_localization "https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-i18n/src/lib.rs"

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_studio_ui,node_studio_state,node_form_editor,node_scene_panels,node_viewport,node_preview,node_file_browser,node_gallery toneBlue
class node_scene,node_parameters,node_graph_language,node_graph_eval toneAmber
class node_render_session,node_renderer,node_graph_shader,node_guiding,node_particles toneMint
class node_color_develop,node_image_export toneRose
class node_cli,node_localization,node_artist toneIndigo
```

## Components

### Studio

- [Studio UI](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/mod.rs): `crates/syfrack-app/src/ui/mod.rs`
- [Document State](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/state.rs): `crates/syfrack-app/src/state.rs`
- [Form Editor](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/form_panel/mod.rs): `crates/syfrack-app/src/ui/form_panel/mod.rs`
- [Scene Controls](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/panels/mod.rs): `crates/syfrack-app/src/ui/panels/mod.rs`
- [Viewport](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/viewport.rs): `crates/syfrack-app/src/ui/viewport.rs`
- [Preview](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/preview.rs): `crates/syfrack-app/src/preview.rs`
- [Scene Browser](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/ui/file_browser.rs): `crates/syfrack-app/src/ui/file_browser.rs`
- [Gallery](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-app/src/gallery.rs): `crates/syfrack-app/src/gallery.rs`

### Scene Model

- [Scene Model](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/scene/mod.rs): `crates/syfrack-core/src/scene/mod.rs`
- [Scene Parameters](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/params.rs): `crates/syfrack-core/src/params.rs`
- [Graph Language](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/scene/graph/language.rs): `crates/syfrack-core/src/scene/graph/language.rs`
- [Graph Evaluation](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-core/src/scene/graph/eval.rs): `crates/syfrack-core/src/scene/graph/eval.rs`

### Rendering

- [Render Session](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/session.rs): `crates/syfrack-render/src/session.rs`
- [GPU Renderer](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/renderer.rs): `crates/syfrack-render/src/renderer.rs`
- [Graph Shader](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/graph_wgsl.rs): `crates/syfrack-render/src/graph_wgsl.rs`
- [Light Guiding](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/guiding.rs): `crates/syfrack-render/src/guiding.rs`
- [Flame Particles](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-render/src/particles.rs): `crates/syfrack-render/src/particles.rs`

### Image Output

- [Color Development](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-color/src/tonemap.rs): `crates/syfrack-color/src/tonemap.rs`
- [Image Export](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-color/src/export.rs): `crates/syfrack-color/src/export.rs`

### Entry Points

- [Render CLI](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-cli/src/main.rs): `crates/syfrack-cli/src/main.rs`
- [Localization](https://github.com/5ymph0en1x/syfrack/blob/main/crates/syfrack-i18n/src/lib.rs): `crates/syfrack-i18n/src/lib.rs`

### Other components

- **Artist**

## Connections

- Artist → Studio UI: edits scenes (evidence: `README.md`)
- Studio UI → Document State: updates state (evidence: `crates/syfrack-app/src/ui/mod.rs`)
- Studio UI → Form Editor: shows editor (evidence: `crates/syfrack-app/src/ui/mod.rs`)
- Studio UI → Scene Controls: shows controls (evidence: `crates/syfrack-app/src/ui/mod.rs`)
- Studio UI → Viewport: shows viewport (evidence: `crates/syfrack-app/src/ui/mod.rs`)
- Studio UI → Scene Browser: opens scenes (evidence: `crates/syfrack-app/src/ui/mod.rs`)
- Studio UI → Gallery: offers gallery (evidence: `README.md`)
- Form Editor → Document State: edits graph (evidence: `crates/syfrack-app/src/ui/form_panel/mod.rs`)
- Scene Controls → Document State: edits scene (evidence: `crates/syfrack-app/src/ui/panels/mod.rs`)
- Viewport → Preview: displays preview (evidence: `crates/syfrack-app/src/ui/viewport.rs`)
- Document State → Scene Model: holds scene (evidence: `crates/syfrack-app/src/state.rs`)
- Scene Browser → Document State: loads scenes (evidence: `crates/syfrack-app/src/ui/file_browser.rs`)
- Scene Model → Scene Parameters: validates values (evidence: `crates/syfrack-core/src/scene/mod.rs`)
- Scene Model → Graph Language: contains graph (evidence: `crates/syfrack-core/src/scene/mod.rs`)
- Graph Evaluation → Scene Model: evaluates fractal (evidence: `crates/syfrack-core/src/scene/graph/eval.rs`)
- Artist → Render CLI: requests render (evidence: `README.md`)
- Render CLI → Render Session: starts render (evidence: `README.md`)
- Preview → Render Session: renders preview
- Render Session → GPU Renderer: dispatches work (evidence: `crates/syfrack-render/src/session.rs`)
- GPU Renderer → Graph Shader: compiles graph (evidence: `crates/syfrack-render/src/renderer.rs`)
- GPU Renderer → Light Guiding: uses guiding (evidence: `crates/syfrack-render/src/renderer.rs`)
- GPU Renderer → Flame Particles: uses particles (evidence: `crates/syfrack-render/src/renderer.rs`)
- Render Session → Color Development: develops image
- Color Development → Image Export: encodes output (evidence: `crates/syfrack-color/src/export.rs`)
- Artist → Localization: chooses language (evidence: `README.md`)
