Logic Builder Guide
Ecosistema completo para organización y gestión de contenido con interfaces espaciales
🎨 Singularity Logic Builder Guide
🚀 THE ULTIMATE VISUAL LOGIC CREATION SYSTEM 🚀
The Singularity Logic Builder is a revolutionary visual programming interface that allows you to create, connect, and execute complex logic flows without writing code. This guide covers everything you need to know to master the Logic Builder.
📋 Table of Contents
- Getting Started
- Canvas Navigation
- Block Types and Usage
- Connection System
- Block Properties
- Advanced Features
- Best Practices
- Troubleshooting
🎯 Getting Started
Opening the Logic Builder
- Navigate to Singularity at
http://localhost:5400 - Click on "Logic Builder" in the main navigation
- You'll see the infinite canvas with the block library on the right
Your First Logic Block
Creating a Test Block:
- Click the "Create Test Block" button in the toolbar
- A sample block appears on the canvas
- Click and drag to move it around
- Double-click to edit its properties
Adding Blocks from Library:
- Browse the Block Library on the right panel
- Drag any block template onto the canvas
- Drop it where you want to place it
- The block is automatically created and positioned
🖱️ Canvas Navigation
Essential Controls
Mouse Controls:
- Left Click + Drag: Move individual blocks
- Middle Click + Drag: Pan the entire canvas
- Mouse Wheel: Zoom in/out (hold Ctrl for precision)
- Right Click: Context menu (on blocks or canvas)
Keyboard Shortcuts:
- Space: Toggle AI Assistant
- Ctrl + 0: Reset zoom to 100%
- Ctrl + F: Fit all blocks in view
- Delete: Remove selected blocks
- Ctrl + C/V: Copy and paste blocks
- Ctrl + Z/Y: Undo and redo actions
Canvas Toolbar
View Controls:
- 🔍 Zoom In/Out: Precise zoom control
- 🎯 Center View: Center all blocks in viewport
- 📏 Fit to View: Scale to show all blocks
- 🔄 Reset View: Return to default position and zoom
Canvas Info:
- Block Count: Shows total blocks on canvas
- Zoom Level: Current zoom percentage
- Connection Status: When connecting blocks
🧱 Block Types and Usage
🔥 Trigger Blocks (Green)
Purpose: Start points for your logic flows
Available Triggers:
- Button Click: Responds to UI button presses
- Form Submit: Triggers on form submissions
- Timer: Executes on schedule or intervals
- API Webhook: Responds to external API calls
- Database Change: Triggers on data modifications
- User Action: Custom user interaction events
Configuration:
- Event Type: What triggers the block
- Parameters: Input data structure
- Conditions: When the trigger should fire
- Rate Limiting: Prevent excessive triggering
⚡ Condition Blocks (Yellow)
Purpose: Decision points that branch your logic
Available Conditions:
- If/Else: Simple true/false branching
- Switch: Multiple condition branching
- Compare Values: Numerical and text comparisons
- Data Validation: Check data formats and rules
- User Permissions: Access control checks
- Time/Date: Schedule-based conditions
Configuration:
- Condition Logic: The test to perform
- True Path: What happens when condition passes
- False Path: What happens when condition fails
- Default Case: Fallback for switch blocks
🎯 Action Blocks (Blue)
Purpose: Perform operations and execute tasks
Available Actions:
- Database Query: Read/write database operations
- API Call: External service integration
- Send Email: Email notifications and marketing
- File Operations: Upload, download, process files
- Calculations: Mathematical and text operations
- Transformations: Data format conversions
Configuration:
- Operation Type: What action to perform
- Parameters: Input data and settings
- Error Handling: What to do on failure
- Retry Logic: How to handle temporary failures
📤 Output Blocks (Purple)
Purpose: Return results and complete logic flows
Available Outputs:
- Success Response: Successful completion data
- Error Response: Error information and codes
- Redirect: Navigate to different pages
- Data Return: Structured data responses
- Status Update: Progress and state information
- Logging: Record execution information
Configuration:
- Response Format: JSON, text, or custom
- Status Codes: HTTP response codes
- Headers: Custom response headers
- Caching: Response caching settings
🔗 Connection System
Creating Connections
Simple Connection:
- Click on the output port (right side) of a block
- You'll see a preview line following your mouse
- Click on the input port (left side) of the target block
- Connection is created automatically
Connection Indicators:
- Green Dots: Available connection points
- Blue Lines: Established connections
- Yellow Lines: Connection preview while dragging
- Red Indicators: Invalid connection attempts
Connection Types
Data Connections (Solid Lines):
- Pass data between blocks
- Type-safe data transfer
- Automatic data validation
- Real-time data flow preview
Execution Connections (Dashed Lines):
- Control flow between blocks
- Determine execution order
- Handle success/error paths
- Conditional execution paths
Advanced Connection Features
Smart Connection Suggestions:
- AI suggests logical next blocks
- Compatible blocks are highlighted
- Invalid connections are prevented
- Optimal flow recommendations
Connection Properties:
- Right-click any connection to configure
- Add data transformations
- Set conditional execution
- Configure error handling
⚙️ Block Properties
Basic Properties Panel
Essential Settings:
- Name: Descriptive block identifier
- Title: Display name on canvas
- Description: Detailed functionality explanation
- Category: Organization and filtering
- Color: Visual customization
- Icon: Block representation
Input/Output Configuration
Input Ports:
- Port Name: Identifier for connections
- Data Type: Expected data format (string, number, object, etc.)
- Required: Whether input is mandatory
- Default Value: Fallback when no input provided
- Validation: Input validation rules
Output Ports:
- Port Name: Output identifier
- Data Type: Output data format
- Description: What the output represents
- Conditional: Whether output depends on logic
Execution Settings
Performance Options:
- Timeout: Maximum execution time
- Retry Count: Number of retry attempts
- Cache Results: Store outputs for reuse
- Parallel Execution: Run alongside other blocks
Error Handling:
- On Error: What to do when block fails
- Error Output: Where to send error information
- Fallback Logic: Alternative execution path
- Error Logging: How to record failures
🚀 Advanced Features
🤖 AI-Powered Logic Creation
Natural Language Block Creation:
- Open the AI Assistant (Space key)
- Describe what you want: "Create user validation logic"
- AI generates appropriate blocks and connections
- Review and customize the generated logic
Smart Suggestions:
- AI suggests improvements while you work
- Recommends missing error handling
- Identifies performance optimizations
- Suggests better connection patterns
📚 Block Library Management
Custom Block Creation:
- Select existing blocks you want to template
- Right-click and choose "Create Template"
- Configure template properties and inputs
- Save to your library for reuse
Block Organization:
- Create custom categories
- Tag blocks for easy searching
- Rate blocks for team recommendations
- Share blocks with team members
🔄 Real-Time Execution
Live Testing:
- Execute individual blocks during development
- See real-time data flow between blocks
- Monitor execution performance
- Debug issues immediately
Execution Tracing:
- Step-by-step execution visualization
- Data transformation at each step
- Performance metrics per block
- Error propagation tracking
📊 Canvas Analytics
Performance Monitoring:
- Execution time per block
- Data throughput measurements
- Error rate tracking
- Resource usage analysis
Flow Optimization:
- Identify bottlenecks
- Suggest parallel processing
- Recommend caching strategies
- Optimize connection paths
💡 Best Practices
🎨 Visual Organization
Canvas Layout:
- Group related blocks together
- Use consistent spacing between blocks
- Align blocks in logical flow patterns
- Color-code blocks by functionality
Naming Conventions:
- Use descriptive, consistent names
- Include version numbers for iterations
- Add purpose indicators (e.g., "Validate_User_Email_v2")
- Use team naming standards
🔧 Logic Design
Flow Structure:
- Start with clear trigger definitions
- Add comprehensive error handling
- Include logging and monitoring
- Design for scalability from the start
Data Management:
- Validate all inputs thoroughly
- Transform data at block boundaries
- Handle null/undefined values gracefully
- Use consistent data formats
⚡ Performance Optimization
Execution Efficiency:
- Cache expensive operations
- Use parallel processing where possible
- Minimize database calls
- Implement proper timeout handling
Resource Management:
- Monitor memory usage
- Clean up temporary data
- Use connection pooling
- Implement rate limiting
🔒 Security Considerations
Data Protection:
- Validate all user inputs
- Sanitize data for database operations
- Use parameterized queries
- Encrypt sensitive data
Access Control:
- Implement proper authentication
- Use role-based permissions
- Log all access attempts
- Monitor for suspicious activity
🔍 Troubleshooting
Common Issues
Blocks Not Connecting:
- ✅ Check port data type compatibility
- ✅ Ensure output connects to input
- ✅ Verify blocks are close enough
- ✅ Look for visual connection indicators
Logic Not Executing:
- ✅ Verify trigger block is properly configured
- ✅ Check all required inputs are connected
- ✅ Review error logs in the dashboard
- ✅ Test individual blocks first
Performance Issues:
- ✅ Monitor execution times in dashboard
- ✅ Check for infinite loops
- ✅ Optimize database queries
- ✅ Implement caching where appropriate
Data Not Persisting:
- ✅ Check database connections
- ✅ Verify transaction handling
- ✅ Review error handling logic
- ✅ Monitor database logs
Debug Tools
Execution Tracing:
- Select the logic flow to debug
- Click "Debug Mode" in the toolbar
- Execute the logic step-by-step
- Inspect data at each connection point
Performance Profiling:
- Enable profiling in canvas settings
- Execute your logic flow
- Review performance metrics
- Identify and optimize bottlenecks
Error Analysis:
- Check the error panel for issues
- Review execution logs
- Use step-by-step debugging
- Check connection data types
📈 Advanced Workflows
🔄 Complex Logic Patterns
Parallel Processing:
Trigger → Fork Block → [ Action A, Action B, Action C ] → Join Block → Output
Conditional Branching:
Trigger → Condition → [ True Path → Action 1, False Path → Action 2 ] → Output
Loop Processing:
Trigger → Data Input → For Each Block → Process Item → Collect Results → Output
📊 Data Processing Pipelines
ETL (Extract, Transform, Load):
- Extract: Database Query or API Call blocks
- Transform: Data transformation and validation blocks
- Load: Database Insert or API Post blocks
Real-Time Analytics:
- Collect: Event trigger blocks
- Aggregate: Mathematical operation blocks
- Store: Database or cache blocks
- Visualize: Output to dashboard blocks
🌐 Integration Patterns
Microservice Integration:
API Trigger → Authentication → Route to Service → Process → Return Response
Event-Driven Architecture:
Event Trigger → Process → Publish Event → [ Multiple Subscribers ] → Responses
Workflow Orchestration:
Start → [ Step 1 → Step 2 → Step 3 ] → Completion Notification → End
🎯 Use Case Examples
User Registration Flow
- Form Submit Trigger → Captures user registration data
- Validation Block → Checks email format, password strength
- Database Check → Verifies email not already registered
- Create User Block → Inserts new user record
- Send Welcome Email → Automated welcome message
- Success Response → Confirmation to user
Payment Processing
- Payment Trigger → Receives payment request
- Amount Validation → Checks payment amount
- Payment Gateway → Processes credit card
- Update Account → Records transaction
- Send Receipt → Email confirmation
- Response Block → Success/failure status
Data Synchronization
- Schedule Trigger → Runs every hour
- Source Query → Fetches updated records
- Transform Data → Converts format
- Target Update → Updates destination
- Log Results → Records sync status
- Error Notification → Alerts on failures
🎉 Mastering the Logic Builder
🚀 You Now Know:
- Canvas Navigation: Zoom, pan, and organize effectively
- Block Creation: Use all block types for comprehensive logic
- Connection System: Create robust data and execution flows
- AI Integration: Leverage AI for faster development
- Performance Optimization: Build efficient, scalable logic
- Best Practices: Follow proven patterns and standards
- Debugging: Troubleshoot and optimize your logic flows
🌟 Next Steps:
- Practice: Create simple flows to build confidence
- Experiment: Try advanced patterns and AI suggestions
- Optimize: Use performance tools to improve efficiency
- Share: Collaborate with team members on logic flows
- Scale: Deploy your logic to production environments
🔥 You're Ready to Build Extraordinary Logic!
The Singularity Logic Builder puts the power of visual programming at your fingertips. Use it to create logic that's:
- Faster to Build: Visual interface vs. traditional coding
- Easier to Understand: Clear visual flow representation
- Simpler to Maintain: Drag-and-drop modifications
- Better Performing: Built-in optimization recommendations
- More Collaborative: Team-friendly visual sharing
Welcome to the future of logic creation! 🌌
Logic Builder Guide v1.0 - Complete Feature Coverage
Part of the Singularity Universal Logic Orchestration System
For updates and advanced techniques, see the full documentation portal