https://github.com/udaysinh-git/chat2db
Gossip with your database instead of writing cryptic SQL. It's less judgmental about your queries, probably. Tell your data what you want!
https://github.com/udaysinh-git/chat2db
Last synced: 4 months ago
JSON representation
Gossip with your database instead of writing cryptic SQL. It's less judgmental about your queries, probably. Tell your data what you want!
- Host: GitHub
- URL: https://github.com/udaysinh-git/chat2db
- Owner: udaysinh-git
- License: mit
- Created: 2025-04-05T22:39:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-21T03:47:08.000Z (about 1 year ago)
- Last Synced: 2025-07-12T18:04:10.296Z (12 months ago)
- Language: HTML
- Homepage:
- Size: 3.62 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chat2DB - MySQL Chat Interface
A web application that allows users to interact with MySQL databases through a chat-like interface.
## Features
- Connect to MySQL databases with authentication
- Execute SQL queries with rich syntax highlighting
- View query results in a formatted table
- Support for database selection
## Initial Concept
Below is an initial design sketch of the project:

## Setup and Installation
### Prerequisites
- Python 3.7+
- Node.js and npm
- MySQL server
### Backend Setup
1. Install Python dependencies:
```
pip install -r requirements.txt
```
2. Create a `.env` file in the project root (optional):
```
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_PORT=3306
```
### Frontend Setup
1. Navigate to the `frontend` directory:
```
cd frontend
```
2. Install dependencies:
```
npm install
```
### Running the Application
From the project root, run:
```
python run.py
```
This will start both the backend and frontend servers and open a browser window.
Alternatively, you can run them separately:
- Backend: `uvicorn backend.main:app --reload`
- Frontend: `cd frontend && npm run dev -- --open`
## Usage
1. Enter your MySQL server connection details
2. Click "Connect" to establish a connection
3. Select a database from the dropdown
4. Enter your SQL query in the editor
5. Click "Execute Query" to run the query and see results
## Technologies Used
- Backend: FastAPI, MySQL Connector
- Frontend: SvelteKit, HTMX, Monaco Editor
- UI: Tailwind CSS