Documentation

Architecture

How the Tauri shell, React interface, and Rust backend fit together.

TableR combines a Tauri desktop shell, a React interface, and a Rust backend. The frontend talks to native services through Tauri commands and events; the backend manages connection pools and engine adapters.

React workspace
    |
    |  Tauri commands and events
    v
Rust application services
    |
    |  connection pools and engine adapters
    v
PostgreSQL / MySQL / SQLite / SQL Server / NoSQL / cloud databases

Technology

LayerStack
Desktop runtimeTauri 2
FrontendReact 19, TypeScript 5, Vite
StylingTailwind CSS 4
Native backendRust, Tokio
Database accessSQLx + engine-specific Rust drivers
Editor & terminalMonaco Editor, Xterm.js
Data & diagramsTanStack Table, Recharts, XYFlow
State managementZustand

How a query flows

When you run a statement, the frontend query store issues a request with a unique id and the active connection. The Rust backend registers a cancellation token for that request, then executes the SQL on a driver for the target engine.

  1. 1
    Request

    The frontend creates a request id, stores the active connection, and calls the matching Tauri command.

  2. 2
    Register

    The backend registers a cancellation token for the request so it can be stopped later.

  3. 3
    Execute

    On PostgreSQL and MySQL, the driver takes a dedicated pool connection and records its backend/connection id, then runs your SQL on that connection.

  4. 4
    Finish or cancel

    Results return with timing, or a cancel request stops the wait — and, where supported, the statement on the server.

Cancellation

Cancelling unblocks the waiting request immediately. On PostgreSQL, TableR issues pg_cancel_backend over a second pool connection; on MySQL/MariaDB it issues KILL QUERY the same way, so the cancel does not queue behind the running statement. A drop guard always cleans up the registry entry, even on timeout or panic.

Connection pooling

PostgreSQL and MySQL pools are capped at eight connections. Cancellation deliberately uses a separate connection so it never waits behind the in-flight query. Desktop usage is single-user, so a dedicated connection during a cancellable query is an acceptable trade-off.

Project layout

TableR/
├─ src/          React + TypeScript UI (components, hooks, stores, utils)
├─ src-tauri/    Rust backend, Tauri config, command handlers, drivers
├─ docs/         Architecture, security, product, and release docs
├─ website/      Next.js product website (this site)
└─ package.json  Frontend scripts and dependencies
Local-first by design

TableR runs on your machine. Credentials live in the OS keyring, and your data does not pass through this website.