Design Canvas
Visual design and planning interface in Arg0 Desktop.
Overview
The Design Canvas provides a visual interface for designing and planning applications, workflows, and system architectures. It offers drag-and-drop components, visual connections, and real-time collaboration features.
Canvas Features
Visual Components
- Nodes: Represent components, services, or entities
- Connections: Visual lines showing relationships
- Groups: Organize related components
- Annotations: Add notes and labels
- Layers: Manage multiple design layers
Interaction
- Drag and Drop: Move components freely
- Zoom and Pan: Navigate large canvases
- Selection: Select single or multiple items
- Connection Mode: Create connections between nodes
- Context Menu: Quick actions and options
Canvas Elements
Nodes
Nodes represent system components:
typescript
interface Node {
id: string
type: 'service' | 'database' | 'api' | 'component'
label: string
position: { x: number, y: number }
size: { width: number, height: number }
properties: Record<string, any>
}
Node Types:
- Service: Microservices or applications
- Database: Data storage systems
- API: API endpoints or gateways
- Component: UI components or modules
Connections
Connections show relationships between nodes:
typescript
interface Connection {
id: string
source: string
target: string
type: 'data' | 'control' | 'dependency'
label?: string
properties: Record<string, any>
}
Connection Types:
- Data: Data flow between components
- Control: Control flow or triggers
- Dependency: Component dependencies
Groups
Groups organize related components:
typescript
interface Group {
id: string
label: string
nodes: string[]
position: { x: number, y: number }
size: { width: number, height: number }
color?: string
}
Using the Design Canvas
Creating a Design
- Navigate to Design Page
- Click "New Canvas"
- Add nodes from the component palette
- Connect nodes to show relationships
- Add groups to organize components
- Add annotations for documentation
- Save the design
Adding Components
From Palette:
- Open component palette
- Select component type
- Drag onto canvas
- Position as needed
- Configure properties
From Context Menu:
- Right-click on canvas
- Select "Add Node"
- Choose component type
- Configure properties
Creating Connections
- Select connection mode
- Click source node
- Click target node
- Configure connection type
- Add label if needed
- Adjust connection path
Organizing Components
Groups:
- Select multiple nodes
- Right-click and select "Group"
- Name the group
- Customize group appearance
- Resize group as needed
Layers:
- Open layer panel
- Create new layer
- Assign components to layer
- Toggle layer visibility
- Lock layers to prevent changes
Canvas Tools
Selection Tool
Select and manipulate components:
- Click to select single component
- Shift+click for multi-select
- Drag to select area
- Arrow keys for precise movement
Connection Tool
Create connections between components:
- Click source component
- Click target component
- Adjust connection path
- Configure connection properties
Pan Tool
Navigate the canvas:
- Click and drag to pan
- Scroll wheel to zoom
- Double-click to reset view
- Fit to canvas option
Text Tool
Add text annotations:
- Click to add text
- Type annotation
- Format text
- Position as needed
Canvas Properties
Node Properties
Configure individual nodes:
- Label: Display name
- Type: Component type
- Icon: Visual representation
- Color: Custom color
- Size: Dimensions
- Custom Properties: Key-value pairs
Connection Properties
Configure connections:
- Type: Connection type
- Label: Display label
- Style: Line style
- Color: Custom color
- Arrow: Arrow style
- Custom Properties: Key-value pairs
Canvas Properties
Configure overall canvas:
- Name: Canvas name
- Description: Canvas description
- Background: Background color
- Grid: Grid settings
- Snap: Snap to grid
- Dimensions: Canvas size
Export and Import
Export Options
- Image: Export as PNG or SVG
- JSON: Export as JSON for import
- PDF: Export as PDF document
- Code: Generate code from design
Import Options
- JSON: Import from JSON file
- Template: Import from template
- Backup: Restore from backup
Collaboration
Real-time Collaboration
- Multi-user: Multiple users can edit simultaneously
- Cursors: See other users' cursors
- Changes: Real-time change synchronization
- Comments: Add comments to components
Version Control
- History: View change history
- Revert: Revert to previous version
- Branch: Create design branches
- Merge: Merge design changes
Best Practices
Design Organization
- Use consistent naming conventions
- Group related components
- Use color coding for types
- Add annotations for clarity
- Keep designs focused
Connection Design
- Use appropriate connection types
- Label important connections
- Avoid crossing connections
- Use orthogonal routing
- Group related connections
Performance
- Limit canvas size for large designs
- Use layers for complex designs
- Optimize node count
- Use efficient connections
- Regularly save designs
Troubleshooting
Canvas Not Responding
- Check if canvas is loading
- Refresh the page
- Check browser console for errors
- Clear browser cache
- Restart application
Components Not Connecting
- Verify connection mode is active
- Check component types
- Ensure components are not locked
- Check canvas permissions
- Try recreating connection
Export Failing
- Check canvas size
- Verify export format
- Check available disk space
- Try different export format
- Check browser permissions
Related Documentation
- Docs & Plan - Document management
- Workflows - Workflow automation
- Architecture - System architecture