Boomai docs

Repository documentation, file by file.

This page documents the Boomai repository as it exists in /Users/onyx/Projects/boomai. Generated by reading the repo (excluding build artifacts like target/, logs/, metrics/, and node_modules/).

How the system connects

Desktop -> Daemon

The React UI calls the daemon at http://localhost:3030 via desktop/src/lib/api.ts, sending chat, config, MCP, and model install requests.

Daemon -> Providers

The daemon routes ModelRequest data through ProviderRegistry and ProviderRunner, then the HTTP provider calls /chat/completions on your configured model backend.

Orchestrator -> Tools

MakerOrchestrator classifies steps, decides tool vs voting, and calls the internal tool router. ToolRouter is scaffolded and currently returns not wired, matching the roadmap.

MCP -> External tools

MCP servers are managed by McpManager and McpClient using JSON-RPC. The UI can add servers and list tools, and the daemon keeps clients alive.

Boomai structure

File-by-file documentation

Root files

README.md

Expand

Defines Boomai's purpose (local-first AI workspace) and the reliability thesis behind MAKER/MDAP.

Explains the daemon/desktop split, the API surface, and how the pieces fit together for orchestration.

Lists setup steps and contributor reading order, which anchor the docs and architecture files.

LICENSE

Expand

MIT license grant and warranty disclaimer.

Establishes the repo's legal usage terms for all source files.

Applies to the daemon, desktop, and docs unless otherwise noted.

SECURITY.md

Expand

Describes disclosure process and points to a security contact.

Reinforces local-first defaults and the separation between deterministic tools and probabilistic reasoning.

Documents expected response timelines for reports.

CODE_OF_CONDUCT.md

Expand

Sets behavioral expectations for contributors and collaborators.

Defines reporting pathways for violations (mirrors security contact).

Lists unacceptable behavior and enforcement approach.

Cargo.toml

Expand

Rust workspace root; declares members for the daemon and Tauri desktop runtime.

Ensures shared dependency resolution across server + desktop crates.

Uses resolver = "2" for the workspace.

Cargo.lock

Expand

Auto-generated lockfile for Rust dependencies.

Pins exact versions used by boomai-daemon and Tauri crates for reproducible builds.

Should not be edited manually.

deny.toml

Expand

cargo-deny policy covering advisories, license allowlist, and source restrictions.

Documents known advisory exceptions, mostly Tauri transitive deps.

Defines license allowlist and source registry rules.

rustfmt.toml

Expand

Defines formatting conventions for Rust code (width, heuristics, newline style).

Keeps daemon code consistent across contributors.

Standardizes formatting across all Rust crates.

Docs

docs/overview.md

Expand

Explains the reliability cliff in long-horizon agents.

Summarizes MAKER/MDAP and the tiered tool stack used by the daemon.

Provides a high-level system map that connects to architecture.md.

docs/architecture.md

Expand

Deep dive on daemon components, agent pipeline, and MCP integration.

Defines the execution lanes and how tools, voting, and validation interact.

References core types used across handlers and the UI API client.

docs/setup.md

Expand

Step-by-step setup for Rust, Node, Ollama, daemon, and desktop app.

Matches the runtime expectations used by desktop/src/lib/api.ts.

Documents the default daemon port and desktop auto-connect behavior.

docs/contributing.md

Expand

Contribution guidelines and priority areas (MAKER, MCP, orchestration).

Lists pre-PR checks that align with deny.toml and rustfmt.toml.

Calls out manual testing and workflow expectations.

docs/FUTURE.md

Expand

Roadmap for orchestration scaling, consensus improvements, and MCP exposure.

Highlights upcoming features that connect to ToolRouter and MCP work.

Outlines phased plans for reliability, lazy UX, and ecosystem growth.

docs/versioning.md

Expand

Defines SemVer-ish policy for 0.x releases and tag strategy.

Matches current daemon versioning in boomai-daemon/Cargo.toml.

Describes release steps and CI expectations.

Docs assets

docs/assets/boomai.png

Expand

Primary product image asset.

Used in README and other high-level docs.

Represents the product in documentation visuals.

docs/assets/boomaiBlue.png

Expand

Blue variant brand image.

Referenced in CODE_OF_CONDUCT.md.

Used for community and contributor-facing docs.

docs/assets/boomaiPurple.png

Expand

Purple variant brand image.

Referenced in contributing materials.

Alternate theme for contributor docs.

docs/assets/boomaiSand.png

Expand

Sand variant brand image.

Referenced in SECURITY.md.

Used to visually tag security-related docs.

Daemon core

boomai-daemon/src/core/types.rs

Expand

Defines the shared data model for chat, execution status, and MAKER context.

ModelConfig and model structs are consumed by handlers and the desktop API client.

