How just2alim/bot-s works
Bot(s) KZ is a web platform for creating, configuring, and operating Telegram bots. Owners authenticate, describe a business, optionally generate a draft with AI, edit a visual workflow, configure content and launch the bot; they can then manage bots and respond to customer messages in the inbox. The React client calls a Node.js API, which operates bots and connects to Supabase, Telegram, and Ollama. README documents server-side token encryption, inbox storage, onboarding, and the admin response view; unsampled server implementation limits detail on internal routing.
Main entry points: App.jsx Route application · CreateBotContext.jsx Bot workspace state · server.js Platform API & bot runtime · api.js API request helper
Components 26
Web application
- Route application
src/App.jsx - Account access
src/pages/Auth.jsx - Workspace shell
src/layouts/AppLayout.jsx - Onboarding & tour
src/pages/Welcome.jsx - Admin responses
src/pages/AdminResponses.jsx
Bot authoring
- Bot workspace state
src/context/CreateBotContext.jsx - Business description & AI draft
src/pages/CreateBotDescribe.jsx - Feature setup
src/pages/CreateBotStructure.jsx - Workflow model & presets
src/workflow.js - Visual flow editor
src/pages/BotFlowEditor.jsx - Bot content setup
src/pages/CreateBotSetup.jsx - Telegram token setup
src/pages/CreateBotToken.jsx - Bot launch
src/pages/CreateBotLaunch.jsx - Workspace browser storage
src/workspace-storage.js
Bot platform
- Platform API & bot runtime
server.js - API request helper
src/lib/api.js - AI safety checks
src/ai-safety.js - Supabase client
src/lib/supabase.js
Owner operations
- Bot management
src/pages/MyBots.jsx - Customer inbox
src/pages/Inbox.jsx - Account settings
src/pages/Settings.jsx
External services
- Supabase application data
supabase/schema.sql - Encrypted bot secrets
supabase/schema.sql - Telegram API
- Ollama model
Other components
- Bot owner
Connections 44
- Bot owner → Route application: uses
README.md - Route application → Account access: routes to
src/App.jsx - Route application → Workspace shell: routes through
src/App.jsx - Route application → Business description & AI draft: routes to
src/App.jsx - Route application → Feature setup: routes to
src/App.jsx - Route application → Visual flow editor: routes to
src/App.jsx - Route application → Bot content setup: routes to
src/App.jsx - Route application → Telegram token setup: routes to
src/App.jsx - Route application → Bot launch: routes to
src/App.jsx - Route application → Bot management: routes to
src/App.jsx - Route application → Customer inbox: routes to
src/App.jsx - Route application → Account settings: routes to
src/App.jsx - Route application → Onboarding & tour: routes to
src/App.jsx - Route application → Admin responses: routes to
src/App.jsx - Workspace shell → Supabase client: checks session
src/layouts/AppLayout.jsx - Workspace shell → Onboarding & tour: gates workspace
src/layouts/AppLayout.jsx - Account access → Supabase client: authenticates with
src/pages/Auth.jsx - Business description & AI draft → Bot workspace state: updates
src/pages/CreateBotDescribe.jsx - Business description & AI draft → API request helper: sends AI requests
src/pages/CreateBotDescribe.jsx - Visual flow editor → Workflow model & presets: edits
src/pages/BotFlowEditor.jsx - Visual flow editor → Bot workspace state: loads and updates
src/pages/BotFlowEditor.jsx - Visual flow editor → API request helper: saves configuration
src/pages/BotFlowEditor.jsx - Bot workspace state → Workflow model & presets: creates defaults
src/context/CreateBotContext.jsx - Bot workspace state → Workspace browser storage: persists state
src/context/CreateBotContext.jsx - Bot workspace state → Supabase client: tracks auth session
src/context/CreateBotContext.jsx - Bot content setup → Bot workspace state: updates
src/context/CreateBotContext.jsx - Feature setup → Bot workspace state: updates
src/context/CreateBotContext.jsx - Telegram token setup → Bot workspace state: updates
src/pages/CreateBotToken.jsx - Bot launch → Bot workspace state: reads configuration
src/pages/CreateBotLaunch.jsx - Bot launch → API request helper: requests launch
src/pages/CreateBotLaunch.jsx - API request helper → Platform API & bot runtime: forwards requests
README.md - Platform API & bot runtime → Telegram API: polls and operates bots
README.md - Platform API & bot runtime → Ollama model: requests builder AI
README.md - Platform API & bot runtime → Supabase application data: reads and writes app data
README.md - Platform API & bot runtime → Encrypted bot secrets: stores encrypted tokens
README.md - Platform API & bot runtime → AI safety checks: uses safety checks
server.js - Bot management → API request helper: manages bots
src/pages/MyBots.jsx - Customer inbox → Supabase client: loads inbox data
src/pages/Inbox.jsx - Customer inbox → API request helper: sends owner actions
src/pages/Inbox.jsx - Platform API & bot runtime → Supabase application data: persists customer messages
README.md - Admin responses → Supabase client: loads responses
src/pages/AdminResponses.jsx - Account settings → Supabase client: reads account data
src/pages/Settings.jsx - Account settings → API request helper: updates platform settings
src/pages/Settings.jsx - Onboarding & tour → Supabase client: saves onboarding
src/pages/Welcome.jsx