SQLTalk is an innovative web application that transforms natural language queries into SQL statements. It's designed to bridge the gap between non-technical users and database interactions, making data querying more accessible and efficient.
SQLTalk leverages advanced natural language processing to interpret user queries and generate accurate SQL statements. Whether you're a data analyst, business user, or developer, SQLTalk simplifies the process of interacting with databases, saving time and reducing the need for extensive SQL knowledge.
- Natural language to SQL conversion
- Support for multiple SQL dialects (MySQL, PostgreSQL)
- Interactive web interface
- Real-time query generation with loading indicator
- Syntax highlighting for generated SQL
- Free plan and Enterprise options available
- Frontend: Next.js, React, TypeScript
- UI Components: Tailwind CSS, shadcn/ui
- Syntax Highlighting: react-syntax-highlighter
- Loading Indicator: react-spinners
- AI Integration: Google's Generative AI (Gemini API)
- API: Next.js API Routes
- Deployment: Vercel (recommended)
- Node.js (v14 or later)
- npm or yarn
- A Google Cloud account with the Generative AI API enabled
-
Clone the repository:
git clone https://github.com/yourusername/sqltalk.git cd sqltalk
-
Install dependencies:
npm install # or yarn install
-
Set up environment variables:
- Copy the
.env.example
file to.env.local
:cp .env.example .env.local
- Open
.env.local
and replaceyour-gemini-api-key
with your actual Gemini API key:NEXT_PUBLIC_GEMINI_API_KEY=your-actual-gemini-api-key-here
Note: Make sure to keep your API key confidential and never commit it to version control.
- Copy the
-
Run the development server:
npm run dev # or yarn dev
-
Open http://localhost:3000 with your browser to see the result.
- Navigate to the SQLTalk interface.
- Input your database schema in the "Schema Input" section.
- Enter your query in plain English in the "Natural Language Query" section.
- Select your database type (MySQL or PostgreSQL).
- Click "Generate SQL" to receive your SQL query. A loading indicator will appear while the query is being generated.
The project uses Tailwind CSS for styling. You can customize the appearance by modifying the tailwind.config.js
file and the component files in the components
directory.
To add support for new SQL dialects:
- Modify the
generateSqlQuery
function inutils/gemini-api.ts
. - Update the database type options in
components/sqltalk-app.tsx
.
The easiest way to deploy your SQLTalk app is to use the Vercel Platform.
Check out the Next.js deployment documentation for more details.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js team for the amazing framework
- shadcn for the beautiful UI components
- Google for the Generative AI API
SQLTalk offers two pricing tiers:
-
Free Plan
- 100 queries per month
- Basic SQL dialects support
- Community support
-
Enterprise Plan
- Unlimited queries
- Advanced SQL dialects support
- 24/7 Priority support
- Custom integrations
- Contact sales for pricing