ExecutionPolicy is used by the orchestrator to choose between tool stubs, single probe, or Maker voting.

boomai-daemon/src/core/model_request.rs

Expand

Normalizes all model calls into a single request/response schema.

Supports tool specs, truncation policy, routing hints, and response formats.

Used by ProviderRunner and HttpProvider to call OpenAI-style endpoints.

boomai-daemon/src/core/provider.rs

Expand

Trait contract for any model provider backend.

Implemented by core/providers/http.rs and used by ProviderRunner.

Allows new provider backends without changing orchestrator logic.

boomai-daemon/src/core/providers/http.rs

Expand

Implements ModelProvider using HTTP POST to /chat/completions.

Maps provider errors into ProviderErrorKind and records latency.

Used as the default provider in main.rs via ProviderRegistry.

boomai-daemon/src/core/providers/mod.rs

Expand

Module export for HttpProvider.

Keeps provider implementations grouped under core/providers/.

boomai-daemon/src/core/provider_error.rs

Expand

Centralized error type for provider failures (timeout, auth, rate limit, etc.).

Separates user-facing message from internal diagnostics for safe UI exposure.

Used by ProviderRunner and HttpProvider to normalize failures.

boomai-daemon/src/core/provider_runner.rs

Expand

Wraps ModelProvider with concurrency limits and timeouts.

Optionally enforces a global limiter across all providers.

Called by ProviderRegistry during orchestrator and handler requests.

boomai-daemon/src/core/provider_registry.rs

Expand

Stores providers and their runners; picks a default provider.

Used by agents and the orchestrator to run model calls.

Updated by config handlers when model settings change.

boomai-daemon/src/core/capabilities.rs

Expand

Defines the capability model used to gate tool access.

CapabilityRequest includes caller, taint level, and step identifiers.

Referenced by ToolRequest and future tool execution policy.

boomai-daemon/src/core/taint.rs

Expand

Encodes trust boundaries (Trusted/UserProvided/RetrievedUntrusted).

Used in CapabilityRequest to protect sensitive tool operations.

Set by the orchestrator when issuing tool requests.

boomai-daemon/src/core/tool_envelope.rs

Expand

Defines the standard request/response wrapper for tool calls.

Used by ToolRouter and MakerOrchestrator for internal stubs.

Provides a structured surface for future tool integrations.

boomai-daemon/src/core/agent.rs

Expand

Defines the Agent trait shared by DecomposerAgent and RouterAgent.

AgentContext is currently empty but reserved for future metadata.

Standardizes the async call signature across agent types.

boomai-daemon/src/core/visibility.rs

Expand

Trait for converting internal structs into UI-safe versions.

Used by system.rs to expose SanitizedSystemProfile to the frontend.

Keeps sensitive data out of public API responses.

Daemon agents

boomai-daemon/src/agents/orchestrator.rs

Expand

Core execution engine that classifies intents and chooses execution policy.

Decomposes complex prompts into steps and executes each with tools or Maker voting.

Calls ToolRouter for deterministic stubs and ProviderRunner for model voting.

boomai-daemon/src/agents/decomposer.rs

Expand

Prompts the model to output the next atomic step for decomposition.

Used by MakerOrchestrator during DecomposeAndExecute flows.

Executes via ProviderRegistry default runner.

boomai-daemon/src/agents/router.rs

Expand

Model-driven router that decides whether to call tools or respond directly.

Used as a fallback for SingleProbe paths in the orchestrator.

Executes via ProviderRegistry default runner.

boomai-daemon/src/agents/step.rs

Expand

Classifies steps into Tool/Math/Reasoning and picks execution strategies.

Includes regex matchers for time and calculator stubs.

Feeds MakerOrchestrator with the chosen ExecStrategy.

boomai-daemon/src/agents/mod.rs

Expand

Module exports for decomposer, router, and orchestrator.

Re-exports MakerOrchestrator for use in handlers.

Keeps agent APIs centralized under the agents module.

Daemon MCP

boomai-daemon/src/mcp/types.rs

Expand

Defines MCP protocol types and JSON-RPC envelopes.

Shared by McpClient to encode/decode requests and responses.

Models tool list and server info structures.

boomai-daemon/src/mcp/client.rs

Expand

Implements MCP client using stdio or SSE transports.

Handles initialize handshake and tool listing.

Managed by McpManager and exposed via config_mcp handlers.

boomai-daemon/src/mcp/manager.rs

Expand

Stores MCP clients by server id and manages lifecycle.

Used by handlers to add servers and list tools.

Keeps MCP clients available across requests.

boomai-daemon/src/mcp/mod.rs

Expand

Module export surface for MCP client/manager/types.

Keeps MCP implementation grouped under one namespace.

Referenced by main.rs and handlers.rs.

Daemon runtime

boomai-daemon/src/main.rs

Expand

Daemon bootstrap: tracing, config load, provider registry, and MCP manager.

Spawns telemetry logging and sets up Axum routes in handlers.rs.

Creates AppState shared by orchestrator and handlers.

boomai-daemon/src/config.rs

Expand

Reads BOOMAI_PORT from env and binds to 127.0.0.1.

Used by main.rs to configure the Axum listener.

Defaults to port 3030 when BOOMAI_PORT is not set.

boomai-daemon/src/config_persistence.rs

Expand

Loads/saves ModelConfig and keeps a small history for rollbacks.

Stores API keys in OS keyring and strips them from disk JSON.

Called by handlers to save, reload, or rollback configs.

boomai-daemon/src/handlers.rs

Expand

Axum handlers for system profile, config, MCP servers, local models, and chat.

Instantiates MakerOrchestrator for /chat requests.

Bridges between UI API calls and daemon services.

boomai-daemon/src/state.rs

Expand

Shared state container holding config store, providers, MCP, and agents.

Cloned into handlers and orchestrator for access to services.

Defines the data flow between the HTTP layer and core orchestration.

boomai-daemon/src/system.rs

Expand

Collects system profile with sysinfo and generates engine recommendations.

Exposes sanitized profile to the UI via /system/profile.

Used by onboarding to decide local vs cloud defaults.

boomai-daemon/src/local.rs

Expand

Defines available local models and connects to Ollama for installs.

Syncs installed models and exposes data to config/local handlers.

Feeds model selection UI and local install workflows.

boomai-daemon/src/maker.rs

Expand

Implements race_to_k: parallel candidates and first-to-k voting.

Used by MakerOrchestrator for reliable reasoning paths.

Cancels remaining tasks once consensus is reached.

boomai-daemon/src/tools/router.rs

Expand

Placeholder tool router that currently denies all tool requests.

Referenced by MakerOrchestrator when requesting internal stubs.

boomai-daemon/src/tools/mod.rs

Expand

Exports ToolRouter module.

Placeholder for future tool implementations.

Keeps tool routing isolated from core orchestration.

Daemon crate manifest

boomai-daemon/Cargo.toml

Expand

Defines the boomai-daemon crate (version 0.3.2) and its dependencies.

Core runtime includes axum, tokio, reqwest, keyring, and tracing for API + orchestration.

Desktop config

desktop/package.json

Expand

NPM scripts for dev/build/tauri plus dependency list.

Pins the desktop to React 19, Tauri 2, Tailwind 4, and Vite 7.

Matches build commands referenced by tauri.conf.json.

desktop/package-lock.json

Expand

Auto-generated lockfile that pins NPM dependency versions.

Ensures the desktop build is reproducible across machines.

Should not be edited manually.

desktop/index.html

Expand

HTML shell for the React app with Boomai title/description.

Sets favicon and preconnects to Google Fonts to reduce FOUC.

Defines the root DOM node for React rendering.

desktop/postcss.config.js

Expand

PostCSS config enabling Tailwind as a plugin.

Supports the design system defined in src/index.css.

Keeps the CSS pipeline aligned with Tailwind v4.

desktop/vite.config.ts

Expand

Vite dev server config for Tauri (fixed ports, HMR settings).

Ignores src-tauri in watch to keep dev stable.

Pairs with tauri.conf.json devUrl.

desktop/tsconfig.json

Expand

TypeScript configuration for the React renderer.

Strict settings and bundler module resolution.

Enforces unused locals and parameters.

desktop/tsconfig.node.json

Expand

TypeScript config for Vite config file compilation.

Keeps build-time TS isolated from app code.

Used by Vite tooling during dev/build.

desktop/README.md

Expand

Template note from the initial Tauri + React scaffold.

Not part of Boomai product docs, but useful for tooling hints.

Lists recommended IDE plugins for Tauri development.

Desktop UI core

desktop/src/main.tsx

Expand

React entrypoint that mounts App into #root.

Imports src/index.css to apply the Boomai design system.

Bootstraps the entire desktop UI tree.

desktop/src/App.tsx

Expand

Controls high-level UI state: splash, onboarding, then main shell.

Routes between chat/library/automations/settings views.

Acts as the top-level state machine for the desktop UI.

desktop/src/index.css

Expand

Design tokens for paper/space/red/teal palette and typography.

Defines UI utilities (buttons, badges, cards) and animations.

Provides styling used by nearly every component.

desktop/src/lib/api.ts

Expand

Typed API client for daemon endpoints at localhost:3030.

Wraps system profile, config, MCP, local model, and chat requests.

The desktop UI uses this to communicate with the Rust daemon.

