AI-powered open-source database management tool that simplifies database interactions with secure connection storage and AI-assisted SQL query writing.
- Multi-Database Support: PostgreSQL, MySQL, SQLite, MSSQL, Snowflake (coming soon)
- AI-Powered SQL: Generate and optimize queries using natural language with Claude, OpenAI, or AWS Bedrock
- Cross-Platform: Desktop app (Electron) and Web app
- Query History: Track and manage your SQL queries
- Workspace Management: Organize connections and queries
dbx-studio/
├── apps/
│ ├── api/ # Backend API (Hono + Bun)
│ ├── web/ # Web application (React + Vite)
│ └── desktop/ # Desktop app (Electron + React)
├── packages/
│ ├── ui/ # Shared UI components
│ └── shared/ # Shared utilities and types
└── docs/ # Documentation
- React 18
- Vite
- Electron (desktop)
- TailwindCSS
- TanStack Query & Router
- Monaco Editor
- Bun (runtime)
- Hono (web framework)
- Drizzle ORM
- PGLite (embedded database)
- oRPC (type-safe RPC)
- Node.js >= 18
- Bun >= 1.0
- pnpm >= 8
docker run -it --name dbx-studio -p 8080:8080 -v "./app_data:/app/data" -v "./api_data:/app/apps/api/data" ghcr.io/dbxstudio/dbx-studio:latestdocker run -it --name dbx-studio -p 8080:8080 -v "${PWD}\app_data:/app/data" -v "${PWD}\api_data:/app/apps/api/data" ghcr.io/dbxstudio/dbx-studio:latestpnpm installBackend (apps/api):
cd apps/api
cp .env.example .envEdit .env and add your AI provider credentials:
# Server
PORT=3002
# AI Provider (choose one)
ANTHROPIC_API_KEY=sk-ant-...
# OR
OPENAI_API_KEY=sk-...
# OR
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_REGION=us-east-1Web App (apps/web):
cd apps/web
cp .env.example .envDesktop App (apps/desktop):
cd apps/desktop
cp .env.example .envOption A: Start All Apps
pnpm devOption B: Start Individual Apps
# Terminal 1 - Backend API
cd apps/api
bun run dev
# Server runs at http://localhost:3002
# Terminal 2 - Web App
cd apps/web
pnpm dev
# Opens at http://localhost:5174
# Terminal 3 - Desktop App (optional)
cd apps/desktop
pnpm dev
# Electron window opens| Command | Description |
|---|---|
pnpm dev |
Start all apps in development mode |
pnpm dev:api |
Start only the API server |
pnpm dev:desktop |
Start only the desktop app |
pnpm build |
Build all apps for production |
pnpm lint |
Lint all packages |
pnpm clean |
Clean all build artifacts |
pnpm format |
Format code with Prettier |
| Command | Description |
|---|---|
bun run dev |
Start development server |
drizzle-kit studio |
Open database GUI |
drizzle-kit generate |
Generate migrations |
drizzle-kit migrate |
Run migrations |
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm preview |
Preview production build |
The API uses PGLite (SQLite-compatible) for storing:
- Database connections
- Query history
- AI chat sessions
- Application settings
No external database setup required - the database is automatically initialized on first run.
DBX Studio supports multiple AI providers:
| Provider | Models | Configuration |
|---|---|---|
| AWS Bedrock | Claude 3.5 Haiku/Sonnet | AWS credentials |
| Anthropic | Claude 3.5 | API key |
| OpenAI | GPT-4, GPT-3.5 | API key |
Configure your preferred provider in the .env file or through the app settings.
┌─────────────────┐ ┌─────────────────┐
│ Desktop App │ │ Web App │
│ (Electron) │ │ (Browser) │
└────────┬────────┘ └────────┬────────┘
│ │
└───────────┬───────────┘
│
┌──────▼──────┐
│ Backend │
│ (Hono/Bun) │
└──────┬──────┘
│
┌───────────┼───────────┐
│ │ │
┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│ PGLite │ │ AI │ │ User │
│ (Local) │ │Providers│ │ DBs │
└─────────┘ └─────────┘ └─────────┘
pnpm testpnpm formatpnpm lintThe web app can be deployed to Vercel:
cd apps/web
vercelThe API can be deployed to Railway, Render, or any platform supporting Bun:
cd apps/api
# Build
bun build src/index.ts --outdir ./dist --target bun
# Run
bun run dist/index.js- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Apache 2.0 - see LICENSE file for details.