Skip to content

Repository files navigation

◈ Botify Studio

Design Telegram & Bale bots visually. Export real Python code. Deploy anywhere.

A local-first, no-login visual bot builder with live source generation, portable project JSON, and self-contained deployment archives.

English · فارسی — Persian

Python 3.11+ No account Platforms Local-first

Important

Botify Studio is a local development tool, not a public SaaS service. It has no login or per-user isolation. Keep the Studio HTTP server bound to 127.0.0.1; do not expose it publicly without adding authentication, authorization, and TLS. Exported bots are standalone programs and do not need Studio installed on the server.

Overview

Botify Studio turns a visual conversation flow into a deployable Python bot project. Arrange nodes on a canvas, connect branches, edit properties in the Inspector, preview messages in an offline simulator, and download a ZIP containing the actual runnable source code. Workspaces are kept on disk and can be reconstructed on another Studio installation using botify.project.json.

At a glance

Area Capabilities
Visual editor Drag/drop nodes, connect outputs, zoom/pan, undo/redo, node Inspector
Providers Telegram and Bale trigger nodes; send text and inline choice buttons
Logic Messages, questions/variable capture, conditions, choice buttons, end nodes
Live generation Python source automatically regenerated when the workspace is saved
Testing Offline conversation simulation and flow validation
Portability Download standalone bot ZIP; export and import complete workspace JSON
Interface English / فارسی switch with LTR / RTL layout; light / dark theme
Persistence Local filesystem; no account, PostgreSQL, Redis, npm, or pip dependencies for Studio

Quick start

Prerequisites: Python 3.11 or later, a modern browser, and Windows, Linux or macOS. Running Studio does not require Docker, Node.js, npm ci, or installing Python packages.

Windows 10/11

Unzip the project, then double-click start-windows.cmd, or use PowerShell:

cd D:\MY_PROJECT\Botify_Studio
powershell -NoProfile -ExecutionPolicy Bypass -File .\Start-Botify-Studio.ps1

Linux / macOS

cd /path/to/Botify_Studio
chmod +x start-linux.sh
./start-linux.sh

Alternatively, on any supported platform:

python3 app.py

Open http://127.0.0.1:8765/ if your browser does not launch automatically. Close the terminal or press Ctrl+C to stop the Studio server. Your workspaces remain on disk.

Run Studio in Docker (optional)

docker compose up -d --build

The default configuration should remain local-only; consult docker-compose.yml before changing port bindings. Docker is optional for the editor but useful for testing a bot's deployment artifact.

Build your first bot

  1. Create a workspace in the left or right library panel (depending on the UI language), or open the included sample.
  2. Add a Telegram Trigger and/or Bale Trigger node.
  3. Add message, question, condition, button, and end nodes to the canvas.
  4. Click an output port on the right of a source node, then an input port on the left of the target node. Connect each condition/choice branch separately.
  5. Select a node to configure its text, variable name, comparison rule, or button labels in the Inspector.
  6. Watch the Generated Code tab; a real Python project is updated on disk as you edit.
  7. Use the Chat Simulator (no bot token required) and Validation tab before exporting.
  8. Click Download bot code for a standalone ZIP, or Export JSON to save your visual workspace.

Shortcuts: Ctrl+Z undo · Ctrl+Y redo · Delete remove selection · mouse wheel zoom · drag empty canvas to pan. Nodes can also be dragged from the library onto the canvas.

English and Persian / light and dark modes

The two toggles in the main header switch (1) the interface language between FA / EN and (2) the appearance between Dark / Light. The language switch updates lang and dir (RTL for Persian, LTR for English) across navigation, canvas labels, Inspector, modal dialogs, and simulator controls. Preferences are stored in the browser's localStorage and restored on reload.

Important: Switching UI language does not translate existing bot messages, user-defined button labels, node configuration values, source files, or the portable JSON. These belong to the user's bot and remain byte-for-byte untouched by the UI preference. Newly added nodes may start with sample text in the active interface language.

Generated project and deployment

Every workspace has a generated project directory:

data/
└── workspaces/
    └── <workspace-id>/
        ├── workspace.json
        └── generated_project/
            ├── bot.py
            ├── generated_flow.py
            ├── bot_runtime.py
            ├── botify.project.json
            ├── .env.example
            ├── requirements.txt
            ├── Dockerfile
            ├── docker-compose.yml
            ├── botify.service.example
            └── README.md

The same generated project is exported in the ZIP download. The Python bot runtime is independent of the Studio server. Do not edit generated files as your primary source of truth: saving the visual flow regenerates them. Edit the graph, export again, then deploy the updated artifact.

Deploy a bot on a VPS

Extract the generated bot ZIP to your server, set your provider credentials, then run the bot. See its bundled README.md for provider-specific notes.

cp .env.example .env
# Edit .env: enter TELEGRAM_BOT_TOKEN and/or BALE_BOT_TOKEN
python3 bot.py

Or use Docker:

cp .env.example .env
# Set your bot token(s) in .env first
docker compose up -d --build

Bots use long polling, so they generally do not need an incoming HTTPS endpoint or a public domain. The server must be able to make outbound connections to the providers' API hosts. Disable an existing webhook before switching the same token to long polling. Live delivery against real provider accounts has not been certified by the local test suite; verify it with a dedicated test bot before production use.

Never commit actual .env files or bot tokens. Credentials are deliberately excluded from the portable workspace JSON.

Backup and restore with JSON

Click Export JSON, or use the botify.project.json inside any bot ZIP. Import it via Import JSON to create a workspace with the original nodes, edges, positions, text, variables and settings. Botify currently supports schemaVersion: 1 documents; this is not an n8n or arbitrary Telegram schema. This file does not carry real tokens, chat history, or SQLite message data.

For an additional local backup, copy data/workspaces/. When upgrading Studio, preserve your existing data/ directory. Deleting it deletes local workspaces. Do not delete it during routine updates.

Architecture

Browser UI (HTML / CSS / vanilla JavaScript)
    ├── Workspace editor, i18n and theme preferences
    ├── Node palette + Inspector + Chat Simulator
    └── Source preview / JSON + ZIP downloads
               │ HTTP on 127.0.0.1:8765
               ▼
Python standard-library HTTP server (app.py)
    ├── Schema validation (studio/schema.py)
    ├── Local workspace storage (studio/storage.py)
    ├── Deterministic code generation (studio/generator.py)
    └── Offline bot runtime / simulation (studio/bot_runtime.py)
               │
               ▼
Local data/workspaces/* + standalone bot project ZIP

The interface language and theme settings live in the browser, not in the export schema; changing either must never mutate a project file.

Tests

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Test-Botify-Studio.ps1

Or cross-platform:

python3 -m unittest discover -s tests -v

Tests cover schema validation, offline runtime behavior, storage, code generation, import/export, and HTTP endpoints. Browser-facing language/theme regression checks are provided in tests/test_ui_assets.py and can be run with the Python test command above. Real Telegram/Bale delivery and VPS infrastructure must be verified separately.

Troubleshooting

Symptom What to check
Page does not open Confirm Python 3.11+, server is running, and port 8765 is free
Python not found on Windows Install Python and reopen PowerShell; run py -3.11 app.py
Language/theme resets Browser may block localStorage or use a different browser profile
Bot ZIP download disabled Open Validation and connect/fix all required branches
Generated source did not update Wait for auto-save; check the status at the top and server console
Bot does not answer on VPS Verify tokens, outbound network, provider webhook state, and bot logs
Workspace missing after upgrade Restore the backed-up data/workspaces/ directory

Scope and limitations

Botify Studio currently supports seven node types: telegram_trigger, bale_trigger, message, question, condition, buttons, and end. It does not yet include AI/RAG, media uploads, payments, arbitrary HTTP/code nodes, multi-user cloud access or guaranteed exactly-once delivery across all provider failures. Treat it as a local-first development tool and test exported bots before real-world use.

References


Botify Studio · **Visual workflow → Generated Python → Standalone ZIP → Portable JSON**

Read this documentation in فارسی

Releases

Packages

Contributors

Languages