The Modern, AI-Powered Open-Source SQL IDE for Cloud-Native Teams.
🚀 Try Live Demo • 📖 Documentation • ⚡ Deploy Your Own
Try LibreDB Studio instantly without installation!
| Demo | URL | Credentials |
|---|---|---|
| Public Demo | app.libredb.org | demo / demo |
The demo runs in Demo Mode with simulated data. No real database required!
LibreDB Studio is a lightweight, high-performance, and secure web-based SQL editor designed to bridge the gap between heavy desktop applications (like DataGrip/DBeaver) and minimal CLI tools. Built with a "Mobile-First, Professional-Always" philosophy, it empowers engineering teams to manage databases anywhere—from a 4K monitor to a mobile screen.
- Zero Install: Run a professional SQL IDE in your browser or private network.
- Multi-Platform: Native-like experience on both Web and Mobile browsers.
- AI-Native: Multi-model support (Gemini, OpenAI, or Local LLMs) for NL2SQL.
- DevOps Ready: Optimized for Kubernetes orchestration and Docker environments.
- Enterprise Grade: Built-in RBAC, query auditing, and live health monitoring.
- Monaco Engine: Powered by the same core as VS Code.
- Smart Autocomplete: Schema-aware suggestions for tables, columns, and SQL keywords.
- Multi-Tab Workspace: Handle parallel tasks with independent execution states.
- Visual EXPLAIN: Graphical execution plans to identify performance bottlenecks.
- Universal LLM Support: Defaults to Gemini 2.5 Flash, but ready for OpenAI, Claude, or Local LLMs (Ollama/LM Studio).
- Prompt-to-SQL: Generate complex queries from natural language.
- Schema Awareness: AI understands your specific database structure for pinpoint accuracy.
- Plug & Play: Works out of the box with zero complex configuration.
- Universal Data Grid: Virtualized rendering (TanStack) for millions of rows.
- Inline Editing: Double-click to update values directly in the grid.
- Expert Exporter: Instant CSV and JSON exports for reporting.
- Live Monitoring: Track active connections, long-running queries, and session PIDs.
- One-Click Maintenance: Trigger
VACUUM,ANALYZE, andREINDEXglobally. - Audit Trail: Full history of every query executed across the organization.
| Component | Technology | Target |
|---|---|---|
| Framework | Next.js 15 (App Router), React 19 | Web, Mobile |
| UI Engine | Tailwind CSS 4, Radix UI, shadcn/ui | Web, Mobile |
| Theming | CSS Variables + @theme inline (Guide) |
Web, Mobile |
| Editor | Monaco Editor (VS Code Engine) | Web |
| AI | Multi-Model (Gemini, OpenAI, Ollama, Custom) | Web, Mobile |
| Database | PostgreSQL, MySQL, SQLite, MongoDB | Web, Mobile |
| State/Grid | TanStack Table & Virtual | Web, Mobile |
| Deployment | Docker, Kubernetes | Web |
- Bun (Recommended) or Node.js 20+
- A target database to query (PostgreSQL, MySQL, SQLite, or MongoDB)
- Clone & Install
git clone https://github.com/libredb/libredb-studio.git cd libredb-studio bun install
2. **Configure Environment**
Create a `.env.local` file:
```env
ADMIN_PASSWORD=admin123
USER_PASSWORD=user123
JWT_SECRET=your_32_character_random_string
# LLM Configuration
LLM_PROVIDER=gemini # options: gemini, openai, ollama, custom
LLM_API_KEY=your_api_key
LLM_MODEL=gemini-2.5-flash
LLM_API_URL=http://localhost:11434/v1 # optional for local LLMs (Ollama)
```
- Launch
Open http://localhost:3000
bun dev
Need a database to test with? We provide a ready-to-use PostgreSQL setup with sample data:
# Start PostgreSQL with sample e-commerce data
docker compose -f docker/postgres.yml up -d
# Stop (keeps data)
docker compose -f docker/postgres.yml down
# Stop and remove all data
docker compose -f docker/postgres.yml down -v| Feature | Description |
|---|---|
| PostgreSQL 17 | Latest Alpine image |
| pg_stat_statements | Pre-enabled for query monitoring |
| Sample Schema | E-commerce database (app schema) |
| Sample Data | 25 customers, 30 products, 100 orders |
| Views | Order summary, product sales, customer LTV |
Host: localhost
Port: 5432
Database: libredb_dev (or postgres)
User: postgres
Password: postgres
app.customers- Customer profiles with loyalty tiersapp.products- Product catalog with pricingapp.orders/app.order_items- Order historyapp.product_reviews- Customer reviewsapp.categories- Product categories (hierarchical)app.coupons- Discount codesapp.audit_log- Change tracking
💡 This setup is ideal for testing the Monitoring Dashboard features with real
pg_stat_statementsdata.
Deploy your own instance of LibreDB Studio with a single click:
| Variable | Required | Description |
|---|---|---|
ADMIN_PASSWORD |
✅ | Password for admin access |
USER_PASSWORD |
✅ | Password for user access |
JWT_SECRET |
✅ | Secret for JWT tokens (min 32 chars) |
LLM_PROVIDER |
❌ | AI provider: gemini, openai, ollama |
LLM_API_KEY |
❌ | API key for AI features |
LLM_MODEL |
❌ | Model name (e.g., gemini-2.0-flash) |
💡 Tip: Copy
.env.exampleto.env.localfor local development.
LibreDB Studio includes a render.yaml Blueprint for one-click deployment:
- Fork this repository
- Connect to Render: dashboard.render.com → New → Blueprint
- Select your forked repo and Render will auto-detect
render.yaml - Set Environment Variables in Render Dashboard:
ADMIN_PASSWORD: Your admin passwordUSER_PASSWORD: User access passwordJWT_SECRET: Generate withopenssl rand -base64 32LLM_API_KEY: (Optional) For AI features
- Deploy! 🎉
docker-compose up -dLibreDB Studio is optimized for K8s with:
- Standalone Mode: Reduced image size via Next.js output tracing.
- Horizontal Scaling: Stateless architecture (JWT-based) for effortless scaling.
- Health Checks: Integrated
/api/db/healthendpoint for readiness/liveness probes.
- Phase 1: Monaco SQL IDE & Multi-Tab Support.
- Phase 2: Multi-Model AI (Gemini, OpenAI, Ollama, Custom) Integration.
- Phase 3: Pro Data Grid & Virtualization.
- Phase 4: Multi-Database Support (PostgreSQL, MySQL, SQLite, MongoDB).
- Phase 5: Interactive ER Diagrams (Visual Schema Graph).
- Phase 6: Advanced Mobile SQL Keyboard Extension.
- Phase 7: SSO Integration (OIDC/SAML).
| Resource | Description |
|---|---|
| DeepWiki | AI-powered documentation — always up-to-date with the codebase |
| SonarCloud | Code quality, security analysis, and technical debt tracking |
| API Docs | Complete REST API reference |
| Theming Guide | CSS theming, dark mode, and styling customization |
| Architecture | System architecture and design patterns |
We welcome contributions from the community! Whether it's a bug fix, a new feature, or documentation improvements:
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your Changes (
git commit -m 'Add some AmazingFeature'). - Push to the Branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.
Built for DBAs and Developers.