# great-yudzz/nodra architecture

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

- Interactive diagram: https://gitdiagram.com/great-yudzz/nodra
- Repository: https://github.com/great-yudzz/nodra

## Overview

Nodra is a Tauri/React desktop workspace for AI chat, autonomous agents, multi-agent software-building, and a markdown knowledge vault. The user selects a mode in the workspace, supplies a prompt and optional context, and receives model responses or agent work; the build experience adds review and terminal workflows, while the vault manages linked notes and their lifecycle. The graph emphasizes the documented product branches and source-visible calls. Several backend and UI capabilities are represented at subsystem level because their implementation was not sampled.

Main entry points: [`src-tauri/src/ipc/mod.rs`](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/ipc/mod.rs) (Tauri Commands), [`src/App.tsx`](https://github.com/great-yudzz/nodra/blob/main/src/App.tsx) (Mode Workspace), [`src/components/chatbot/ChatContainer.tsx`](https://github.com/great-yudzz/nodra/blob/main/src/components/chatbot/ChatContainer.tsx) (Chat Mode), [`src/components`](https://github.com/great-yudzz/nodra/tree/main/src/components) (Build Studio)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Desktop Workspace"]
  node_app["Mode Workspace<br/>[App.tsx]"]
  node_state["Shared State<br/>[useStore.ts]"]
  node_ipc["Tauri Commands<br/>[mod.rs]"]
end

subgraph group_ai["AI Workflows"]
  node_chat["Chat Mode<br/>[ChatContainer.tsx]"]
  node_agentui["Agent Mode<br/>[AgentWorkspace.tsx]"]
  node_build["Build Studio"]
end

subgraph group_engine["Agent Engine"]
  node_orchestrator["Agent Orchestrator<br/>[orchestrator.rs]"]
  node_tools["Agent Tools<br/>[tools.rs]"]
  node_providers["Model Providers<br/>[mod.rs]"]
  node_rag["Codebase RAG<br/>[codebase_rag.rs]"]
  node_git["Git Operations<br/>[git.rs]"]
  node_terminal["Terminal Sessions"]
end

subgraph group_vault["Context Vault"]
  node_vaultui["Vault Workspace<br/>[VaultWorkspace.tsx]"]
  node_graphui["Vault Graph<br/>[GraphViewModal.tsx]"]
  node_vaultcore["Vault Services<br/>[mod.rs]"]
  node_audit["Mutation Audit<br/>[audit.rs]"]
  node_trash["Trash Retention<br/>[trash.rs]"]
  node_delete["Delete Approvals<br/>[delete_requests.rs]"]
end

subgraph group_support["Workspace Services"]
  node_api["Model Endpoints<br/>[api.ts]"]
  node_context["Context Pruning<br/>[contextManager.ts]"]
  node_upload["File Attachments<br/>[fileUpload.ts]"]
  node_db[("Agent Database<br/>[mod.rs]")]
end

node_user(("User"))

node_user -->|"chooses mode"| node_app
node_app -->|"renders mode"| node_chat
node_app -->|"renders mode"| node_agentui
node_app -->|"renders mode"| node_build
node_chat -->|"processes files"| node_upload
node_chat -->|"resolves endpoint"| node_api
node_agentui -->|"reads and updates"| node_state
node_chat -->|"reads and updates"| node_state
node_state -->|"resolves models"| node_api
node_context -->|"injects prompt"| node_api
node_ipc -->|"dispatches agent work"| node_orchestrator
node_ipc -->|"dispatches tool calls"| node_tools
node_ipc -->|"uses providers"| node_providers
node_orchestrator -->|"runs tools"| node_tools
node_orchestrator -->|"saves agent logs"| node_db
node_vaultui -.->|"opens graph"| node_graphui
node_graphui -->|"requests snapshot"| node_state
node_ipc -->|"routes vault commands"| node_vaultcore
node_vaultcore -->|"registers service"| node_audit
node_vaultcore -->|"registers service"| node_trash
node_vaultcore -->|"registers service"| node_delete
node_build -.->|"supports Git workflow"| node_git
node_build -.->|"offers shell workflow"| node_terminal
node_build -.->|"uses code context"| node_rag

click node_app "https://github.com/great-yudzz/nodra/blob/main/src/App.tsx"
click node_chat "https://github.com/great-yudzz/nodra/blob/main/src/components/chatbot/ChatContainer.tsx"
click node_agentui "https://github.com/great-yudzz/nodra/blob/main/src/components/agent/AgentWorkspace.tsx"
click node_build "https://github.com/great-yudzz/nodra/tree/main/src/components"
click node_state "https://github.com/great-yudzz/nodra/blob/main/src/store/useStore.ts"
click node_api "https://github.com/great-yudzz/nodra/blob/main/src/utils/api.ts"
click node_context "https://github.com/great-yudzz/nodra/blob/main/src/utils/contextManager.ts"
click node_upload "https://github.com/great-yudzz/nodra/blob/main/src/utils/fileUpload.ts"
click node_ipc "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/ipc/mod.rs"
click node_orchestrator "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/orchestrator.rs"
click node_tools "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/tools.rs"
click node_providers "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/providers/mod.rs"
click node_rag "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/codebase_rag.rs"
click node_git "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/git.rs"
click node_terminal "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/terminal_orchestration.rs"
click node_db "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/db/mod.rs"
click node_vaultui "https://github.com/great-yudzz/nodra/blob/main/src/components/vault/VaultWorkspace.tsx"
click node_graphui "https://github.com/great-yudzz/nodra/blob/main/src/components/vault/GraphViewModal.tsx"
click node_vaultcore "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/vault/mod.rs"
click node_audit "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/vault/audit.rs"
click node_trash "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/vault/trash.rs"
click node_delete "https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/vault/delete_requests.rs"

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_state,node_ipc,node_user toneBlue
class node_chat,node_agentui,node_build toneAmber
class node_orchestrator,node_tools,node_providers,node_rag,node_git,node_terminal toneMint
class node_vaultui,node_graphui,node_vaultcore,node_audit,node_trash,node_delete toneRose
class node_api,node_context,node_upload,node_db toneIndigo
```

## Components

### Desktop Workspace

- [Mode Workspace](https://github.com/great-yudzz/nodra/blob/main/src/App.tsx): `src/App.tsx`
- [Shared State](https://github.com/great-yudzz/nodra/blob/main/src/store/useStore.ts): `src/store/useStore.ts`
- [Tauri Commands](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/ipc/mod.rs): `src-tauri/src/ipc/mod.rs`

### AI Workflows

- [Chat Mode](https://github.com/great-yudzz/nodra/blob/main/src/components/chatbot/ChatContainer.tsx): `src/components/chatbot/ChatContainer.tsx`
- [Agent Mode](https://github.com/great-yudzz/nodra/blob/main/src/components/agent/AgentWorkspace.tsx): `src/components/agent/AgentWorkspace.tsx`
- [Build Studio](https://github.com/great-yudzz/nodra/tree/main/src/components): `src/components`

### Agent Engine

- [Agent Orchestrator](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/orchestrator.rs): `src-tauri/src/engine/orchestrator.rs`
- [Agent Tools](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/tools.rs): `src-tauri/src/engine/tools.rs`
- [Model Providers](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/providers/mod.rs): `src-tauri/src/providers/mod.rs`
- [Codebase RAG](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/codebase_rag.rs): `src-tauri/src/engine/codebase_rag.rs`
- [Git Operations](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/git.rs): `src-tauri/src/engine/git.rs`
- [Terminal Sessions](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/engine/terminal_orchestration.rs): `src-tauri/src/engine/terminal_orchestration.rs`

### Context Vault

- [Vault Workspace](https://github.com/great-yudzz/nodra/blob/main/src/components/vault/VaultWorkspace.tsx): `src/components/vault/VaultWorkspace.tsx`
- [Vault Graph](https://github.com/great-yudzz/nodra/blob/main/src/components/vault/GraphViewModal.tsx): `src/components/vault/GraphViewModal.tsx`
- [Vault Services](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/vault/mod.rs): `src-tauri/src/vault/mod.rs`
- [Mutation Audit](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/vault/audit.rs): `src-tauri/src/vault/audit.rs`
- [Trash Retention](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/vault/trash.rs): `src-tauri/src/vault/trash.rs`
- [Delete Approvals](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/vault/delete_requests.rs): `src-tauri/src/vault/delete_requests.rs`

### Workspace Services

- [Model Endpoints](https://github.com/great-yudzz/nodra/blob/main/src/utils/api.ts): `src/utils/api.ts`
- [Context Pruning](https://github.com/great-yudzz/nodra/blob/main/src/utils/contextManager.ts): `src/utils/contextManager.ts`
- [File Attachments](https://github.com/great-yudzz/nodra/blob/main/src/utils/fileUpload.ts): `src/utils/fileUpload.ts`
- [Agent Database](https://github.com/great-yudzz/nodra/blob/main/src-tauri/src/db/mod.rs): `src-tauri/src/db/mod.rs`

### Other components

- **User**

## Connections

- User → Mode Workspace: chooses mode (evidence: `src/App.tsx`)
- Mode Workspace → Chat Mode: renders mode (evidence: `src/App.tsx`)
- Mode Workspace → Agent Mode: renders mode (evidence: `src/App.tsx`)
- Mode Workspace → Build Studio: renders mode (evidence: `src/App.tsx`)
- Chat Mode → File Attachments: processes files (evidence: `src/components/chatbot/ChatContainer.tsx`)
- Chat Mode → Model Endpoints: resolves endpoint (evidence: `src/components/chatbot/ChatContainer.tsx`)
- Agent Mode → Shared State: reads and updates (evidence: `src/components/agent/AgentWorkspace.tsx`)
- Chat Mode → Shared State: reads and updates (evidence: `src/components/chatbot/ChatContainer.tsx`)
- Shared State → Model Endpoints: resolves models (evidence: `src/store/useStore.ts`)
- Context Pruning → Model Endpoints: injects prompt (evidence: `src/utils/contextManager.ts`)
- Tauri Commands → Agent Orchestrator: dispatches agent work (evidence: `src-tauri/src/ipc/mod.rs`)
- Tauri Commands → Agent Tools: dispatches tool calls (evidence: `src-tauri/src/ipc/mod.rs`)
- Tauri Commands → Model Providers: uses providers (evidence: `src-tauri/src/ipc/mod.rs`)
- Agent Orchestrator → Agent Tools: runs tools (evidence: `src-tauri/src/engine/orchestrator.rs`)
- Agent Orchestrator → Agent Database: saves agent logs (evidence: `src-tauri/src/engine/orchestrator.rs`)
- Vault Workspace → Vault Graph: opens graph
- Vault Graph → Shared State: requests snapshot (evidence: `src/components/vault/GraphViewModal.tsx`)
- Tauri Commands → Vault Services: routes vault commands (evidence: `src-tauri/src/ipc/mod.rs`)
- Vault Services → Mutation Audit: registers service (evidence: `src-tauri/src/vault/mod.rs`)
- Vault Services → Trash Retention: registers service (evidence: `src-tauri/src/vault/mod.rs`)
- Vault Services → Delete Approvals: registers service (evidence: `src-tauri/src/vault/mod.rs`)
- Build Studio → Git Operations: supports Git workflow (evidence: `README.md`)
- Build Studio → Terminal Sessions: offers shell workflow (evidence: `README.md`)
- Build Studio → Codebase RAG: uses code context
