generalbots/botbook/src/02-architecture-packages
Rodrigo Rodriguez (Pragmatismo) 037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00
..
assets feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
architecture.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
autonomous-tasks.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
building.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
cargo-tools.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
containers.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
crates.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
custom-keywords.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
dependencies.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
docker-deployment.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
example-gbapp.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
gbai.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
gbdialog.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
gbdrive.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
gbkb.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
gbot.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
gbtheme.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
infrastructure.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
keyword-refactoring.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
kubernetes-deployment.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
monitoring-setup.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
observability.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
philosophy.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
README.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
scaling.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
services.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
summary.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-analytics.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-api-client.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-attendance-crm.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-bi.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-crawler.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-crm-contacts.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-crm.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-embedded.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-law.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-llm-server.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-llm-tools.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-marketing.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-office.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-reminder.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-samples.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
template-template.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
templates.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00
testing-safety.md feat: Major workspace reorganization and documentation update 2026-04-19 08:14:25 -03:00

Chapter 2: Architecture & Packages

Architecture and deployment reference for developers.

Overview

botserver is built in Rust with a modular architecture. Extend it by creating custom keywords, services, or entire applications.

Architecture

┌─────────────────────────────────────────┐
│              Web Server (Axum)          │
├─────────────────────────────────────────┤
│         BASIC Runtime (Rhai)            │
├──────────┬──────────┬──────────┬────────┤
│   LLM    │ Storage  │  Vector  │ Cache  │
│ Service  │ (MinIO)  │ (Qdrant) │(Valkey)│
├──────────┴──────────┴──────────┴────────┤
│            PostgreSQL                   │
└─────────────────────────────────────────┘

Deployment Options

Method Use Case Guide
Local Development Installation
Docker Production Docker Deployment
LXC Isolated components Container Deployment

Module Structure

Module Purpose
web_server HTTP/WebSocket handling
basic BASIC language runtime
llm LLM provider integration
drive Object storage
shared Database models

Creating Custom Keywords

// In src/basic/keywords/my_keyword.rs
pub fn my_keyword(context: &mut EvalContext) -> Result<Dynamic, Box<EvalError>> {
    // Your keyword logic
    Ok(Dynamic::from("result"))
}

Register in keywords/mod.rs and rebuild.

Autonomous Task AI

General Bots enables autonomous task execution where the machine does the work:

Human describes intent → AI plans → AI generates → AI deploys → AI monitors

Key concepts:

  • Intent Compilation - LLM translates natural language to execution plans
  • CREATE SITE - Generates HTMX apps bound to botserver API
  • .gbdrive - Cloud-synced workspace for all task files
  • Autonomous Execution - System runs plans with approval gates

See Autonomous Task AI for complete documentation.

Chapter Contents

See Also