A web-based tool for interacting with SQLite databases in the browser. Upload SQLite database files, explore schemas, run read-only SELECT queries, and use AI assistance to generate SQL from natural language.
- Database Upload: Load SQLite database files directly in the browser
- Schema Exploration: View table structures and column details
- Query Execution: Run read-only SELECT queries safely
- AI-Powered SQL Generation: Convert natural language questions to SQL queries using Google Gemini AI
- Result Visualization: Display query results in an interactive table format
- Project Verification: Built-in checklist for development workflow tracking
- Node.js (v14 or higher)
- Google Gemini API key (for natural language to SQL conversion)
-
Clone the repository:
git clone https://github.com/frquintero/read-only-sqlite-query-toolbox.git cd read-only-sqlite-query-toolbox -
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env.localfile in the root directory and add your Google Gemini API key:VITE_API_KEY=your_gemini_api_key_hereNote: Replace
your_gemini_api_key_herewith your actual Google Gemini API key. TheVITE_prefix ensures it's exposed to the client-side code. -
Run the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:3000
- Upload a Database: Click the file uploader to select a
.dbor.sqlitefile - View Schema: The left panel will display all tables and their columns
- Run Queries:
- Write SQL directly in the query editor
- Or use natural language: "Show me all customers from New York"
- View Results: Query results appear in a table below the editor
- Only read-only SELECT queries are allowed
- All processing happens locally in the browser
- Database files are not uploaded to any server
- React 19 - UI framework
- Vite - Build tool and dev server
- SQL.js - SQLite database engine in WebAssembly
- Google Generative AI - Natural language to SQL conversion
- TypeScript - Type safety
- Tailwind CSS - Styling