# sshdw/nexora architecture

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

- Interactive diagram: https://gitdiagram.com/sshdw/nexora
- Repository: https://github.com/sshdw/nexora

## Overview

Nexora is a local-first Tauri desktop AI workspace: users manage conversations and prompts, choose providers/models, attach local files, and send chat or agent requests; results and run history persist locally. The graph follows the documented React-to-IPC-to-application layering, then highlights provider execution, agent control, and SQLite-backed features. Source excerpts confirm selected UI and agent/data behaviors; other feature links reflect README architecture and exact tree paths, with uncertain internal calls omitted.

Main entry points: [`src-tauri/src/commands/mod.rs`](https://github.com/sshdw/nexora/blob/main/src-tauri/src/commands/mod.rs) (Tauri commands), [`src/lib/tauri.ts`](https://github.com/sshdw/nexora/blob/main/src/lib/tauri.ts) (IPC wrappers), [`src-tauri/src/infrastructure/repository/mod.rs`](https://github.com/sshdw/nexora/blob/main/src-tauri/src/infrastructure/repository/mod.rs) (SQLite repositories), [`src/App.tsx`](https://github.com/sshdw/nexora/blob/main/src/App.tsx) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app_ui["App shell<br/>[App.tsx]"]
  node_conversation_ui["Conversation view"]
  node_settings_ui["Settings and providers<br/>[SettingsView.tsx]"]
  node_library_ui["Prompt library"]
  node_context_ui["Run context<br/>[ContextPanel.tsx]"]
  node_hooks["Data hooks<br/>[useConversation.ts]"]
  node_tauri_client["IPC wrappers<br/>[tauri.ts]"]
end

subgraph group_app["Application services"]
  node_commands["Tauri commands<br/>[mod.rs]"]
  node_conversations["Conversation service<br/>[conversations.rs]"]
  node_providers_app["Provider execution<br/>[execution.rs]"]
  node_prompts["Prompt management<br/>[prompts.rs]"]
  node_search["Offline search<br/>[search.rs]"]
  node_data_ops["Import and settings<br/>[data_management.rs]"]
end

subgraph group_agent["Agent runtime"]
  node_agent_service["Run coordinator<br/>[service.rs]"]
  node_agent_runner["Agent runner<br/>[runner.rs]"]
  node_agent_pipeline["Staged pipeline<br/>[pipeline.rs]"]
  node_agent_tools["Tools and approvals<br/>[executor.rs]"]
  node_workspace["Workspace access<br/>[workspace.rs]"]
end

subgraph group_infra["Persistence and providers"]
  node_database[("SQLite database<br/>[database.rs]")]
  node_repositories["SQLite repositories<br/>[mod.rs]"]
  node_provider_clients["Provider clients<br/>[mod.rs]"]
end

node_person(("User"))
node_provider_services["AI providers"]
node_keyring[("OS keyring")]
node_file_picker["Local file picker"]

node_person -->|"uses"| node_app_ui
node_app_ui -->|"shows"| node_conversation_ui
node_app_ui -->|"opens"| node_settings_ui
node_app_ui -->|"opens"| node_library_ui
node_conversation_ui -->|"loads data"| node_hooks
node_settings_ui -->|"manages settings"| node_hooks
node_library_ui -->|"manages prompts"| node_hooks
node_context_ui -->|"requests stats"| node_tauri_client
node_hooks -->|"invokes"| node_tauri_client
node_tauri_client -->|"IPC calls"| node_commands
node_commands -->|"delegates"| node_conversations
node_commands -->|"executes requests"| node_providers_app
node_commands -->|"delegates"| node_prompts
node_commands -->|"searches"| node_search
node_commands -->|"imports and exports"| node_data_ops
node_commands -->|"controls runs"| node_agent_service
node_conversations -->|"reads and writes"| node_repositories
node_prompts -->|"reads and writes"| node_repositories
node_search -->|"queries index"| node_repositories
node_data_ops -->|"manages records"| node_repositories
node_repositories -->|"uses"| node_database
node_providers_app -->|"executes through"| node_provider_clients
node_provider_clients -->|"sends requests"| node_provider_services
node_providers_app -->|"gets credentials"| node_keyring
node_agent_service -->|"starts run"| node_agent_runner
node_agent_service -->|"persists runs"| node_repositories
node_agent_runner -->|"advances stages"| node_agent_pipeline
node_agent_runner -->|"dispatches tools"| node_agent_tools
node_agent_runner -->|"requests model"| node_providers_app
node_agent_tools -->|"accesses files"| node_workspace
node_agent_tools -->|"requests approval"| node_person
node_agent_service -->|"streams run events"| node_tauri_client
node_conversation_ui -->|"selects attachments"| node_file_picker
node_conversation_ui -->|"attaches files"| node_tauri_client
node_tauri_client -->|"attachment IPC"| node_commands

click node_app_ui "https://github.com/sshdw/nexora/blob/main/src/App.tsx"
click node_conversation_ui "https://github.com/sshdw/nexora/blob/main/src/components/ConversationView.tsx"
click node_settings_ui "https://github.com/sshdw/nexora/blob/main/src/components/SettingsView.tsx"
click node_library_ui "https://github.com/sshdw/nexora/blob/main/src/components/PromptLibraryView.tsx"
click node_context_ui "https://github.com/sshdw/nexora/blob/main/src/components/ContextPanel.tsx"
click node_hooks "https://github.com/sshdw/nexora/blob/main/src/lib/useConversation.ts"
click node_tauri_client "https://github.com/sshdw/nexora/blob/main/src/lib/tauri.ts"
click node_commands "https://github.com/sshdw/nexora/blob/main/src-tauri/src/commands/mod.rs"
click node_conversations "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/conversations.rs"
click node_providers_app "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/execution.rs"
click node_prompts "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/prompts.rs"
click node_search "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/search.rs"
click node_data_ops "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/data_management.rs"
click node_agent_service "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/agent/service.rs"
click node_agent_runner "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/agent/runner.rs"
click node_agent_pipeline "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/agent/pipeline.rs"
click node_agent_tools "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/agent/tools/executor.rs"
click node_workspace "https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/workspace.rs"
click node_database "https://github.com/sshdw/nexora/blob/main/src-tauri/src/infrastructure/database.rs"
click node_repositories "https://github.com/sshdw/nexora/blob/main/src-tauri/src/infrastructure/repository/mod.rs"
click node_provider_clients "https://github.com/sshdw/nexora/blob/main/src-tauri/src/infrastructure/providers/mod.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_ui,node_conversation_ui,node_settings_ui,node_library_ui,node_context_ui,node_hooks,node_tauri_client,node_person toneBlue
class node_commands,node_conversations,node_providers_app,node_prompts,node_search,node_data_ops,node_keyring toneAmber
class node_agent_service,node_agent_runner,node_agent_pipeline,node_agent_tools,node_workspace toneMint
class node_database,node_repositories,node_provider_clients toneRose
class node_provider_services,node_file_picker toneIndigo
```

## Components

### Desktop interface

- [App shell](https://github.com/sshdw/nexora/blob/main/src/App.tsx): `src/App.tsx`
- [Conversation view](https://github.com/sshdw/nexora/blob/main/src/components/ConversationView.tsx): `src/components/ConversationView.tsx`
- [Settings and providers](https://github.com/sshdw/nexora/blob/main/src/components/SettingsView.tsx): `src/components/SettingsView.tsx`
- [Prompt library](https://github.com/sshdw/nexora/blob/main/src/components/PromptLibraryView.tsx): `src/components/PromptLibraryView.tsx`
- [Run context](https://github.com/sshdw/nexora/blob/main/src/components/ContextPanel.tsx): `src/components/ContextPanel.tsx`
- [Data hooks](https://github.com/sshdw/nexora/blob/main/src/lib/useConversation.ts): `src/lib/useConversation.ts`
- [IPC wrappers](https://github.com/sshdw/nexora/blob/main/src/lib/tauri.ts): `src/lib/tauri.ts`

### Application services

- [Tauri commands](https://github.com/sshdw/nexora/blob/main/src-tauri/src/commands/mod.rs): `src-tauri/src/commands/mod.rs`
- [Conversation service](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/conversations.rs): `src-tauri/src/application/conversations.rs`
- [Provider execution](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/execution.rs): `src-tauri/src/application/execution.rs`
- [Prompt management](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/prompts.rs): `src-tauri/src/application/prompts.rs`
- [Offline search](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/search.rs): `src-tauri/src/application/search.rs`
- [Import and settings](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/data_management.rs): `src-tauri/src/application/data_management.rs`

### Agent runtime

- [Run coordinator](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/agent/service.rs): `src-tauri/src/application/agent/service.rs`
- [Agent runner](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/agent/runner.rs): `src-tauri/src/application/agent/runner.rs`
- [Staged pipeline](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/agent/pipeline.rs): `src-tauri/src/application/agent/pipeline.rs`
- [Tools and approvals](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/agent/tools/executor.rs): `src-tauri/src/application/agent/tools/executor.rs`
- [Workspace access](https://github.com/sshdw/nexora/blob/main/src-tauri/src/application/workspace.rs): `src-tauri/src/application/workspace.rs`

### Persistence and providers

- [SQLite database](https://github.com/sshdw/nexora/blob/main/src-tauri/src/infrastructure/database.rs): `src-tauri/src/infrastructure/database.rs`
- [SQLite repositories](https://github.com/sshdw/nexora/blob/main/src-tauri/src/infrastructure/repository/mod.rs): `src-tauri/src/infrastructure/repository/mod.rs`
- [Provider clients](https://github.com/sshdw/nexora/blob/main/src-tauri/src/infrastructure/providers/mod.rs): `src-tauri/src/infrastructure/providers/mod.rs`

### Other components

- **User**
- **AI providers**
- **OS keyring**
- **Local file picker**

## Connections

- User → App shell: uses
- App shell → Conversation view: shows
- App shell → Settings and providers: opens
- App shell → Prompt library: opens
- Conversation view → Data hooks: loads data
- Settings and providers → Data hooks: manages settings
- Prompt library → Data hooks: manages prompts
- Run context → IPC wrappers: requests stats
- Data hooks → IPC wrappers: invokes
- IPC wrappers → Tauri commands: IPC calls
- Tauri commands → Conversation service: delegates
- Tauri commands → Provider execution: executes requests
- Tauri commands → Prompt management: delegates
- Tauri commands → Offline search: searches
- Tauri commands → Import and settings: imports and exports
- Tauri commands → Run coordinator: controls runs
- Conversation service → SQLite repositories: reads and writes
- Prompt management → SQLite repositories: reads and writes
- Offline search → SQLite repositories: queries index
- Import and settings → SQLite repositories: manages records
- SQLite repositories → SQLite database: uses
- Provider execution → Provider clients: executes through
- Provider clients → AI providers: sends requests
- Provider execution → OS keyring: gets credentials
- Run coordinator → Agent runner: starts run
- Run coordinator → SQLite repositories: persists runs
- Agent runner → Staged pipeline: advances stages
- Agent runner → Tools and approvals: dispatches tools
- Agent runner → Provider execution: requests model
- Tools and approvals → Workspace access: accesses files
- Tools and approvals → User: requests approval
- Run coordinator → IPC wrappers: streams run events
- Conversation view → Local file picker: selects attachments
- Conversation view → IPC wrappers: attaches files
- IPC wrappers → Tauri commands: attachment IPC
