# jamailar/beav architecture

> Architecture diagram of the GitHub repository jamailar/beav, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jamailar/beav
- Repository: https://github.com/jamailar/beav

## Overview

Beav is a local-first AI workspace for independent content creators. Its main workflow takes saved links and media through knowledge storage and content analysis, into AI-assisted topic selection and manuscript creation, then image/video production and packaging for publication. The desktop UI connects those experiences to a Rust/Tauri runtime, while knowledge, account memory, and agent integrations provide shared context. The README documents product capabilities; sampled code confirms parts of the app shell, runtime query, persistence, and browser-plugin storage. Uninspected subsystem links are therefore documented at a capability level rather than treated as verified internal calls.

Main entry points: [`desktop/src/pages/Wander.tsx`](https://github.com/jamailar/beav/blob/main/desktop/src/pages/Wander.tsx) (AI conversations), [`desktop/src-tauri/src/knowledge.rs`](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/knowledge.rs) (Knowledge capture), [`desktop/src-tauri/src/commands/manuscripts/package.rs`](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/commands/manuscripts/package.rs) (Publication packages), [`desktop/src-tauri/src/commands/runtime_query.rs`](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/commands/runtime_query.rs) (Runtime query)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop workspace"]
  node_app["Workspace shell<br/>[App.tsx]"]
  node_intent["Navigation intents"]
end

subgraph group_creation["Creation workflow"]
  node_accounts["Account memory<br/>[accounts.rs]"]
  node_topics["Topics and trends<br/>[Subjects.tsx]"]
  node_chat["AI conversations<br/>[Wander.tsx]"]
  node_manuscripts["Manuscript editor"]
  node_generation["Image generation"]
  node_video["Video editing<br/>[pipeline.rs]"]
  node_packaging["Publication packages<br/>[package.rs]"]
  node_calendar["Content calendar<br/>[RedClaw.tsx]"]
end

subgraph group_library["Knowledge and media"]
  node_knowledge["Knowledge capture<br/>[knowledge.rs]"]
  node_index["Search and indexing"]
  node_assets["Media library<br/>[MediaLibrary.tsx]"]
end

subgraph group_runtime["AI runtime"]
  node_runtime_query["Runtime query<br/>[runtime_query.rs]"]
  node_agent_engine["Agent turn engine<br/>[engine.rs]"]
  node_runtime["Task orchestration<br/>[runtime.rs]"]
  node_persistence[("Local persistence<br/>[mod.rs]")]
end

subgraph group_integration["External integrations"]
  node_mcp["MCP agent access<br/>[manager.rs]"]
  node_browser_plugin["Browser capture<br/>[background.js]"]
end

node_creator(("Creator"))
node_mobile(("Phone user"))
node_external_agent(("External AI agent"))

node_creator -->|"uses"| node_app
node_app -->|"routes intents"| node_intent
node_creator -->|"saves sources"| node_knowledge
node_mobile -->|"uploads links"| node_knowledge
node_knowledge -->|"indexes content"| node_index
node_knowledge -->|"adds analyzed media"| node_assets
node_creator -->|"explores topics"| node_topics
node_creator -->|"requests creation"| node_chat
node_accounts -->|"supplies account context"| node_chat
node_index -->|"provides source material"| node_chat
node_chat -->|"creates drafts"| node_manuscripts
node_chat -->|"requests image generation"| node_generation
node_chat -->|"requests video editing"| node_video
node_manuscripts -->|"packages content"| node_packaging
node_generation -->|"adds generated media"| node_packaging
node_video -->|"adds edited video"| node_packaging
node_packaging -->|"schedules publication"| node_calendar
node_calendar -->|"shares for publishing"| node_mobile
node_chat -.->|"submits runtime request"| node_runtime_query
node_runtime_query -->|"prepares agent turn"| node_agent_engine
node_runtime_query -->|"uses runtime orchestration"| node_runtime
node_runtime -->|"stores workspace state"| node_persistence
node_external_agent -->|"connects through MCP"| node_mcp
node_mcp -->|"accesses library"| node_knowledge
node_creator -.->|"captures browser content"| node_browser_plugin

click node_app "https://github.com/jamailar/beav/blob/main/desktop/src/App.tsx"
click node_intent "https://github.com/jamailar/beav/blob/main/desktop/src/features/app-shell/useGlobalIntentRouter.ts"
click node_knowledge "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/knowledge.rs"
click node_index "https://github.com/jamailar/beav/tree/main/desktop/src-tauri/src/knowledge_index"
click node_assets "https://github.com/jamailar/beav/blob/main/desktop/src/pages/MediaLibrary.tsx"
click node_accounts "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/accounts.rs"
click node_topics "https://github.com/jamailar/beav/blob/main/desktop/src/pages/Subjects.tsx"
click node_chat "https://github.com/jamailar/beav/blob/main/desktop/src/pages/Wander.tsx"
click node_manuscripts "https://github.com/jamailar/beav/blob/main/desktop/src/components/manuscripts/ManuscriptEditorHost.tsx"
click node_generation "https://github.com/jamailar/beav/blob/main/desktop/src/pages/GenerationStudio.tsx"
click node_video "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/commands/media_edit/pipeline.rs"
click node_packaging "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/commands/manuscripts/package.rs"
click node_calendar "https://github.com/jamailar/beav/blob/main/desktop/src/pages/RedClaw.tsx"
click node_runtime_query "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/commands/runtime_query.rs"
click node_agent_engine "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/agent/engine.rs"
click node_runtime "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/runtime.rs"
click node_persistence "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/persistence/mod.rs"
click node_mcp "https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/mcp/manager.rs"
click node_browser_plugin "https://github.com/jamailar/beav/blob/main/Plugin/src/background.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_intent,node_mobile toneBlue
class node_accounts,node_topics,node_chat,node_manuscripts,node_generation,node_video,node_packaging,node_calendar toneAmber
class node_knowledge,node_index,node_assets toneMint
class node_runtime_query,node_agent_engine,node_runtime,node_persistence toneRose
class node_mcp,node_browser_plugin,node_creator,node_external_agent toneIndigo
```

## Components

### Desktop workspace

- [Workspace shell](https://github.com/jamailar/beav/blob/main/desktop/src/App.tsx): `desktop/src/App.tsx`
- [Navigation intents](https://github.com/jamailar/beav/blob/main/desktop/src/features/app-shell/useGlobalIntentRouter.ts): `desktop/src/features/app-shell/useGlobalIntentRouter.ts`

### Creation workflow

- [Account memory](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/accounts.rs): `desktop/src-tauri/src/accounts.rs`
- [Topics and trends](https://github.com/jamailar/beav/blob/main/desktop/src/pages/Subjects.tsx): `desktop/src/pages/Subjects.tsx`
- [AI conversations](https://github.com/jamailar/beav/blob/main/desktop/src/pages/Wander.tsx): `desktop/src/pages/Wander.tsx`
- [Manuscript editor](https://github.com/jamailar/beav/blob/main/desktop/src/components/manuscripts/ManuscriptEditorHost.tsx): `desktop/src/components/manuscripts/ManuscriptEditorHost.tsx`
- [Image generation](https://github.com/jamailar/beav/blob/main/desktop/src/pages/GenerationStudio.tsx): `desktop/src/pages/GenerationStudio.tsx`
- [Video editing](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/commands/media_edit/pipeline.rs): `desktop/src-tauri/src/commands/media_edit/pipeline.rs`
- [Publication packages](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/commands/manuscripts/package.rs): `desktop/src-tauri/src/commands/manuscripts/package.rs`
- [Content calendar](https://github.com/jamailar/beav/blob/main/desktop/src/pages/RedClaw.tsx): `desktop/src/pages/RedClaw.tsx`

### Knowledge and media

- [Knowledge capture](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/knowledge.rs): `desktop/src-tauri/src/knowledge.rs`
- [Search and indexing](https://github.com/jamailar/beav/tree/main/desktop/src-tauri/src/knowledge_index): `desktop/src-tauri/src/knowledge_index`
- [Media library](https://github.com/jamailar/beav/blob/main/desktop/src/pages/MediaLibrary.tsx): `desktop/src/pages/MediaLibrary.tsx`

### AI runtime

- [Runtime query](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/commands/runtime_query.rs): `desktop/src-tauri/src/commands/runtime_query.rs`
- [Agent turn engine](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/agent/engine.rs): `desktop/src-tauri/src/agent/engine.rs`
- [Task orchestration](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/runtime.rs): `desktop/src-tauri/src/runtime.rs`
- [Local persistence](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/persistence/mod.rs): `desktop/src-tauri/src/persistence/mod.rs`

### External integrations

- [MCP agent access](https://github.com/jamailar/beav/blob/main/desktop/src-tauri/src/mcp/manager.rs): `desktop/src-tauri/src/mcp/manager.rs`
- [Browser capture](https://github.com/jamailar/beav/blob/main/Plugin/src/background.js): `Plugin/src/background.js`

### Other components

- **Creator**
- **Phone user**
- **External AI agent**

## Connections

- Creator → Workspace shell: uses (evidence: `README.md`)
- Workspace shell → Navigation intents: routes intents (evidence: `desktop/src/App.tsx`)
- Creator → Knowledge capture: saves sources (evidence: `README.md`)
- Phone user → Knowledge capture: uploads links (evidence: `README.md`)
- Knowledge capture → Search and indexing: indexes content (evidence: `README.md`)
- Knowledge capture → Media library: adds analyzed media (evidence: `README.md`)
- Creator → Topics and trends: explores topics (evidence: `README.md`)
- Creator → AI conversations: requests creation (evidence: `README.md`)
- Account memory → AI conversations: supplies account context (evidence: `README.md`)
- Search and indexing → AI conversations: provides source material (evidence: `README.md`)
- AI conversations → Manuscript editor: creates drafts (evidence: `README.md`)
- AI conversations → Image generation: requests image generation (evidence: `README.md`)
- AI conversations → Video editing: requests video editing (evidence: `README.md`)
- Manuscript editor → Publication packages: packages content (evidence: `README.md`)
- Image generation → Publication packages: adds generated media (evidence: `README.md`)
- Video editing → Publication packages: adds edited video (evidence: `README.md`)
- Publication packages → Content calendar: schedules publication (evidence: `README.md`)
- Content calendar → Phone user: shares for publishing (evidence: `README.md`)
- AI conversations → Runtime query: submits runtime request
- Runtime query → Agent turn engine: prepares agent turn (evidence: `desktop/src-tauri/src/commands/runtime_query.rs`)
- Runtime query → Task orchestration: uses runtime orchestration (evidence: `desktop/src-tauri/src/commands/runtime_query.rs`)
- Task orchestration → Local persistence: stores workspace state (evidence: `desktop/src-tauri/src/persistence/mod.rs`)
- External AI agent → MCP agent access: connects through MCP (evidence: `README.md`)
- MCP agent access → Knowledge capture: accesses library (evidence: `README.md`)
- Creator → Browser capture: captures browser content
