Architecture Overview¶
DragonFruit follows a domain-driven structure, especially in support-related code.
Core principles¶
- Group by domain/feature, not by generic file type.
- Keep state logic, rendering, and interaction pipelines explicitly separated.
- Use shared interaction infrastructure for cross-feature consistency.
High-level areas¶
src/: frontend app, scene/workflow features, support system.src-tauri/: desktop host and native runtime integration.rust/: native crates (slicing engine, relay, tooling).plugins/: plugin ecosystem and profile extension points.profiles/: printer/material presets.
Handoff shape¶
The most useful handoff docs live beside the domains they describe:
support-system.mdfor support subsystem contractsgrid-and-branching.mdfor grid ownership and trunk promotionraft-geometry.mdfor raft generationscan-positioning.mdfor scan alignment and world-space assumptions
Support architecture split¶
- Primitives: roots, shaft, knot, joint, contact cone.
- Types: trunk, branch, brace, kickstand, leaf, twig, stick.
- Shared logic: snapping, highlighting, interaction guards.
Interaction layering contract¶
- Explicit gizmos
- Placement tools
- Support hover/selection
- Canvas/model fallback
Cross-component suppression must use shared lock/guard patterns to avoid race conditions.