DataWizard is a powerful tool that uses OpenAI to generate SQL queries and populate databases with information based on user input. Simply tell DataWizard how many rows and tables you want, specify the type of information (e.g., pizza store locations, menu items, employees), and provide a link to your database. DataWizard will create the SQL queries and execute them to populate your database automatically.
- Generate SQL Queries Automatically: Using OpenAI, DataWizard generates SQL queries based on the information you specify, saving time on manual query writing.
- Populate Your Database: After generating the SQL queries, DataWizard will send the queries to your database to populate it with the specified data.
- Flexible Inputs: Specify how many rows and tables you want, along with the type of information needed (e.g., "pizza store locations, menu items, and employees").
- Database Integration: Easily connect to your database by pasting the link to your database in the application, and let DataWizard handle the rest.
- Error-Free Query Generation: DataWizard ensures that the generated queries are syntactically correct and optimized for your database.
- Frontend: React.js for building an interactive and user-friendly interface.
- Backend: Node.js with Express.js to handle API requests and server-side logic.
- AI Integration: OpenAI's GPT-3 for generating SQL queries based on user input.
- Database Interaction: Send SQL queries to the database using a connection string.
- Testing: Jest for unit and integration tests, along with React Testing Library for frontend testing.
- API Testing: Supertest for testing the backend APIs.
- Build Tools: Webpack for bundling and optimizing the frontend.
-
User Input:
- Enter how many tables and rows you need in your database.
- Specify the type of information you want (e.g., "pizza store locations, menu items, and employees").
- Paste the link to your database connection (e.g., PostgreSQL, MySQL).
-
SQL Query Generation:
- DataWizard uses OpenAI's GPT-3 to generate the appropriate SQL queries based on your input.
-
Database Population:
- Once the SQL queries are generated, DataWizard executes them on your database to populate it with the data.
-
Database Confirmation:
- DataWizard will show you the status of the query execution, ensuring your database is populated correctly.
- Node.js (v14 or above)
- A database (PostgreSQL, MySQL, or any SQL-based database)
- OpenAI API Key for generating SQL queries
-
Clone the repository:
git clone https://github.com/yourusername/datawizard.git cd datawizard
-
Install the dependencies:
For backend (Node.js & Express):
cd backend npm install
For frontend (React):
cd frontend npm install
-
Set up environment variables:
Create a
.env
file in the backend directory and add your credentials:OPENAI_API_KEY=your_openai_api_key DATABASE_URL=your_database_connection_url
-
Run the application locally:
Start the backend server:
cd backend npm run server
Start the frontend development server:
cd frontend npm start
Your application will be accessible at
http://localhost:3000
.
To ensure DataWizard works as expected, we have written tests for both the backend and frontend.
To run unit tests with Jest, navigate to the backend directory and run:
cd backend
npm run test
We welcome contributions to make DataWizard even better! To contribute:
- Fork the repository.
- Create a new branch for your feature (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request.
Please ensure that your changes follow the coding standards, and provide tests where applicable.
DataWizard is licensed under the MIT License. See LICENSE for more details.