Centralizes API_BASE so components do not hardcode URLs.

desktop/src/vite-env.d.ts

Expand

Vite type definitions for TS tooling.

Keeps editor and build tooling aligned with Vite globals.

Standard Vite boilerplate for type safety.

Desktop components

desktop/src/components/AppShell.tsx

Expand

Primary navigation shell with left rail and collapse toggle.

Hosts the main view content from App.tsx.

Controls nav highlighting for chat/library/automations/settings.

desktop/src/components/Splash.tsx

Expand

Boot splash with timed progress bar and version label.

Displayed before onboarding to signal app startup.

Uses a fixed duration timer to advance to onboarding.

desktop/src/components/Onboarding.tsx

Expand

Multi-step onboarding flow for system check and model setup.

Calls api.system and api.config to test providers and install local models.

Guides users to connect local or cloud engines before chat.

desktop/src/components/Chat.tsx

Expand

Main chat UI with suggestions, copy action, and loading state.

Sends messages to api.chat, which routes to daemon /chat.

Implements the product's primary interaction surface.

desktop/src/components/ChatInterface.tsx

Expand

Simpler chat UI used as a legacy or reference implementation.

Also calls api.chat for daemon interactions.

Not currently wired into App.tsx routes.

desktop/src/components/Library.tsx

Expand

Library placeholder with search input and empty state visuals.

Future integration point for MCP/FS-based document sources.

Uses the design system's empty-state motif.

desktop/src/components/Automations.tsx

Expand

Automations dashboard placeholder and empty state.

Future hook for cron/task orchestration surfaced by the daemon.

Includes the starburst motif animation.

desktop/src/components/Settings.tsx

Expand

Settings UI for provider configuration and shortcuts.

Connects to daemon configuration endpoints via api.ts in future iterations.

Includes placeholder panels for appearance and data/privacy.

desktop/src/components/ConfigForm.tsx

Expand

Form for model configuration (base URL, model, API key).

Uses api.config.model.test and save to persist settings in the daemon.

Meant for onboarding or settings integration.

desktop/src/components/ModelGallery.tsx

Expand

Local model installer and selector driven by daemon APIs.

Shows available/installed models and triggers install/uninstall calls.

Relies on local model metadata defined in boomai-daemon/src/local.rs.

desktop/src/components/McpServerGallery.tsx

Expand

MCP server management UI for connecting and listing tools.

Calls /config/mcp endpoints on the daemon.

Prepares the UI for MCP extensibility workflows.

desktop/src/components/SystemCheck.tsx

Expand

Displays system profile and engine recommendations from the daemon.

Used during onboarding to suggest local vs cloud engine.

Renders sanitized data from system.rs.

Desktop assets

desktop/public/boomai.svg

Expand

Primary Boomai logo mark.

Used by the desktop app shell and splash screen.

Matches the in-app brand system.

desktop/public/boomaiHorizontalWhite.svg

Expand

Horizontal wordmark variant used on light backgrounds.

Used in marketing or header contexts.

desktop/public/tauri.svg

Expand

Tauri logo asset.

Default scaffold asset; not core to product UI.

Kept for reference or template usage.

desktop/public/vite.svg

Expand

Vite logo asset.

Default scaffold asset; not core to product UI.

Kept for reference or template usage.

desktop/src/assets/react.svg

Expand

React logo asset.

Default scaffold asset; not core to product UI.

Kept for reference or template usage.

Tauri runtime

desktop/src-tauri/Cargo.toml

Expand

Tauri desktop runtime crate metadata and dependencies.

Adds HTTP/opener plugins for local API calls and links.

Versioned independently from the daemon crate.

desktop/src-tauri/build.rs

Expand

Runs tauri_build during compile time.

Required for generating bindings and app metadata.

Standard Tauri build hook.

desktop/src-tauri/tauri.conf.json

Expand

Defines product metadata, build commands, window size, and bundling.

Connects the Vite dev server to the Tauri shell.

Disables CSP to simplify local dev while using plugins.

desktop/src-tauri/src/main.rs

Expand

Binary entrypoint for the Tauri app runtime.

Delegates to lib.rs run() to initialize plugins.

Includes Windows subsystem attribute for release builds.

desktop/src-tauri/src/lib.rs

Expand

Configures the Tauri builder and registers plugins.

Enables HTTP and opener usage from the frontend.

Produces the running desktop window via tauri::Builder.

desktop/src-tauri/capabilities/default.json

Expand

Capability policy that allows HTTP requests to localhost.

Required for the UI to reach the daemon API on port 3030.

Defines the permissions attached to the main window.

desktop/src-tauri/icons/*

Expand

App icon set across platforms and sizes.

Used by the Tauri bundler when building installers.

Includes PNG, ICO, and ICNS formats.