# tabularisdb/tabularis architecture

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

- Interactive diagram: https://gitdiagram.com/tabularisdb/tabularis
- Repository: https://github.com/tabularisdb/tabularis

## Overview

Tabularis is a desktop SQL workspace with built-in database drivers, installable plugins, and an MCP server for AI clients. The main workflow is a user managing database connections and issuing SQL through the app; a plugin manager loads drivers that provide database access. The tree also shows distinct explain-plan, theme-package, and plugin-authoring capabilities. Source excerpts are selective, so edges for unsampled UI and optional capabilities are marked unverified rather than presented as confirmed calls.

Main entry points: [`src-tauri/src/plugins/manager.rs`](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/plugins/manager.rs) (Plugin manager), [`packages/web-ui/src`](https://github.com/tabularisdb/tabularis/tree/main/packages/web-ui/src) (Workspace UI), [`packages/web-ui/src/hooks/useDatabase.ts`](https://github.com/tabularisdb/tabularis/blob/main/packages/web-ui/src/hooks/useDatabase.ts) (Database client state), [`src-tauri/src/plugins/driver.rs`](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/plugins/driver.rs) (Plugin drivers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["SQL workspace"]
  node_ui["Workspace UI"]
  node_connection_ui["Connection management"]
  node_query_ui["Query and data tools"]
  node_database_hook["Database client state<br/>[useDatabase.ts]"]
end

subgraph group_runtime["Database runtime"]
  node_connection_app["Connection operations<br/>[connections.rs]"]
  node_query_engine["Query execution<br/>[query.rs]"]
  node_driver_contract["Driver contract<br/>[driver_trait.rs]"]
  node_driver_registry["Driver registry<br/>[registry.rs]"]
  node_pool_manager["Connection pools<br/>[pool_manager.rs]"]
  node_storage_location[("Custom data location")]
end

subgraph group_extensibility["Plugins and themes"]
  node_plugin_manager["Plugin manager<br/>[manager.rs]"]
  node_plugin_driver["Plugin drivers<br/>[driver.rs]"]
  node_plugin_installer["Plugin installation<br/>[installer.rs]"]
  node_plugin_authoring["Driver scaffolding<br/>[main.rs]"]
  node_theme_packages["Theme packages<br/>[storage.rs]"]
end

subgraph group_integrations["Interfaces and analysis"]
  node_web_transport["Web server transport<br/>[server.rs]"]
  node_mcp["MCP server"]
  node_explain["Visual explain"]
end

node_user(("Database user"))

node_user -.->|"uses"| node_ui
node_ui -.->|"manages connections"| node_connection_ui
node_connection_ui -->|"delegates"| node_database_hook
node_database_hook -.->|"requests operations"| node_connection_app
node_query_ui -.->|"uses client"| node_database_hook
node_connection_app -.->|"uses pools"| node_pool_manager
node_query_engine -.->|"uses driver API"| node_driver_contract
node_plugin_manager -->|"loads driver"| node_plugin_driver
node_plugin_manager -->|"uses installer"| node_plugin_installer
node_plugin_manager -->|"registers driver"| node_driver_registry
node_plugin_driver -.->|"implements driver"| node_driver_contract
node_plugin_authoring -.->|"scaffolds drivers"| node_plugin_driver
node_user -.->|"installs themes"| node_theme_packages
node_ui -.->|"connects remotely"| node_web_transport
node_web_transport -.->|"exposes MCP"| node_mcp
node_query_ui -.->|"visualizes plans"| node_explain
node_storage_location -.->|"configures storage"| node_user

click node_ui "https://github.com/tabularisdb/tabularis/tree/main/packages/web-ui/src"
click node_connection_ui "https://github.com/tabularisdb/tabularis/blob/main/packages/web-ui/src/hooks/useConnectionManager.ts"
click node_query_ui "https://github.com/tabularisdb/tabularis/tree/main/packages/web-ui/src"
click node_database_hook "https://github.com/tabularisdb/tabularis/blob/main/packages/web-ui/src/hooks/useDatabase.ts"
click node_connection_app "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/application/connections.rs"
click node_query_engine "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/drivers/common/query.rs"
click node_driver_contract "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/drivers/driver_trait.rs"
click node_driver_registry "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/drivers/registry.rs"
click node_pool_manager "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/pool_manager.rs"
click node_plugin_manager "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/plugins/manager.rs"
click node_plugin_driver "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/plugins/driver.rs"
click node_plugin_installer "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/plugins/installer.rs"
click node_plugin_authoring "https://github.com/tabularisdb/tabularis/blob/main/packages/create-plugin/templates/rust-driver/src/main.rs"
click node_theme_packages "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/theme_packages/storage.rs"
click node_web_transport "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/transport/web/server.rs"
click node_mcp "https://github.com/tabularisdb/tabularis/tree/main/src-tauri/src/transport/web"
click node_explain "https://github.com/tabularisdb/tabularis/tree/main/packages/explain/src"
click node_storage_location "https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/storage_location.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_ui,node_connection_ui,node_query_ui,node_database_hook toneBlue
class node_connection_app,node_query_engine,node_driver_contract,node_driver_registry,node_pool_manager,node_storage_location,node_user toneAmber
class node_plugin_manager,node_plugin_driver,node_plugin_installer,node_plugin_authoring,node_theme_packages toneMint
class node_web_transport,node_mcp,node_explain toneRose
```

## Components

### SQL workspace

- [Workspace UI](https://github.com/tabularisdb/tabularis/tree/main/packages/web-ui/src): `packages/web-ui/src`
- [Connection management](https://github.com/tabularisdb/tabularis/blob/main/packages/web-ui/src/hooks/useConnectionManager.ts): `packages/web-ui/src/hooks/useConnectionManager.ts`
- [Query and data tools](https://github.com/tabularisdb/tabularis/tree/main/packages/web-ui/src): `packages/web-ui/src`
- [Database client state](https://github.com/tabularisdb/tabularis/blob/main/packages/web-ui/src/hooks/useDatabase.ts): `packages/web-ui/src/hooks/useDatabase.ts`

### Database runtime

- [Connection operations](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/application/connections.rs): `src-tauri/src/application/connections.rs`
- [Query execution](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/drivers/common/query.rs): `src-tauri/src/drivers/common/query.rs`
- [Driver contract](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/drivers/driver_trait.rs): `src-tauri/src/drivers/driver_trait.rs`
- [Driver registry](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/drivers/registry.rs): `src-tauri/src/drivers/registry.rs`
- [Connection pools](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/pool_manager.rs): `src-tauri/src/pool_manager.rs`
- [Custom data location](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/storage_location.rs): `src-tauri/src/storage_location.rs`

### Plugins and themes

- [Plugin manager](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/plugins/manager.rs): `src-tauri/src/plugins/manager.rs`
- [Plugin drivers](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/plugins/driver.rs): `src-tauri/src/plugins/driver.rs`
- [Plugin installation](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/plugins/installer.rs): `src-tauri/src/plugins/installer.rs`
- [Driver scaffolding](https://github.com/tabularisdb/tabularis/blob/main/packages/create-plugin/templates/rust-driver/src/main.rs): `packages/create-plugin/templates/rust-driver/src/main.rs`
- [Theme packages](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/theme_packages/storage.rs): `src-tauri/src/theme_packages/storage.rs`

### Interfaces and analysis

- [Web server transport](https://github.com/tabularisdb/tabularis/blob/main/src-tauri/src/transport/web/server.rs): `src-tauri/src/transport/web/server.rs`
- [MCP server](https://github.com/tabularisdb/tabularis/tree/main/src-tauri/src/transport/web): `src-tauri/src/transport/web`
- [Visual explain](https://github.com/tabularisdb/tabularis/tree/main/packages/explain/src): `packages/explain/src`

### Other components

- **Database user**

## Connections

- Database user → Workspace UI: uses (evidence: `README.md`)
- Workspace UI → Connection management: manages connections (evidence: `packages/web-ui/src/hooks/useConnectionManager.ts`)
- Connection management → Database client state: delegates (evidence: `packages/web-ui/src/hooks/useConnectionManager.ts`)
- Database client state → Connection operations: requests operations
- Query and data tools → Database client state: uses client (evidence: `packages/web-ui/src/hooks/useConnectionManager.ts`)
- Connection operations → Connection pools: uses pools
- Query execution → Driver contract: uses driver API
- Plugin manager → Plugin drivers: loads driver (evidence: `src-tauri/src/plugins/manager.rs`)
- Plugin manager → Plugin installation: uses installer (evidence: `src-tauri/src/plugins/manager.rs`)
- Plugin manager → Driver registry: registers driver (evidence: `src-tauri/src/plugins/manager.rs`)
- Plugin drivers → Driver contract: implements driver
- Driver scaffolding → Plugin drivers: scaffolds drivers (evidence: `README.md`)
- Database user → Theme packages: installs themes
- Workspace UI → Web server transport: connects remotely
- Web server transport → MCP server: exposes MCP (evidence: `README.md`)
- Query and data tools → Visual explain: visualizes plans
- Custom data location → Database user: configures storage (evidence: `src-tauri/src/storage_location.rs`)
