Skip to content
,

Open Source AI-Powered SQL Generator

·

Introducing Fireflow, an open-source project that takes the pain out of writing SQL queries. Built with a cutting-edge monorepo architecture using Nx, Angular for a user-friendly frontend and NestJS for a robust backend. But the real magic lies under the hood: Fireflow integrates with Google’s Gemini AI to generate SQL scripts based on your natural language requests.

In this blog post, I will provide a step-by-step approach to setting up your Fireflow project, getting you ready to explore the power of AI-driven SQL generation.

Setting up the project

First, clone the project from GitHub, which is very straight-forward.

git clone https://github.com/Buddhilive/fireflow.git

Then navigate to the project root and run below command to install necessary dependencies:

npm i

Now you need to obtain an API key from Google AI Studio. I’ve already covered setting up the Google Gemini API in a previous post. Create an file named ‘.env’ at the project root. Insert your API key as shown below and save it.

API_KEY='<your_api_key>'

Run the project

Now that you have setup the project, just run the command below to see the live application.

npm start

Once the project is ready, navigate to http://localhost:4200 to view the project. You will see the UI as in Figure 1.

Figure 1

Now in the text filed, type the script you need. For example: “create a table for students”. Then click “Generate” button. The SQL script will be generated and will be visible in the section below.

You can copy the script to the clipboard by clicking the “copy” button in the right corner. To generate a new script, click “New” button.

Stay tuned, more is on the way

This is an experimental project and I’m planning to add more features. You can star, fork and watch the project. More related to this project will be posted on this site. Follow me on social media to receive updates. Stay tuned to hear more about this project!

You may also like: