Skip to content
anushka8singhPublic

About

Built an AI-powered system using React, Node.js, and FastAPI that converts natural language queries into SQL with a self-correcting loop, enabling faster and error-resilient access to legacy databases.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QueryEase

QueryEase is a two-service application:

  • backend/ is an Express REST API that accepts user requests and forwards them to the AI engine.
  • ai_engine/ is a FastAPI service that turns natural language into safe SQL, validates it, retries on failure, and returns results plus structured logs.

Request flow

  1. Client sends a natural-language query to POST /api/query.
  2. The Express backend validates the payload and forwards it to POST /ai/query.
  3. The FastAPI agent inspects schema metadata, applies semantic mapping, generates SQL, performs a dry run with EXPLAIN, retries if needed, and then executes the query.
  4. The AI engine returns sql, result, logs, attempts, and success.

Run locally

Backend

cd backend
npm install
$env:AI_ENGINE_URL="http://127.0.0.1:8000"
npm start

AI engine

cd ai_engine
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
$env:LLM_PROVIDER="rules"
$env:MYSQL_HOST="127.0.0.1"
$env:MYSQL_PORT="3306"
$env:MYSQL_USER="readonly_user"
$env:MYSQL_PASSWORD="readonly_password"
$env:MYSQL_DATABASE="legacy_db"
uvicorn main:app --reload --host 0.0.0.0 --port 8000

About

Built an AI-powered system using React, Node.js, and FastAPI that converts natural language queries into SQL with a self-correcting loop, enabling faster and error-resilient access to legacy databases.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages