A visual, node-based IDE for designing complex Telegram bot automation scenarios.
- Infinite Canvas Workspace: Engineered a custom 2D canvas with mouse-wheel zooming, space-bar panning, and a dot-grid background.
- Node-Based Architecture: Visually map out Telegram bot logic (Commands, Messages, API calls) using draggable SVG-connected nodes.
- Dynamic Property Inspector: A contextual right sidebar that instantly adapts its UI based on the selected node type (e.g., showing Inline Keyboard editors for Message nodes).
- Zero Dependencies for Drag & Drop: Built strictly with Preact state and native DOM events for maximum performance and UI fluidity without bloated DND libraries.
src/
|-- main.tsx # Application entry point
`-- app.tsx # Monolithic IDE interface handling Canvas, State, and Paneling
npm install
npm run devOpen http://localhost:5173.
Controls: Click and drag nodes to move them. Hold Space and drag to pan the canvas. Use Ctrl + Scroll to zoom in and out. Click on a node to open the Property Inspector.
- Desktop-Exclusive UI: This template is engineered specifically for desktop viewports. Mobile responsiveness and touch-events are omitted by design, as complex node-based IDEs require precise pointer interactions and a large workspace.
- Static Edge Creation: While nodes can be dragged and existing SVG edges dynamically recalculate their Bezier curves in real-time, the ability to draw new connections by dragging between ports is not included. This was done to keep the monolithic
app.tsxlightweight and understandable. - State Export: Currently, the graph state (
nodesandedges) is kept in memory. To integrate with a backend, attach anonClickhandler to the "Save" button to serialize the state into JSON andPOSTit to your server/database. - Monolithic Architecture: For demonstration purposes, the entire Canvas, Sidebar, and State logic is contained within
app.tsx. For production use, it is highly recommended to split this into smaller components (<Canvas />,<Node />,<Inspector />).
npm run build
npm run previewThe repository includes a highly optimized vercel.json for Vite static SPA deployment, ensuring perfect client-side routing.
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"framework": "vite",
"buildCommand": "npm run build",
"outputDirectory": "dist",
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}MIT License. See LICENSE.