TalkQL revolutionizes how you interact with databases by enabling natural language conversations with your data. Simply chat with your database as if you're talking to a friend, and watch as your questions transform into powerful SQL queries. Get answers in plain English, complete with intuitive visualizations and clear explanations.
As referenced in the features component:
- 🔄 Multi-Database Support: Connect to SQLite, MySQL, PostgreSQL, MS SQL, Snowflake, and CSV files
- 💬 Natural Language Processing: Convert casual questions into precise SQL queries
- 📊 Smart Visualizations: Automatic data visualization with context-aware chart selection
- 📋 Flexible Display Options: Toggle between tabular and narrative formats
- 🔍 Query Transparency: View and understand the generated SQL
- 🎨 Modern, Intuitive Interface: Clean design with smooth transitions and animations
- Next.js application with React components
- Real-time chat interface
- Dynamic visualization rendering
- Responsive design with Tailwind CSS
- FastAPI server handling request processing
- LangChain for natural language processing
- SQL query generation and optimization
- Visualization generation with matplotlib/seaborn TalkQL follows a modern client-server architecture:
graph TB
subgraph Frontend["Frontend (Next.js)"]
UI[User Interface]
Chat[Chat Interface]
Viz[Visualization Display]
end
subgraph Backend["Backend (FastAPI)"]
API[API Layer]
subgraph Agents["AI Agents"]
SQL[SQL Agent]
VIZ[Visualization Agent]
end
LLM[LangChain + GPT-4]
end
subgraph Databases["Database Support"]
SQLite[(SQLite)]
MySQL[(MySQL)]
PostgreSQL[(PostgreSQL)]
MSSQL[(MS SQL)]
Snowflake[(Snowflake)]
CSV[(CSV Files)]
end
UI --> |User Query| Chat
Chat --> |HTTP Request| API
API --> |Natural Language| SQL
SQL --> |Query Generation| LLM
LLM --> |SQL Query| SQL
SQL --> |Execute Query| Databases
Databases --> |Results| SQL
SQL --> |Data| VIZ
VIZ --> |Generate| LLM
VIZ --> |Visualization| API
API --> |Response| Chat
Chat --> |Display| Viz
- SQL Agent: Handles database connections and query processing
- Visualization Agent: Creates context-aware data visualizations
- Chat Interface: Manages user interactions and message display
- Database Connection Hub: Supports multiple database types
- Next.js 15.0
- React 18
- Tailwind CSS
- Framer Motion
- TypeScript
- React Markdown
- Python 3.8+
- FastAPI
- LangChain
- OpenAI GPT-4
- SQLAlchemy
- Matplotlib/Seaborn
- Pandas
- Clone the repository:
git clone https://github.com/yourusername/TalkQL.git
cd talkql
- Install backend dependencies:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
- Install frontend dependencies:
cd frontend
npm install
- Set up environment variables: (.env)
OPENAI_API_KEY=your_api_key
- Start the backend server:
cd backend
uvicorn api:app --reload
- Start the frontend development server:
cd frontend
npm run dev
-
Open your browser and navigate to
http://localhost:3000
-
Connect your database using the connection interface
-
Start chatting with your data!
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a 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
- OpenAI for GPT-4 API
- LangChain community
- All our contributors and users
This project is licensed under the MIT License - see the LICENSE file for details.