Back to Home

Live Playground

Test all x2y dev tools in real-time. Write code, execute it instantly, and see actual output without installation.

Select Tool

$ node playground.js
Click "Execute Code" to see output...

Real Code Execution

Test actual SDK code patterns with realistic terminal output and performance metrics.

Instant Feedback

See API monitoring, predictions, and refactoring suggestions execute in real-time.

No Installation Required

Try the SDK directly without npm install. Build confidence before committing.

Production Architecture

Containerized Execution

Browser
↓ WebSocket
Express Server
↓ Docker API
🐳 Isolated Container
• 256MB Memory Limit
• 50% CPU Quota
• No Network Access
• Read-only Filesystem
• Dropped Capabilities
• Auto Cleanup on Close
Sandboxed Shell

Security Hardening

  • Network Isolation

    NetworkMode: 'none' prevents outbound connections

  • Resource Limits

    Memory, CPU, and PID limits prevent DoS

  • Capability Dropping

    CAP_DROP: ALL prevents privilege escalation

  • Filesystem Security

    Read-only rootfs with no mount access

  • Session Isolation

    Each browser session gets unique container

Self-Host with Docker

Deploy your own secure terminal with Docker containerization. Each user session runs in an isolated, resource-limited container.

# 1. Install dependencies
npm install express ws dockerode uuid
# 2. Run security hardening
chmod +x security-hardening.sh
sudo ./security-hardening.sh
# 3. Start server
node docker-terminal-server.js

View the complete Docker server implementation in the SDK documentation. Includes WebSocket API, container lifecycle management, and security policies.

Note: This browser playground uses simulated execution for demonstration. For production use, deploy with the Docker containerized backend to achieve true sandbox isolation. Code samples remain faithful to real SDK behavior and execution patterns.

Built with v0