Skip to content

MinnKhantZ/visuradb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VisuraDB

AI-powered database visualization and query tool. Connect to any database, explore schemas, run queries, and generate AI-assisted insights — all from a single web interface.

npm version License: MIT TypeScript React Express Vite Prisma PostgreSQL


✨ Features

  • Multi-Database Support — PostgreSQL, MySQL, MariaDB, SQLite, MongoDB, MSSQL, Oracle, Redis, DynamoDB, Firebase, Prisma
  • Schema Exploration — Browse tables, columns, indexes, and relationships visually
  • AI-Powered Insights — Natural language queries and smart suggestions
  • Query Runner — Run SQL/NoSQL queries directly from the web interface
  • Connection Management — Encrypted credential storage with master password
  • Vault & Settings — Secure persistence of connections and AI cache

🚀 Quick Start

# Zero-install (no setup required)
npx visuradb studio

# Or install globally
npm install -g visuradb
visuradb studio

Open http://localhost:3001 in your browser, set your master password, then add a database connection.


📦 Installation

Global install (recommended)

npm install -g visuradb

Zero-install (no setup required)

npx visuradb studio

📟 Commands

Command Description
visuradb init Interactive setup — configure port and data directory
visuradb studio Start the web interface
visuradb studio --port 4000 Override port without re-running init
visuradb studio --no-open Start without auto-opening the browser
visuradb --version Print version
visuradb --help Show help

⚙️ Configuration

visuradb init writes to ~/.visuradb/config.json:

{
  "port": 3001,
  "host": "127.0.0.1",
  "dataDir": "~/.visuradb/data"
}

The dataDir holds the SQLite database that stores your encrypted connection credentials, vault, settings, and AI cache.


🛠️ Tech Stack

Layer Technology
Frontend React 18, Vite 6, Astro, Tailwind CSS
Backend Express 4, TypeScript 5
Database PostgreSQL, SQLite, MySQL, MariaDB, MongoDB, MSSQL, Oracle, Redis, DynamoDB, Firebase
ORM Prisma
Auth Master password with encrypted storage
Runtime Node.js 18+

💻 Development

This is an npm workspaces monorepo.

visuradb/
  packages/
    client/   React + Vite frontend (@visuradb/client)
    server/   Express API server     (@visuradb/server)
    cli/      CLI wrapper            (visuradb — the published package)
  scripts/
    copy-client-dist.js
    copy-server-dist.js

Setup

git clone https://github.com/MinnKhantZ/visuradb.git
cd visuradb
npm install

Run in development mode

Open two terminals:

Terminal 1 — API server (hot-reloads on save):

npm run dev:server
# Server starts at http://localhost:3001

Terminal 2 — React client (Vite HMR):

npm run dev:client
# Client starts at http://localhost:5173

The client automatically proxies API calls to http://localhost:3001 in dev mode. Open http://localhost:5173 in your browser.

The dev server uses ./data/ in the server package directory for SQLite storage, not ~/.visuradb/.

Build for production

npm run build

This runs all five steps in sequence:

  1. Build the React client → packages/client/dist/
  2. Copy client dist → packages/cli/client-dist/
  3. Compile server TypeScript + copy SQL migrations → packages/server/dist/
  4. Copy server dist → packages/cli/server-dist/
  5. Compile CLI TypeScript → packages/cli/dist/

After building you can test the CLI locally:

node packages/cli/bin/visuradb.js studio

Sync upstream changes from the original repos

The packages/client and packages/server directories were added via git subtree and preserve the full commit history from their source repositories. To pull in new upstream changes:

# Pull latest client changes
git subtree pull --prefix=packages/client client master

# Pull latest server changes
git subtree pull --prefix=packages/server server master

📦 Publishing

# From the monorepo root — builds everything, then publishes the CLI
npm run build
cd packages/cli
npm version patch   # or minor / major
npm publish

Only packages/cli (the visuradb package) is published to npm. The client and server packages are internal build artifacts bundled inside the CLI tarball.


📄 License

MIT

About

AI-powered database visualization tool with schema explorer, query runner, and AI insights.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages