Skip to content

Latest commit

Β 

History

220 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ TABLEGRID

License: AGPL v3 Contributor Covenant Tauri Rust React TypeScript

A modern, blazingly fast, and elegant database management client & SQL editor for PostgreSQL, MySQL, MariaDB, SQLite, and Redis with built-in MCP Server & AI Copilot.


TABLEGRID is a high-performance, cross-platform desktop application built with Tauri v2 + Rust on the backend and React 19 + TypeScript + Vite + Monaco Editor on the frontend. It provides a fluid, intuitive, and feature-packed experience designed for developers, data engineers, and database administrators.


✨ Key Features

πŸ—„οΈ 1. Multi-Database & Redis Support

  • PostgreSQL: Native async driver support for advanced data types (UUID, JSONB, NUMERIC, TIMESTAMPTZ, Arrays, Composite types).
  • MySQL & MariaDB: Native protocol integration for MySQL 8+ and MariaDB (including Sequence management).
  • SQLite: Fast local SQLite file inspection, schema editing, and query execution.
  • Redis Key-Value & Stream Browser:
    • Tree and flat key views with prefix filtering, TTL editor, and real-time type inspection (String, Hash, List, Set, ZSet, Stream).
    • Redis CLI Console: Embedded interactive command console with syntax highlighting and auto-completion.
    • Redis Stream Panel: Field/Value inspector with range loading and live entries.
    • SlowLog & Metrics Dashboard: Server latency monitor, INFO statistics, and client transfer tools.
    • Database index switching (db0 – db15).

πŸ€– 2. Embedded Model Context Protocol (MCP) Server

  • Built-in Local MCP Server: Exposes database metadata, schema catalogs, and safe read queries to external AI clients (Claude Desktop, Cursor, Windsurf, Antigravity).
  • Enterprise Security: Constant-time SHA-256 Bearer Token verification and strict HTTP Origin/Host filtering against DNS rebinding.

🧠 3. AI Assistant & SQL Copilot

  • Multi-Provider AI Integration: Direct support for Ollama (Local LLMs), Google Gemini, OpenAI, Anthropic Claude, and OpenRouter.
  • Context-Aware SQL Generation: Automatically injects current database schema and active table structures into the prompt context for accurate query generation.
  • Live Streaming & 1-Click Execution: Real-time markdown chat streaming with instant "Run in Editor" or "Insert into Script" actions.

πŸ“ 4. Monaco SQL Editor Engine

  • Schema-Aware Autocomplete: Context-aware completion for table names, columns, SQL keywords, and stored functions.
  • Query Parameters Modal: Automatically detects :param, $1, and ? placeholders and prompts with typed input dialogs.
  • Visual Split Views: Single pane, Vertical split, or Horizontal split with drag-to-resize.
  • 1-Click SQL Formatting: Built-in Beautify and Minify formatters.

πŸ“Š 5. Visual EXPLAIN & Plan Analyzer

  • Plan Diagram Flowchart: Interactive visual node flowchart with color-coded cost severity (Green / Amber / Red).
  • Tree & Raw Views: Expandable/collapsible hierarchy showing node cost, startup cost, estimated rows, and index conditions.
  • Multiple Modes: Supports EXPLAIN (Estimated), EXPLAIN ANALYZE (Actual Execution), and JSON format inspection.

⚑ 6. Data Management, Migration & Comparison

  • High-Performance Data Grid: Virtualized row rendering, inline cell editing, sorting, column filters, and smart pagination.
  • Data Generator (Mocking): Generates realistic mock data (Names, Emails, Dates, Regex patterns, Foreign Key constraints).
  • Database Compare & Sync: Visual structure and data comparison between two databases with auto-generated sync DDL/DML scripts.
  • Schema Migration: Create snapshot checkpoints, track structural changes, and export migration scripts.
  • Dump Backup & Restore: Full database backup and restore supporting compressed .sql.gz files.

πŸ”’ 7. Enterprise Security & Transaction Controls

  • Transaction Isolation Panel: Switch isolation levels (Read Committed, Repeatable Read, Serializable) with live elapsed time tracking and uncommitted close protection.
  • Safe Mode: Read-Only lock mode to prevent accidental mutations on Production databases.
  • OS Keyring Integration: Credentials safely encrypted in Windows Credential Manager, macOS Keychain, or Linux Secret Service.
  • SSH Tunneling (Russh): Connect to private databases via bastion hosts with pure-Rust SSH port forwarding.

🎨 8. Liquid Glass Design & Internationalization

  • Liquid Glass Theme: Modern UI aesthetics inspired by macOS Sequoia and VisionOS with Dark and Light mode support.
  • Multi-Language (i18n): English and Vietnamese language support with instant switching.
  • Multi-Connection Rail (DbRail): Sidebar rail for managing multiple open connections concurrently with environment color tags.

πŸ› οΈ Tech Stack

Layer Technologies
Desktop Shell Tauri v2 (Rust)
Backend Runtime Tokio Β· SQLx Β· Rusqlite Β· Redis-rs
Protocols & Security rmcp (MCP SDK) Β· Axum Β· Russh Β· Keyring-rs
Frontend Framework React 19 Β· TypeScript Β· Vite 8
Editor & Terminal Monaco Editor Β· @xterm/xterm
Styling & Icons Vanilla CSS (Liquid Glass Design Tokens) Β· Lucide Icons
Testing & Linting Vitest Β· Oxlint

πŸš€ Getting Started

Prerequisites

  • Node.js: >= 18.x
  • Rust: >= 1.75 (Rust 2024 Edition)
  • Package Manager: npm, pnpm, or yarn

Installation & Development

  1. Clone the repository:

    git clone https://github.com/Phamthang1997/tablegrid.git
    cd tablegrid
  2. Install frontend dependencies:

    npm install
  3. Start in Development Mode:

    npm run dev
  4. Run Unit Tests & Linting:

    npm test          # Run Vitest test suites
    npx oxlint src    # Run Oxlint code analysis
  5. Build Desktop App for Production:

    npm run build     # Compile frontend bundle & build native desktop executable

⚠️ macOS Gatekeeper Troubleshooting ("App is damaged and can't be opened")

If you download a .dmg release built from GitHub Actions, macOS Gatekeeper may block unsigned binaries downloaded via web browsers. To resolve this:

  1. Drag TableGrid.app into your /Applications folder.
  2. Open Terminal and run:
    sudo xattr -rd com.apple.quarantine /Applications/TableGrid.app

πŸ“ Project Structure

table/
β”œβ”€β”€ src/                          # Frontend Source Code (React 19 + TypeScript)
β”‚   β”œβ”€β”€ components/               # UI Components
β”‚   β”‚   β”œβ”€β”€ ai/                   # AI Assistant & Chatbot Panels
β”‚   β”‚   β”œβ”€β”€ redis/                # Redis Key Browser, Stream, Console & SlowLog
β”‚   β”‚   β”œβ”€β”€ ConnectionManager.tsx # Database Connections & Credential Dialogs
β”‚   β”‚   β”œβ”€β”€ DataGrid.tsx          # Virtualized Data Grid Table & In-cell Editor
β”‚   β”‚   β”œβ”€β”€ SqlEditor.tsx         # Monaco Editor SQL Workspace & Split Panes
β”‚   β”‚   β”œβ”€β”€ ExplainViewer.tsx     # Visual EXPLAIN Flowchart & Plan Analyzer
β”‚   β”‚   β”œβ”€β”€ DbRail.tsx            # Multi-Connection Sidebar Switcher Rail
β”‚   β”‚   β”œβ”€β”€ TxControl.tsx         # Transaction Isolation & Safety Toolbar
β”‚   β”‚   └── TerminalPanel.tsx     # Embedded Local & Remote SSH Terminal
β”‚   β”œβ”€β”€ sql/                      # Monaco SQL Language Service & Result Formatters
β”‚   β”œβ”€β”€ utils/                    # Tauri IPC Bridge & Helper Utilities
β”‚   β”œβ”€β”€ i18n/                     # Internationalization (EN / VI Locales)
β”‚   β”œβ”€β”€ App.tsx                   # Main Workspace Container Component
β”‚   └── index.css                 # Liquid Glass Design System Tokens
β”œβ”€β”€ src-tauri/                    # Backend Source Code (Rust + Tauri v2)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                  # Tauri Handlers Registration & Run Entry
β”‚   β”‚   β”œβ”€β”€ database/             # PostgreSQL / MySQL / SQLite Drivers & Catalog
β”‚   β”‚   β”œβ”€β”€ redis_db/             # Redis Connection Session & Command Engine
β”‚   β”‚   β”œβ”€β”€ mcp/                  # Built-in Streamable HTTP MCP Server & Security
β”‚   β”‚   β”œβ”€β”€ state/                # Connection Pool Registry & App State
β”‚   β”‚   β”œβ”€β”€ ssh/                  # Russh Secure Port Forwarding Tunnel
β”‚   β”‚   β”œβ”€β”€ terminal/             # Local PTY & SSH Remote Shell Streamer
β”‚   β”‚   β”œβ”€β”€ credentials/          # OS Keyring Secure Storage
β”‚   β”‚   β”œβ”€β”€ datagen/              # Schema-Aware Mock Data Generator
β”‚   β”‚   β”œβ”€β”€ compare/              # Database Schema & Data Comparison
β”‚   β”‚   β”œβ”€β”€ stats/                # Database Server Performance Statistics
β”‚   β”‚   └── tx/                   # Transaction Isolation & Safe Mode Handlers
β”‚   β”œβ”€β”€ Cargo.toml                # Rust Dependencies Manifest
β”‚   └── tauri.conf.json           # Tauri Desktop Configuration
β”œβ”€β”€ package.json
└── README.md

πŸ“„ License & Code of Conduct

About

A free, open-source, blazingly fast, and elegant database client and SQL editor built natively for everyone, supporting PostgreSQL, MySQL, SQLite, and Redis.

Topics

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages