No description
Find a file
2025-12-20 19:58:11 -03:00
.forgejo/workflows Disable auto-trigger CI - manual only via workflow_dispatch 2025-12-16 17:07:02 -03:00
.vscode Add VS Code settings for rust-analyzer 2025-12-04 09:39:38 -03:00
gen/schemas Initial botapp - Tauri wrapper for General Bots 2025-12-04 09:02:10 -03:00
icons Initial botapp - Tauri wrapper for General Bots 2025-12-04 09:02:10 -03:00
js refactor: integrate TrayManager with Tauri commands, zero dead code 2025-12-20 19:58:11 -03:00
src refactor: integrate TrayManager with Tauri commands, zero dead code 2025-12-20 19:58:11 -03:00
ui/app-guides Use HTMX for app-guides, fix warnings 2025-12-04 09:21:19 -03:00
.gitignore Add VS Code settings for rust-analyzer 2025-12-04 09:39:38 -03:00
build.rs Initial botapp - Tauri wrapper for General Bots 2025-12-04 09:02:10 -03:00
Cargo.lock Add rclone sync for desktop, rename docs chapters, clarify admin/user views 2025-12-05 06:50:32 -03:00
Cargo.toml Add rclone sync for desktop, rename docs chapters, clarify admin/user views 2025-12-05 06:50:32 -03:00
LICENSE Initial botapp - Tauri wrapper for General Bots 2025-12-04 09:02:10 -03:00
PROMPT.md docs: update PROMPT.md with weekly maintenance checklist 2025-12-18 16:18:19 -03:00
README.md Initial botapp - Tauri wrapper for General Bots 2025-12-04 09:02:10 -03:00
tauri.conf.json Initial botapp - Tauri wrapper for General Bots 2025-12-04 09:02:10 -03:00

BotApp - General Bots Desktop Application

BotApp is the Tauri-based desktop wrapper for General Bots, providing native desktop and mobile capabilities on top of the pure web UI from botui.

Architecture

botui (pure web)          botapp (Tauri wrapper)
┌─────────────────┐      ┌─────────────────────────┐
│  suite/         │◄─────│  Loads botui's UI       │
│  minimal/       │      │  + injects app-only     │
│  shared/        │      │    features via JS      │
│                 │      │                         │
│  No Tauri deps  │      │  Tauri + native APIs    │
└─────────────────┘      └─────────────────────────┘

Why Two Projects?

  • botui: Pure web UI with zero native dependencies. Works in any browser.
  • botapp: Wraps botui with Tauri for desktop/mobile native features.

This separation allows:

  • Same UI code for web, desktop, and mobile
  • Clean dependency management (web users don't need Tauri)
  • App-specific features only in the native app

Features

BotApp adds these native capabilities to botui:

  • Local File Access: Browse and manage files on your device
  • System Tray: Minimize to tray, background operation
  • Native Dialogs: File open/save dialogs
  • Desktop Notifications: Native OS notifications
  • App Settings: Desktop-specific configuration

Project Structure

botapp/
├── Cargo.toml              # Rust dependencies (includes Tauri)
├── build.rs                # Tauri build script
├── tauri.conf.json         # Tauri configuration
├── src/
│   ├── main.rs             # Tauri entry point
│   ├── lib.rs              # Library exports
│   └── desktop/
│       ├── mod.rs          # Desktop module
│       ├── drive.rs        # File system commands
│       └── tray.rs         # System tray functionality
├── ui/
│   └── app-guides/         # App-only HTML content
│       ├── local-files.html
│       └── native-settings.html
└── js/
    └── app-extensions.js   # Injected into botui's suite

Prerequisites

  • Rust 1.70+
  • Node.js 18+ (for Tauri CLI)
  • Tauri CLI: cargo install tauri-cli

Platform-specific

Linux:

sudo apt install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev

macOS:

xcode-select --install

Windows:

  • Visual Studio Build Tools with C++ workload

Development

  1. Clone both repositories:
git clone https://github.com/GeneralBots/botui.git
git clone https://github.com/GeneralBots/botapp.git
  1. Start botui's web server (required for dev):
cd botui
cargo run
  1. Run botapp in development mode:
cd botapp
cargo tauri dev

Building

Debug Build

cargo tauri build --debug

Release Build

cargo tauri build

Binaries will be in target/release/bundle/.

How App Extensions Work

BotApp injects js/app-extensions.js into botui's suite at runtime. This script:

  1. Detects Tauri environment (window.__TAURI__)
  2. Injects app-only navigation items into the suite's .app-grid
  3. Exposes window.BotApp API for native features

Example usage in suite:

if (window.BotApp?.isApp) {
    // Running in desktop app
    const files = await BotApp.fs.listFiles('/home/user');
    await BotApp.notify('Title', 'Native notification!');
}

Tauri Commands

Available Tauri commands (invokable from JS):

Command Description
list_files List directory contents
upload_file Copy file with progress
create_folder Create new directory
delete_path Delete file or folder
get_home_dir Get user's home directory

Configuration

Edit tauri.conf.json to customize:

  • productName: Application name
  • identifier: Unique app identifier
  • build.devUrl: URL for development (default: http://localhost:3000)
  • build.frontendDist: Path to botui's UI (default: ../botui/ui/suite)

License

AGPL-3.0 - See LICENSE for details.