Query your data in natural language. Get instant tables, graphs, and insights β no SQL required.
Qurate transforms how you interact with your databases. Ask questions in plain English, Hindi, Telugu, Punjabi, or any of 12+ languages β and get instant responses as formatted text, sortable tables, or beautiful charts.
Getting Started Β· Features Β· Architecture Β· API Reference Β· Contributing
Qurate is a full-stack AI platform that bridges the gap between natural language and SQL. Built for analysts, developers, and non-technical users alike, it provides:
- Conversational Database Queries β Ask questions like "Show me top 10 customers by revenue" and get structured results
- Multi-Modal Responses β Every answer is rendered as the best-fit format: text, interactive tables, or auto-generated charts
- Cross-Language Voice Input β Speak your queries in English, Hindi, Telugu, Punjabi, Tamil, Bengali, and more
- Sandboxed Execution β Each user gets an isolated PostgreSQL database, ensuring data security and privacy
- Excel-to-Database β Upload
.xlsx/.csvfiles to instantly create queryable database tables
|
|
|
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND β
β React 19 Β· Vite 8 Β· TailwindCSS 4 Β· Redux Toolkit Β· Recharts β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββββββ β
β β Landing β β Auth β β Pricing β β Dashboard β β
β β Page β βLogin/Signβ β Page β β Chat + Voice β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββββββ β
β β native fetch β
ββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β
ββββββββΌβββββββ
β FastAPI β
β Port 1008 β
ββββββββ¬βββββββ
β
βββββββββββββββββββββββΌβββββββββββββββββββββββ
β β β β
ββββββΌββββββ βββββΌβββββββββ βββββββΌβββββββ βββββββΌβββββββ
β Redis β β MongoDB β β PostgreSQL β β Gemini AI β
β Cache β β Atlas β β Sandboxes β β 3.1 Pro β
β β β β β β β β
β β’ Tokens β β β’ Users β β β’ Per-user β β β’ SQL Gen β
β β’ User β β β’ Chat Histβ β isolated β β β’ Security β
β cache β β β’ Accounts β β databasesβ β β’ Formatterβ
ββββββββββββ ββββββββββββββ ββββββββββββββ ββββββββββββββ
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 19, Vite 8, TypeScript 5.8 | SPA with component architecture |
| Styling | TailwindCSS 4, Shadcn UI | Utility-first CSS with premium components |
| Animations | Framer Motion (motion/react) | Page transitions, micro-interactions |
| Charts | Recharts | Interactive data visualization |
| State | Redux Toolkit | Auth, chat, and UI state management |
| API | Native fetch wrapper |
Auto token refresh, typed endpoints |
| Backend | Python 3.12, FastAPI | Async REST API |
| AI | Google Gemini 3.1 Pro | SQL generation, security audit, formatting |
| Auth DB | MongoDB Atlas | User accounts, chat history, sessions |
| Cache | Redis 7 | Refresh token store, user session caching |
| User DB | PostgreSQL 16 | Per-user sandboxed databases |
| Packages | pnpm (frontend), uv (backend) | Fast, disk-efficient package managers |
- Node.js β₯ 20 and pnpm (
npm i -g pnpm) - Python β₯ 3.12 and uv (
pip install uv) - PostgreSQL 16+ running locally
- Redis 7+ running locally (
redis-server) - MongoDB connection (Atlas or local)
- Google Gemini API Key
git clone https://github.com/your-username/Qurate.git
cd Quratecd backend-py
# Create virtual environment and install dependencies
uv venv
uv pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your actual credentials:
# MONGO_URI, GEMINI_API_KEY, POSTGRES_USER, POSTGRES_PASSWORD, etc.
# Start the server
uvicorn src.main:server --port 1008 --reloadcd frontend
# Install dependencies
pnpm install
# Start dev server
pnpm devNavigate to http://localhost:5173 β sign up, and you'll be redirected to the AI dashboard.
Qurate/
βββ frontend/ # React SPA
β βββ public/
β β βββ favicon.svg # Brand logo (purple lightning bolt)
β βββ src/
β β βββ components/
β β β βββ dashboard/ # Chat, Sidebar, Voice, Excel Upload
β β β βββ landing/ # Hero, MacbookScroll, Features, Stats
β β β βββ ui/ # GlassCard, GradientButton, ThemeToggle
β β β βββ Navbar.tsx # Responsive glassmorphic nav
β β β βββ ProtectedRoute.tsx
β β βββ lib/
β β β βββ api.ts # Native fetch wrapper with auto-refresh
β β β βββ utils.ts # cn() helper
β β βββ pages/
β β β βββ Landing.tsx # Hero + scroll + features + stats + CTA
β β β βββ Login.tsx # Glassmorphic login form
β β β βββ SignUp.tsx # Full registration form
β β β βββ Pricing.tsx # 3-tier pricing cards
β β β βββ Dashboard.tsx # AI chat interface
β β βββ store/
β β β βββ store.ts # Redux store config
β β β βββ authSlice.ts # Login/signup/logout
β β β βββ chatSlice.ts # Messages, prompt, history
β β β βββ uiSlice.ts # Theme, sidebar, voice language
β β βββ types/
β β β βββ speech.d.ts # Web Speech API declarations
β β βββ App.tsx # Routes
β β βββ main.tsx # Entry point + Provider
β β βββ index.css # Design system + theme variables
β βββ package.json
β βββ vite.config.ts
β βββ tsconfig.app.json
β
βββ backend-py/ # FastAPI server
β βββ src/
β β βββ main.py # Routes: login, signup, prompt, upload-excel
β βββ agents/
β β βββ agent.py # AI pipeline: SQL gen β audit β execute β format
β βββ decorators/
β β βββ auth.py # JWT authentication decorator
β βββ models/ # Pydantic models & response helpers
β βββ mongodb/ # MongoDB client (users, chat history)
β βββ redisdb/ # Redis client (token store, session cache)
β βββ postgresdb/ # PostgreSQL client (sandboxed DBs)
β βββ utils/ # JWT, password hashing
β βββ requirements.txt
β βββ .env
β
βββ README.md
| Method | Endpoint | Description |
|---|---|---|
POST |
/sign-up |
Register a new user (creates sandbox DB) |
POST |
/login |
Authenticate and receive JWT tokens |
POST |
/refresh |
Exchange refresh token for new access token |
All require
accesstokenheader
| Method | Endpoint | Description |
|---|---|---|
POST |
/prompt2query |
Send natural language β get text/table/graph |
GET |
/chat-history |
Retrieve conversation history |
DELETE |
/chat-history |
Clear conversation history |
POST |
/upload-excel |
Upload .xlsx/.csv to create a DB table |
Every /prompt2query response includes a data field with one of three types:
// Text response
{ "type": "text", "response": "Your database has 3 tables." }
// Table response
{
"type": "table",
"response": {
"columns": ["name", "age", "city"],
"rows": [["Alice", 30, "NYC"], ["Bob", 25, "SF"]]
}
}
// Graph response
{
"type": "graph",
"response": {
"x": ["Jan", "Feb", "Mar"],
"y": [100, 150, 200],
"x_label": "Month",
"y_label": "Revenue"
}
}| Token | Value | Usage |
|---|---|---|
--q-purple |
#863bff |
Primary brand, CTAs, gradients |
--q-purple-deep |
#7e14ff |
Hover states, accents |
--q-cyan |
#47bfff |
Secondary brand, chart accents |
- Glassmorphism β
.glassand.glass-strongutility classes - Glow Effects β
.glow-purpleand.glow-cyanfor hover states - Text Gradient β
.text-gradientfor the brand purpleβcyan gradient - Mesh Background β
.bg-gradient-meshfor ambient radial gradients - Shimmer Loading β
.shimmerfor skeleton loading states
The app supports dark and light modes:
- Persisted in
localStorageasqurate_theme - Toggled via the sun/moon icon in the navbar or sidebar
- CSS variables swap automatically via the
.darkclass on<html>
Qurate supports cross-language voice queries via the Web Speech API:
| Language | Code | Language | Code |
|---|---|---|---|
| English | en-US |
Hindi | hi-IN |
| Punjabi | pa-IN |
Telugu | te-IN |
| Tamil | ta-IN |
Bengali | bn-IN |
| Marathi | mr-IN |
Gujarati | gu-IN |
| Kannada | kn-IN |
Malayalam | ml-IN |
| Urdu | ur-IN |
French | fr-FR |
The language picker is accessible via the π button next to the microphone in the chat input.
- JWT Authentication β Short-lived access tokens (60 min) + long-lived refresh tokens (7 days)
- Redis Token Store β Refresh tokens are stored in Redis hashes (
refresh:{email}) with 7-day TTL; tokens can be individually invalidated without affecting other sessions - User Session Cache β Authenticated user details are cached in Redis (
user:{email}) for 30 minutes, reducing MongoDB reads on every request - Sandboxed Databases β Each user gets an isolated PostgreSQL database; cross-DB queries are impossible
- AI Security Audit β Every generated SQL query passes through a dedicated security agent before execution
- No Raw SQL Exposure β Users never see or write SQL; the AI generates and the auditor validates
The dashboard renders three distinct response types inline:
Plain conversational responses, clarifications, and status messages. Includes a π speaker button for text-to-speech playback.
Sortable, scrollable data tables with alternating row colors. Click column headers to sort ascending/descending.
Auto-generated bar charts using Recharts with brand gradient fills. The AI automatically selects the best chart type based on the data shape.
pnpm dev # Start Vite dev server (HMR)
pnpm build # TypeScript check + production build
pnpm preview # Preview production build locallyuvicorn src.main:server --port 1008 --reload # Dev with hot reload
python start.py # Production startCreate a .env file in backend-py/:
MONGO_URI="mongodb+srv://..."
GEMINI_API_KEY="your-gemini-api-key"
ACCESS_TOKEN_SECRET_KEY="your-secret"
REFRESH_TOKNE_SECRET_KEY="your-refresh-secret"
ACCESS_TOKEN_DURATION="60"
REFRESH_TOKEN_DURATION="7"
POSTGRES_PASSWORD="postgres"
POSTGRES_HOST="localhost"
POSTGRES_USER="postgres"
PORT=1008Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Built with π by Akshit Jain
Powered by Gemini AI Β· React Β· FastAPI Β· PostgreSQL Β· MongoDB