# thien-lee-44/synthetic-data-engine architecture

> Architecture diagram of the GitHub repository thien-lee-44/synthetic-data-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thien-lee-44/synthetic-data-engine
- Repository: https://github.com/thien-lee-44/synthetic-data-engine

## Overview

This is a Python 3D scene editor and synthetic-data engine. Users author ECS-based scenes in the Qt interface, manipulate and render them through the engine facade, then save/export projects or generate labeled computer-vision datasets and run benchmarks. The graph preserves the documented editing, rendering, animation, asset, serialization, and synthetic-data capabilities. Some UI and rendering internals are unsampled; their connections are omitted unless supported by the README or source index.

Main entry points: [`src/engine/engine.py`](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/engine.py) (Engine facade), [`src/engine/scene/scene_manager.py`](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/scene_manager.py) (Scene manager), [`src/ui`](https://github.com/thien-lee-44/synthetic-data-engine/tree/main/src/ui) (Authoring UI), [`src/app/main.py`](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/app/main.py) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_bootstrap["App bootstrap<br/>[main.py]"]
  node_config["App configuration<br/>[config.py]"]
  node_events["App events<br/>[events.py]"]
  node_errors["Error handling<br/>[error_handler.py]"]
end

subgraph group_editor["Scene Editing"]
  node_ui["Authoring UI"]
  node_engine["Engine facade<br/>[engine.py]"]
  node_interaction["Viewport interaction"]
  node_scene["Scene manager<br/>[scene_manager.py]"]
  node_ecs["Entities &amp; components<br/>[entity.py]"]
  node_semantic["Semantic annotations<br/>[semantic_cmp.py]"]
  node_serialization["Project &amp; undo state"]
end

subgraph group_render["Rendering &amp; Assets"]
  node_renderer["Editor renderer<br/>[editor_renderer.py]"]
  node_synthetic_renderer["Dataset renderer"]
  node_resources["Asset resources"]
  node_primitives["Procedural geometry<br/>[primitives.py]"]
  node_exporter["Scene OBJ export<br/>[exporter.py]"]
end

subgraph group_animation["Animation"]
  node_animation["Animation system<br/>[animator.py]"]
  node_animation_data["Animation tracks<br/>[animation_cmp.py]"]
end

subgraph group_synthetic["Synthetic Data"]
  node_generator["Dataset generator<br/>[generator.py]"]
  node_writers["Dataset exporters"]
  node_benchmark["CV benchmark<br/>[cv_benchmark.py]"]
end

node_user(("Editor user"))

node_user -->|"authors scenes"| node_ui
node_bootstrap -->|"starts"| node_ui
node_bootstrap -->|"creates"| node_engine
node_bootstrap -->|"emits refresh events"| node_events
node_ui -.->|"issues commands"| node_engine
node_engine -->|"delegates scene operations"| node_scene
node_engine -->|"initializes"| node_interaction
node_engine -->|"initializes"| node_renderer
node_engine -->|"initializes"| node_synthetic_renderer
node_engine -->|"loads project assets"| node_resources
node_engine -->|"spawns primitives"| node_primitives
node_engine -->|"owns animator"| node_animation
node_engine -->|"runs generation"| node_generator
node_engine -->|"runs benchmark"| node_benchmark
node_engine -.->|"exports scene"| node_exporter
node_scene -->|"registers entities"| node_ecs
node_scene -->|"routes serialization"| node_serialization
node_scene -->|"routes semantic edits"| node_semantic
node_scene -->|"routes animation edits"| node_animation_data
node_serialization -->|"records project assets"| node_resources
node_serialization -->|"reconstructs entities"| node_ecs
node_animation -->|"evaluates tracks"| node_animation_data
node_renderer -->|"uses cached assets"| node_resources
node_renderer -->|"uses geometry"| node_primitives
node_synthetic_renderer -->|"reads annotations"| node_semantic
node_engine -.->|"renders dataset frames"| node_synthetic_renderer
node_generator -->|"writes dataset outputs"| node_writers
node_generator -->|"reads scene labels"| node_semantic
node_user -.->|"requests dataset evaluation"| node_benchmark
node_errors -->|"shows error dialogs"| node_ui

click node_bootstrap "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/app/main.py"
click node_config "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/app/config.py"
click node_events "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/app/events.py"
click node_errors "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/ui/error_handler.py"
click node_ui "https://github.com/thien-lee-44/synthetic-data-engine/tree/main/src/ui"
click node_engine "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/engine.py"
click node_interaction "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/core/interaction_manager.py"
click node_scene "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/scene_manager.py"
click node_ecs "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/entity.py"
click node_semantic "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/components/semantic_cmp.py"
click node_serialization "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/managers/serialization_manager.py"
click node_renderer "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/graphics/editor_renderer.py"
click node_synthetic_renderer "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/graphics/synthetic_renderer.py"
click node_resources "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/resources/resource_manager.py"
click node_primitives "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/geometry/primitives.py"
click node_animation "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/animator.py"
click node_animation_data "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/components/animation_cmp.py"
click node_generator "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/synthetic/generator.py"
click node_writers "https://github.com/thien-lee-44/synthetic-data-engine/tree/main/src/engine/synthetic/exporters"
click node_benchmark "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/synthetic/cv_benchmark.py"
click node_exporter "https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/resources/exporter.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_bootstrap,node_config,node_events,node_errors,node_user toneBlue
class node_ui,node_engine,node_interaction,node_scene,node_ecs,node_semantic,node_serialization toneAmber
class node_renderer,node_synthetic_renderer,node_resources,node_primitives,node_exporter toneMint
class node_animation,node_animation_data toneRose
class node_generator,node_writers,node_benchmark toneIndigo
```

## Components

### Application

- [App bootstrap](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/app/main.py): `src/app/main.py`
- [App configuration](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/app/config.py): `src/app/config.py`
- [App events](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/app/events.py): `src/app/events.py`
- [Error handling](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/ui/error_handler.py): `src/ui/error_handler.py`

### Scene Editing

- [Authoring UI](https://github.com/thien-lee-44/synthetic-data-engine/tree/main/src/ui): `src/ui`
- [Engine facade](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/engine.py): `src/engine/engine.py`
- [Viewport interaction](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/core/interaction_manager.py): `src/engine/core/interaction_manager.py`
- [Scene manager](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/scene_manager.py): `src/engine/scene/scene_manager.py`
- [Entities & components](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/entity.py): `src/engine/scene/entity.py`
- [Semantic annotations](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/components/semantic_cmp.py): `src/engine/scene/components/semantic_cmp.py`
- [Project & undo state](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/managers/serialization_manager.py): `src/engine/scene/managers/serialization_manager.py`

### Rendering & Assets

- [Editor renderer](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/graphics/editor_renderer.py): `src/engine/graphics/editor_renderer.py`
- [Dataset renderer](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/graphics/synthetic_renderer.py): `src/engine/graphics/synthetic_renderer.py`
- [Asset resources](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/resources/resource_manager.py): `src/engine/resources/resource_manager.py`
- [Procedural geometry](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/geometry/primitives.py): `src/engine/geometry/primitives.py`
- [Scene OBJ export](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/resources/exporter.py): `src/engine/resources/exporter.py`

### Animation

- [Animation system](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/animator.py): `src/engine/scene/animator.py`
- [Animation tracks](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/scene/components/animation_cmp.py): `src/engine/scene/components/animation_cmp.py`

### Synthetic Data

- [Dataset generator](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/synthetic/generator.py): `src/engine/synthetic/generator.py`
- [Dataset exporters](https://github.com/thien-lee-44/synthetic-data-engine/tree/main/src/engine/synthetic/exporters): `src/engine/synthetic/exporters`
- [CV benchmark](https://github.com/thien-lee-44/synthetic-data-engine/blob/main/src/engine/synthetic/cv_benchmark.py): `src/engine/synthetic/cv_benchmark.py`

### Other components

- **Editor user**

## Connections

- Editor user → Authoring UI: authors scenes (evidence: `README.md`)
- App bootstrap → Authoring UI: starts (evidence: `src/app/main.py`)
- App bootstrap → Engine facade: creates (evidence: `src/app/main.py`)
- App bootstrap → App events: emits refresh events (evidence: `src/app/main.py`)
- Authoring UI → Engine facade: issues commands (evidence: `README.md`)
- Engine facade → Scene manager: delegates scene operations (evidence: `src/engine/engine.py`)
- Engine facade → Viewport interaction: initializes (evidence: `src/engine/engine.py`)
- Engine facade → Editor renderer: initializes (evidence: `src/engine/engine.py`)
- Engine facade → Dataset renderer: initializes (evidence: `src/engine/engine.py`)
- Engine facade → Asset resources: loads project assets (evidence: `src/engine/engine.py`)
- Engine facade → Procedural geometry: spawns primitives (evidence: `src/engine/engine.py`)
- Engine facade → Animation system: owns animator (evidence: `src/engine/engine.py`)
- Engine facade → Dataset generator: runs generation (evidence: `src/engine/engine.py`)
- Engine facade → CV benchmark: runs benchmark (evidence: `src/engine/engine.py`)
- Engine facade → Scene OBJ export: exports scene
- Scene manager → Entities & components: registers entities (evidence: `src/engine/scene/scene_manager.py`)
- Scene manager → Project & undo state: routes serialization (evidence: `src/engine/scene/scene_manager.py`)
- Scene manager → Semantic annotations: routes semantic edits (evidence: `src/engine/scene/scene_manager.py`)
- Scene manager → Animation tracks: routes animation edits (evidence: `src/engine/scene/scene_manager.py`)
- Project & undo state → Asset resources: records project assets (evidence: `src/engine/scene/managers/serialization_manager.py`)
- Project & undo state → Entities & components: reconstructs entities (evidence: `src/engine/scene/managers/serialization_manager.py`)
- Animation system → Animation tracks: evaluates tracks (evidence: `src/engine/scene/animator.py`)
- Editor renderer → Asset resources: uses cached assets (evidence: `src/engine/graphics/editor_renderer.py`)
- Editor renderer → Procedural geometry: uses geometry (evidence: `src/engine/graphics/editor_renderer.py`)
- Dataset renderer → Semantic annotations: reads annotations (evidence: `src/engine/graphics/synthetic_renderer.py`)
- Engine facade → Dataset renderer: renders dataset frames (evidence: `src/engine/engine.py`)
- Dataset generator → Dataset exporters: writes dataset outputs (evidence: `src/engine/synthetic/generator.py`)
- Dataset generator → Semantic annotations: reads scene labels (evidence: `src/engine/synthetic/generator.py`)
- Editor user → CV benchmark: requests dataset evaluation (evidence: `README.md`)
- Error handling → Authoring UI: shows error dialogs (evidence: `src/ui/error_handler.py`)
