A sophisticated AI-powered conversational interface that answers complex business questions from SQL databases using natural language processing and advanced analytics.
This application combines React frontend with Python Flask backend to create an intelligent agent capable of handling:
- Complex database schemas
- Bad or unnamed table/column structures
- Dirty data analysis
- Vague business questions
- Natural language responses with charts and tables
- Frontend: React with TypeScript, Chart.js for visualizations
- Backend: Python Flask with SQLAlchemy, OpenAI/Claude integration
- Database: SQLite for development, PostgreSQL/MySQL support
- AI: Large Language Models for query understanding and response generation
- React 18
- TypeScript
- Axios for API calls
- Chart.js & React-Chartjs-2 for visualizations
- Material-UI for components
- Tailwind CSS for styling
- Flask with Flask-CORS
- SQLAlchemy for ORM
- OpenAI/Anthropic API clients
- Pandas for data manipulation
- Matplotlib/Plotly for chart generation
- python-dotenv for environment variables
- Node.js 18+ and npm
- Python 3.9+
- OpenAI or Anthropic API key
-
Install Frontend Dependencies
cd frontend npm install
-
Install Backend Dependencies
cd backend pip install -r requirements.txt
-
Environment Setup
- Copy
.env.example
to.env
- Add your API keys and database configuration
- Copy
-
Database Setup
cd backend python init_db.py
-
Start Backend Server
cd backend python app.py
-
Start Frontend Development Server
cd frontend npm start
The application will be available at http://localhost:3000
- Natural language question processing
- Intelligent SQL query generation
- Dynamic chart and table generation
- Schema analysis and understanding
- Data quality assessment
- Complex analytical capabilities
/
├── frontend/ # React application
├── backend/ # Flask API server
├── database/ # Database files and schemas
├── docs/ # Documentation
└── tests/ # Test files