How storytold/vectorcraft works
VectorCraft is a Rust vector-illustration application with desktop, browser, command-line, and agent-driven entry points. The principal editing flow is pointer or command input, tool actions, engine operations on artwork, rendering, and export. The README documents broad illustration, typography, effects, color, and file-format capabilities; the graph preserves these alongside MCP and web access. Some domain links are documented rather than visible in sampled implementation, so those edges are dashed and uncited; unsampled subsystems are represented only where the tree supports a path.
Main entry points: cmd Command engine · lib.rs Renderer · src Editing UI · main.rs Desktop app
Components 21
App entry points
- Desktop app
apps/vectorcraft/src/main.rs - Browser app
apps/vectorcraft-web/src/web.rs - CLI
apps/vectorcraft-cli/src/main.rs
Editing and document
- Editing UI
crates/ui-egui/src - Gesture tools
crates/tools/src - Command engine
crates/engine/src/cmd - Flatten preview
crates/ui-egui/src/panels/flattener_preview.rs - Paragraph editing
crates/ui-egui/src/panels/paragraph.rs
Artwork services
- Text layout
crates/text/src/layout.rs - Font database
crates/text/src/fontdb.rs - Live effects
crates/effects/src/lib.rs - Color management
crates/color/src/lib.rs - Renderer
crates/render/src/lib.rs - SVG import
crates/svg/src/import.rs - SVG export
crates/svg/src/export.rs - Document file I/O
crates/engine/src/cmd/fileio - Image encoders
crates/render/src/encode/mod.rs
Agent interfaces
- MCP server
crates/mcp/src/server.rs - MCP tools
crates/mcp/src/tools.rs - JSON control
apps/vectorcraft/src/control_server.rs
Other components
- Artist
Connections 25
- Artist → Desktop app: edits in
README.md - Artist → Browser app: edits in
README.md - Desktop app → Editing UI: hosts UI
- Browser app → Editing UI: shares UI
README.md - Editing UI → Gesture tools: sends gestures
- Gesture tools → Command engine: emits actions
crates/tools/src/lib.rs - Command engine → Renderer: updates artwork
- Renderer → Image encoders: encodes output
crates/render/src/encode/mod.rs - Command engine → Document file I/O: runs file commands
- Artist → CLI: runs batch jobs
README.md - CLI → Renderer: exports artwork
README.md - Desktop app → JSON control: starts channel
apps/vectorcraft/src/main.rs - JSON control → Command engine: dispatches commands
- Artist → MCP server: requests edits
README.md - MCP server → MCP tools: dispatches tools
crates/mcp/src/server.rs - MCP tools → Command engine: uses command API
README.md - Editing UI → Paragraph editing: shows panel
crates/ui-egui/src/panels/paragraph.rs - Paragraph editing → Text layout: uses text layout
- Text layout → Font database: queries fonts
crates/text/src/lib.rs - Flatten preview → Command engine: requests preview
crates/ui-egui/src/panels/flattener_preview.rs - Command engine → Live effects: applies effects
- Renderer → Live effects: evaluates appearance
crates/render/src/lib.rs - Renderer → Color management: converts colors
crates/color/src/lib.rs - Command engine → SVG import: imports SVG
- Command engine → SVG export: exports SVG