Skip to content

ilidio/SqlForge

Repository files navigation

SqlForge

GitHub

SqlForge is a modern, high-performance, cross-database client inspired by tools like Navicat and DataGrip, focused on:

  • Fast SQL workflows
  • Clean, keyboard-first UX
  • Built-in AI assistant
  • Schema and data synchronization
  • Developer-first architecture

It is designed for backend engineers, data engineers, and DBAs who want speed, power, and clarity without bloat.


🚀 Recent Updates

  • Advanced Features: Transactional data editing, schema synchronization, and monitoring are now fully implemented and free for all users.
  • Safe Data Editing: Spreadsheet-style grid with inline editing, row deletions, batch updates, and optimistic concurrency protection.
  • Transactional Logic: Batch mutations are wrapped in SQL transactions—if one operation fails, the entire set rolls back safely.
  • Context-Aware Navigation: Menus and shortcuts (F9/F10) intelligently enable/disable based on your active connection and tab.
  • Modern SVG Logo: High-resolution branding integrated across the UI and Help system.
  • Automated Test Lifecycle: test.sh now manages the entire database environment (Docker + SQLite) fresh for every run.

Key Features

  • Multi-database Support: Postgres, MySQL, SQLite, SQL Server, Oracle, MongoDB, Redis.
  • AI SQL Assistant: Schema-aware query generation powered by Google Gemini.
  • Transactional Data Editor: Edit cells or delete rows directly in the results grid with full rollback safety.
  • Advanced Object Browser: Grouped views for Tables, Views, Functions, Triggers, and Collections with right-click context menus.
  • Keyboard-First Navigation:
    • ⌘ K: Command Palette
    • F9: Focus Query Editor
    • F10: Focus Result Grid
    • ⌘ Enter: Execute Query
  • Export Wizard: Multi-format export (CSV, JSON, SQL Insert statements) with detailed configuration options.
  • Schema & Data Sync: Robust diffing engine using sqlglot for cross-dialect synchronization.
  • Monitoring Dashboard: Integrated Prometheus and Grafana for professional-grade database diagnostics.
  • Dark/Light Themes: Modern OKLCH-based theme engine with beautiful sonner notifications.

Project Structure

SqlForge/
├── backend/        # FastAPI engine, DB drivers & Core logic (Sync, Backup, State)
├── frontend/       # React 19 + Tailwind 4 + Radix UI
├── scripts/        # Centralized management & automation scripts
├── tests/          # Docker DB suite & test cases
├── ARCHITECTURE.md # System design & sync logic
├── USER_STORIES.md # Product requirements
└── README.md       # This file

🤖 AI Configuration

To enable the built-in AI SQL Assistant, you need to provide your Google Gemini credentials.

  1. Locate the .gemini_config.json file in the project root.
  2. Add your API key and preferred model:
    {
      "gemini_api_key": "YOUR_API_KEY",
      "gemini_model": "gemini-1.5-flash"
    }
  3. The backend will automatically detect these settings and enable AI features across the application.

Note: The .gemini_config.json file is explicitly listed in .gitignore to keep your credentials secure and prevent them from being committed to the repository.


🛠 Development & Test Environment

SqlForge includes a pre-configured Docker-based lab environment to test its multi-database features. When you run ./test.sh or ./scripts/start_dbs.sh, the following components are deployed:

1. Databases (Functional Testing)

  • Relational (SQL): Postgres, MySQL, MSSQL, and Oracle instances for testing queries, schema migrations, and ER diagram generation.
  • NoSQL / KV: MongoDB and Redis for validating document and key-value management features.

2. Monitoring Stack (Observability)

  • Prometheus & Grafana: Powers the real-time health charts in the Monitor Dashboard.
  • Exporters: Dedicated bridge containers (postgres-exporter, mysql-exporter) that feed database performance metrics into Prometheus.

3. Infrastructure

  • Virtual Network: All components reside on a private Docker network (docker_default), allowing the backend to communicate securely with all instances.

4. Connection Details (Docker Suite)

Database Host Port User Password Database
PostgreSQL localhost 5432 admin password testdb
MySQL localhost 3306 admin password testdb
MongoDB localhost 27017 - - testdb
Redis localhost 6379 - - -
SQL Server localhost 1433 sa Password123! TestDB
Oracle localhost 1521 admin password FREE

Quick Start

1. Setup

./setup.sh

2. Run Tests (Automated Environment)

This script will stop existing DBs, clean local files, start fresh containers, and run all tests.

./test.sh

3. Manage Databases Manually

./scripts/start_dbs.sh   # Start Docker containers
./scripts/stop_dbs.sh    # Stop Docker containers
./scripts/remove_local_dbs.sh # Wipe local SQLite databases (preserves metadata)
./scripts/remove_local_dbs.sh --all # Full wipe including connection metadata

4. Run Application

In separate terminals:

./run_backend.sh
./run_frontend.sh

Philosophy

SqlForge is built around these principles:

  • SQL-first, not ORM-first
  • Keyboard over mouse
  • Preview before mutate
  • Async everywhere
  • No blocking UI
  • Safe by default (Parameterized queries & Concurrency checks)

Status

🚧 Active development 🎯 Target: Navicat-level power with modern UX and AI-native workflows

About

SqlForge is a high-performance, professional-grade database management tool inspired by the power of Navicat and built with a modern, AI-native architecture. It combines a sophisticated FastAPI backend with a polished React/TypeScript frontend styled with Tailwind CSS 4 and OKLCH colors for a premium, high-contrast visual experience.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors