An AI-powered business analytics dashboard that enables users to query and visualize data using natural language. Built with React, FastAPI, LangChain, and Groq.
- Natural Language Queries: Ask questions in plain English like "What's our churn this month?"
- Interactive Visualizations: Beautiful charts and graphs using Recharts
- Modern UI: Responsive design with shadcn/ui components
- Real-time Insights: Instant AI-generated explanations of data
- NL2SQL Pipeline: Convert natural language to SQL using Groq AI
- CSV Upload & Processing: Automatic schema generation from uploaded files
- DuckDB Integration: Fast analytical database for data processing
- Dashboard Builder: Create custom dashboards with drag-and-drop widgets
- Query History: Track and retrieve past queries
InsightIQ/
├── frontend/ # React + TypeScript + Vite
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── pages/ # Page components
│ │ └── hooks/ # Custom hooks
│ └── package.json
├── backend/ # FastAPI + LangChain + Groq
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── services/ # AI and data services
│ │ └── models/ # Database models
│ └── requirements.txt
└── README.md
- React 18 - UI library
- TypeScript - Type-safe JavaScript
- Vite - Fast build tool
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful UI components
- Recharts - Charting library
- FastAPI - Modern Python web framework
- LangChain - AI application framework
- Groq - Fast AI inference for NL2SQL
- PostgreSQL - Primary database
- DuckDB - Analytical database
- SQLAlchemy - ORM and database toolkit
- Node.js (v16+)
- Python 3.8+
- PostgreSQL
- Groq API key
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install # or bun install -
Start development server:
npm run dev
-
Open browser:
http://localhost:5173
-
Navigate to backend directory:
cd backend -
Create virtual environment:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment:
cp env.example .env # Edit .env with your configuration -
Start the server:
python start.py
-
API Documentation:
http://localhost:8000/docs
Upload a CSV file through the web interface or API:
curl -X POST "http://localhost:8000/api/v1/upload/csv" \
-F "file=@sales_data.csv" \
-F "dataset_name=Sales Data"Use natural language to query your data:
- "What's our monthly revenue trend?"
- "Show me customer churn by region"
- "Which products are selling best?"
Build custom dashboards with your insights and share them with your team.
This project is licensed under the MIT License.