Module Structure π‘ BETA
The repository is a Cargo workspace of 123 members: six application crates, 117 feature crates under botserver/crates/ and two vendored crates excluded from the workspace.
Authority: [workspace] members and [workspace.package] in the root Cargo.toml, plus each crate's own manifest. Two vendored office-document crates (3rdparty/docx-rs, 3rdparty/umya-spreadsheet) are explicitly excluded.
Everything on this page is derived from the manifests and the source tree:
python3 - <<'PY'
import re
t = open("Cargo.toml", encoding="utf-8").read()
i = t.index("\nmembers = [") + 1
j = t.index("[", i)
depth = 0
for k in range(j, len(t)):
if t[k] == "[": depth += 1
elif t[k] == "]":
depth -= 1
if depth == 0:
print(len(re.findall(r'"([^"]+)"', t[j:k])))
break
PY
Workspace layout
| Group | Members | Location |
|---|---|---|
| Application crates | 6 | botserver, botui, botlib, botschema, bottest, botapp |
| Feature crates | 117 | botserver/crates/* |
| Vendored, excluded | 2 | 3rdparty/docx-rs, 3rdparty/umya-spreadsheet |
[workspace] default-members is botserver, botui, botlib, botschema β
a bare cargo build at the root builds those four, not the 117 feature crates.
| Member | Kind | Responsibility |
|---|---|---|
botserver |
binary crate | HTTP/WS server, bootstrap, route mounting, BASIC host |
botui |
binary crate | static front ends for suite (3000), cloud (4000), login (5000) |
botlib |
library | shared models, MessageType, i18n, database helpers |
botschema |
library | the single home of every Diesel table! macro |
bottest |
test crate | cross-crate integration suites |
botapp |
binary (Tauri 2) | desktop shell that supervises the botserver sidecar |
botserver has no library target
botserver/Cargo.toml declares no [lib] and no [[bin]]; the binary is the
default src/main.rs. There is no src/lib.rs, so nothing is "exported for
external use". Consequences:
cargo test -p botserverfails with "no library targets found"; unit tests build withcargo test -p botserver --bin botserver.- Other crates cannot
use botserver::...; they depend onbotcore,botbasic_*,botsecurity*and the other libraries instead.
src/main.rs declares two unconditional modules and re-exports the bootstrap
surface:
pub mod main_module;
pub mod session_pool;
pub use main_module::{BootstrapProgress, health_check, health_check_simple,
receive_client_errors};
soon_features.rs still exists in the tree but is not declared in the
module tree (grep finds no mod soon_features and no consumer), so it is
never compiled β a retired, orphaned file (#2541).
Every other top-level module is feature-gated (#[cfg(feature = "β¦")]), e.g.
analytics, billing, management (saas), vibe, basic (scripting).
Request flow
src/main.rs
βββ main_module::init bootstrap: config β Vault β DB pool β cache
βββ main_module::server Axum router, middleware, auth + rate limits
βββ main_module/routes/* hand-written route modules
βββ botserver/crates/*/routes* feature routers mounted per crate
βββ core::bot/ws WebSocket chat pipeline
βββ basic/ BASIC interpreter (.gbdialog β .ast)
βββ crates/botbasic_* keyword families
main_module/β process-level wiring:init.rs,server/,routes/,drive_monitors/,git_bot_monitor/,ui_plan/,state_builder.rs,background.rs,shutdown.rs.core/β runtime state and the chat engine:state.rs,config.rs,secrets/,session/,bot/(withws/,api_catalog/,endpoint_inventory*.rs,pipeline/),directory/,oauth/.basic/β the BASIC host: parser wiring andkeywords/registration.apps/β the suite app registry (registry/) and per-app command surfaces (commands/).security/βSafeCommand,log_and_sanitize, SQL guards, rate limits.- Domain directories β
crm/,billing/,people/,drive/,learn/,vibe/,meet/,whatsapp/, β¦ each a thin host over a feature crate.
Feature crates
botserver/Cargo.toml defines the bundles; each one pulls a feature crate:
| Bundle | Expands to |
|---|---|
minimal |
chat |
minimal-chat |
chat, automation, cache (no security) |
lightweight |
chat, tasks, people |
full |
chat, people, mail, tasks, calendar, drive, docs, llm, cache, compliance, tax |
chat-drive |
chat, drive, agent-vm and the office workbench |
desktop-local |
chat, drive, security, directory, llm, vectordb, settings, no-security, kb-extraction, botcore/desktop-local |
default |
all-apps + botcore/default |
Bundles core, standard and enterprise do not exist β see
03-knowledge-ai/editions.md.
Crate map (117 members)
Description column is the crate's own description in its Cargo.toml; β
means the manifest carries none (do not assume a responsibility from the name).
| Crate | Responsibility (from Cargo.toml) |
|---|---|
botagent |
β |
botanalytics |
General Bots analytics, insights, OKR goals tracking, and reporting |
botapi |
β |
botattendance |
General Bots attendance module - queue, SLA, webhooks, LLM assist, keyword services |
botattendant |
General Bots contact center attendant queue, session, and agent management |
botautomation |
NL scheduled adaptive agents, planner-executor-verifier engine and progress dashboard API (#1170, #1171). |
botautotask |
β |
botbanking |
Banking reconciliation and delivery-platform integration. |
botbasic_ai |
BASIC AI/intelligence keywords - LLM, AI tools, MCP, sandbox, orchestration, web scraping |
botbasic_comms |
BASIC communication keywords - messaging, email, SMS, social, chat, webhooks, calendar |
botbasic_compiler |
BASIC compiler - syntax transforms, goto logic, save conversion, tool parsing |
botbasic_core |
BASIC language core keywords - arrays, math, validation, datetime, strings, control flow, hearing, procedures, errors |
botbasic_data |
BASIC data keywords - database operations, tables, memory, KB, CRM, products |
botbasic_system |
BASIC system keywords - bot management, file ops, scheduling, security, app server, face API |
botbasic_types |
Shared types and runtime trait for BASIC keyword crates |
botbilling |
General Bots billing, invoicing, quotas, and subscription management |
botbiometry |
Biometric identity verification, KYC, and digital signature β Zitadel integration. |
botbrazil |
Brazilian tax compliance crate (NFe, NFSe, CTe, MDFe, SPED, EFD, ICMS modules) |
botbrowser |
General Bots browser automation |
botbrowserpolicy |
Hardened agentic browsing control plane: domain policy, budgets, browsing memory and task orchestration API (#1175 backend). |
botcalendar |
β |
botcanvas |
β |
botchannelbindings |
General Bots channel bindings - per-bot default phone, WhatsApp and Telegram identities plus call logs |
botchannels-core |
General Bots channels core: OAuth and media upload |
botchannels |
General Bots social media channel integrations |
botclock |
Electronic time clock (Registro de Ponto EletrΓ΄nico) with Brazilian CLT rules in botbrazil. |
botcloud |
General Bots SaaS - public checkout & subscriber dashboard using botbilling |
botcompliance |
β |
botconnectors |
Enterprise knowledge connectors - permissioned indexing, redaction and search backend over external chat, mail and drive sources. |
botconsent |
General Bots per-app agent consent system - grants, pending prompts and audit for application action classes |
botcontacts |
β |
botcore |
β |
botcorebot |
β |
botcoredirectory |
β |
botcoreoauth |
β |
botcorepkg |
β |
botcoresecrets |
β |
botcoresession |
β |
botdashboards |
β |
botdatabase |
β |
botdeployment |
General Bots deployment infrastructure for VibeCode platform |
botdesigner |
β |
botdesktop |
Desktop session proxy β WebSocket-to-TCP relay for remote desktop connections |
botdocs |
General Bots document processing, collaboration, and conversion |
botdomains |
Domain registrar adapters and DNS provisioning for General Bots |
botdrive |
β |
boteditor |
β |
botemail |
β |
boterp |
β |
boteval |
LLM response evaluation framework (datasets, contracts, runner, CI gate) |
botevents |
General Bots run event contract: envelope, sequencer, validation and redaction |
botfraud |
β |
botgit |
β |
botgl |
β |
bothandoff |
β |
bothr |
β |
botinstagram |
β |
botintegrations |
β |
botinventory |
β |
botitsm |
β |
botkyc |
β |
botlearn |
Learning Management System (LMS) module for General Bots |
botlegal |
β |
botllm |
General Bots LLM provider implementations and core types |
botlog |
Redacting log facade for sensitive identifiers |
botm365 |
Microsoft 365 integration: SharePoint connector, OAuth2 with Zitadel, Graph client. |
botmaintenance |
General Bots system maintenance and cleanup |
botmarketing |
General Bots marketing campaigns, email, WhatsApp, IP routing, warmup, and advisor |
botmarketplace |
General Bots Skills Marketplace - public catalog, publish/install into bot Drive buckets, starter skills |
botmeet |
β |
botmemory |
General Bots durable per-user and per-branch memory store - extraction hook, recall injection and import/export (issue #1178) |
botminutes |
β |
botmodelsbridge |
β |
botmonitoring |
General Bots monitoring, metrics collection, alerting, and distributed tracing |
botmsteams |
β |
botmultimodal |
General Bots multimodal AI client (image, video, audio, speech) |
botnvidia |
General Bots NVIDIA GPU monitoring module |
botpaper |
β |
botpeople |
β |
botplan |
General Bots project planner (Gantt + Kanban) with real-time collaboration |
botplayer |
General Bots media player |
botpos |
β |
botproducts |
General Bots products, services, inventory, and pricing management |
botproject |
General Bots project management |
botproviders |
β |
botpublic |
P2P payloads and public profile for General Bots β #1866 #1867 (in progress) |
botqdrant |
General Bots Qdrant vector database client |
botresearch |
Research module for General Bots - web search, knowledge base exploration, and deep research |
botretail |
Retail management (Bling-style): products, stock, variations, price lists, POS, NFCe via botbrazil. |
botsales |
β |
botsampledata |
Idempotent demo data seeding for a production-ready General Bots instance. |
botsearch |
General Bots full-text search service |
botsecurity-auth |
General Bots auth: authentication, authorization, session management |
botsecurity-core |
General Bots security core: guards, sanitizers, validators |
botsecurity-crypto |
General Bots crypto: TLS, CA, encryption, certificates |
botsecurity-protection |
General Bots protection: firewall, IDS, hardening automation |
botsecurity |
General Bots security infrastructure (facade crate) |
botsettings |
β |
botsheet-core |
General Bots sheet core: types, formulas, state |
botsheet |
β |
botslides |
β |
botsocial |
β |
botsources |
β |
bottasks |
β |
bottax |
β |
bottelegram |
β |
bottemplates |
β |
bottickets |
β |
bottimeclock |
β |
bottimeseries |
General Bots time-series metrics service (InfluxDB-compatible) |
botuifragments |
HTMX UI fragment routes for bot apps. |
botvibe |
β |
botvideo |
β |
botvision |
β |
botweba |
General Bots web application builder |
botwhatsapp |
β |
botworkspaces |
β |
Build and test commands that work
cargo build -p botserver # the server binary
cargo build -p botserver --no-default-features --features minimal
cargo test -p botcore # any library crate
cargo test -p botserver --bin botserver # binary-crate unit tests
cargo test -p bottest # cross-crate integration
cargo check -p <crate> # syntax/type gate
Never claim a workspace crate is a module of the botserver binary: a crate is
reached through dep:<crate> in a feature and mounted by a host module.
Limits
| Claim | Status |
|---|---|
| Module responsibility | Only when the crate manifest carries a description; β means the manifest has none. |
| Crate and member counts | Derived from the root Cargo.toml at review time; re-run the script above rather than trusting prose. |
soon_features.rs |
Retired source: no mod soon_features; in the compiled module tree. |
Bundle names core, standard, enterprise |
Do not exist; see the editions page instead. |
Related
- Architecture Overview β how the crates are wired at runtime.
- Building from Source β toolchain, features and commands.
- Dev guide β the curated crate map.