A powerful, extensible development environment that allows you to create, test, and experiment with various tools and workflows in a flexible canvas-based workspace.
- Interactive Workspace: Drag-and-drop interface for tool placement and organization
- Modular Tool System: Easily create and add new tools
- Real-time Updates: All tools update and interact in real-time
- Type-safe: Built with TypeScript for robust development
- Extensible: Built-in plugin architecture for adding new capabilities
-
Code Editor
- Write and edit code in real-time
- Syntax highlighting ready for implementation
- Code execution capabilities
-
Console
- Execute JavaScript code
- View output and errors
- Command history support
-
Data Explorer
- Store and manage key-value pairs
- Persistent data storage
- Visual data management
-
Flow Editor
- Create visual workflows
- Connect nodes with actions
- Drag-and-drop node placement
-
Rules Engine
- Define conditional rules
- Set up automated actions
- Enable/disable rules dynamically
-
Object Inspector
- Examine object properties
- Modify values in real-time
- Nested object support
src/
├── components/ # Reusable UI components
│ ├── Workspace.tsx # Main workspace container
│ └── ToolPalette.tsx # Tool selection sidebar
├── tools/ # Individual tool implementations
│ ├── index.ts # Tool registry and definitions
│ ├── CodeEditor.tsx # Code editing tool
│ ├── Console.tsx # Interactive console
│ ├── DataExplorer.tsx# Data management
│ ├── FlowEditor.tsx # Visual flow editor
│ ├── RulesEngine.tsx # Rules and automation
│ └── ObjectInspector.tsx # Object property inspector
├── types/ # TypeScript type definitions
│ └── index.ts # Core type definitions
└── App.tsx # Root application component
Tools are the fundamental building blocks of the playground. Each tool:
- Has a unique identifier
- Maintains its own state
- Can be positioned anywhere in the workspace
- Can interact with other tools
interface Tool {
id: string; // Unique identifier
type: string; // Tool type (e.g., 'codeEditor')
position: { // Position in workspace
x: number;
y: number;
};
size: { // Tool dimensions
width: number;
height: number;
};
data: any; // Tool-specific state
}The workspace (Workspace.tsx) handles:
- Tool positioning and layout
- Tool state management
- Inter-tool communication
- Grid system for alignment
New tools can be added by:
- Creating a tool component
- Adding tool definition to
tools/index.ts - Implementing required interfaces
Example:
const toolDefinition: ToolDefinition = {
type: 'myTool',
name: 'My Tool',
icon: ToolIcon,
component: MyToolComponent,
defaultSize: { width: 400, height: 300 }
};- Create a new tool component in
src/tools/ - Implement the
ToolPropsinterface - Add tool definition to
tools/index.ts - Add any necessary types to
types/index.ts
Example:
import { ToolProps } from '../types';
export default function NewTool({ tool, onUpdate }: ToolProps) {
// Tool implementation
return (
<div>
{/* Tool UI */}
</div>
);
}Tools can communicate through:
- Direct connections (implemented via the
onConnectprop) - Shared state management (can be added via Redux/Context)
- Event system (can be implemented for pub/sub patterns)
The project uses:
- Tailwind CSS for utility-first styling
- Custom utilities for specific needs (e.g., grid pattern)
- Consistent color scheme and spacing
-
Data Persistence
- Local storage integration
- Backend API connection
- State synchronization
-
Tool Enhancements
- More tool types
- Advanced tool interactions
- Custom tool creation UI
-
Workspace Features
- Multiple workspaces
- Workspace templates
- Import/export functionality
-
Collaboration
- Real-time collaboration
- Shared workspaces
- User permissions
-
Install dependencies:
npm install
-
Start development server:
npm run dev
-
Build for production:
npm run build