Your AI business analyst. Ask questions in English. Get charts, insights, and decisions.
Most people who work with data are not SQL writers. They know what question they want answered — "Why did revenue drop last month?", "Who are my best customers?", "Is product X actually profitable?" — they just can't express it as a query.
QueryMind is an AI analyst for founders, operators, and business owners. You drop in your SQL schema. You ask your question in plain English. QueryMind writes the SQL, interprets the results, and tells you what the data means for your business — the same quality you'd expect from a senior analyst, on demand.
It is not a chatbot. It behaves like a senior analyst who happens to have read every table in your database.
You ask a question in plain English
↓
Schema + Prompt
↓
LLM (Claude / Groq / OpenAI)
↓
Generated SQL ──► Safety validation (SELECT only)
↓
Execution Engine
↓
Metrics + Results
↓
Analyst Narrative
↓
Dashboard
QueryMind only ever runs SELECT and WITH queries. It will never INSERT, UPDATE, DELETE, DROP, or modify your data in any way.
QueryMind enforces read-only access at the backend level, regardless of what the LLM generates:
ALLOWED = ("SELECT", "WITH", "EXPLAIN")
BLOCKED = ("INSERT", "UPDATE", "DELETE", "DROP", "ALTER",
"TRUNCATE", "CREATE", "REPLACE", "MERGE")
if not sql.upper().startswith(ALLOWED):
raise Exception("Only read queries permitted")
for kw in BLOCKED:
if re.search(rf"\b{kw}\b", sql.upper()):
raise Exception(f"Blocked keyword: {kw}")Every SQL string from the LLM is validated before execution. Queries without a LIMIT clause have one added automatically (default 500 rows).
querymind/
│
├── product/ ← deployable product
│ ├── frontend/ → Vite + React → Vercel (free)
│ │ ├── src/QueryMind.jsx → full UI: landing, auth, connect, analyst, dashboard
│ │ ├── src/main.jsx
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── vite.config.js
│ │ └── vercel.json
│ │
│ ├── backend/ → FastAPI → Render (free tier)
│ │ ├── main.py → auth, LLM routing, SQL safety, dashboard
│ │ ├── requirements.txt
│ │ ├── Procfile
│ │ ├── render.yaml → pins Python 3.11, free plan
│ │ ├── railway.json
│ │ └── .env.example
│ │
│ └── DEPLOY.md → step-by-step deployment guide
│
├── backend/ ← original prototype (MySQL + Gemini, hardcoded)
├── frontend/ ← original Streamlit frontend
├── dataspeak/ ← earlier component iterations
├── data_loader.py
├── LICENSE
└── README.md
Ask any business question in plain English. QueryMind responds with:
- Headline — the single most important finding, stated directly
- Key metrics — 2–4 numbers that matter most, pulled from the data
- Chart — auto-selected visualization (area for trends, bar for rankings, pie for composition, table for detail)
- Narrative — 4–6 sentences written like a senior analyst briefing a founder: main finding → business implication → caveats
- SQL — the generated query, collapsible, so technical users can verify
One click generates a complete 4–6 panel business overview from your schema. Each panel covers a different angle — revenue, volume, trends, customer segments, product performance. Panels are laid out in a responsive grid.
Every query is validated server-side before execution. Only SELECT and WITH are permitted. Write operations are blocked regardless of what the LLM generates.
Bring your own API key, or upgrade to Pro and use QueryMind's key:
| Provider | Free tier | Best model |
|---|---|---|
| Groq | Yes — console.groq.com | Llama 3.3 70B |
| Claude | No — console.anthropic.com | Claude Sonnet 4.6 |
| OpenAI | No — platform.openai.com | GPT-4o |
| Free | Pro | |
|---|---|---|
| Price | $0 | $19/month |
| API key | Bring your own | QueryMind's key |
| All providers | ✓ | ✓ |
| Dashboard generation | ✓ | ✓ |
| SQL safety layer | ✓ | ✓ |
| Setup friction | Pick provider + paste key | Sign up, done |
See product/DEPLOY.md for the full guide. Short version:
- render.com → New Web Service → connect this repo
- Root directory:
product/backend - Build:
pip install -r requirements.txt - Start:
uvicorn main:app --host 0.0.0.0 --port $PORT - Plan: Free → Deploy
- Copy the Render URL
- vercel.com → New Project → import this repo
- Root directory:
product/frontend - Env var:
VITE_BACKEND_URL= your Render URL - Deploy
# Backend
cd product/backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8000
# Frontend
cd product/frontend
npm install
echo "VITE_BACKEND_URL=http://localhost:8000" > .env.local
npm run dev
# → http://localhost:3000| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Health check |
/auth/signup |
POST | Create account |
/auth/login |
POST | Login, returns JWT |
/auth/me |
GET | Current user + pro status |
/query/schema |
POST | Ask a question (schema-only mode) |
/query/live |
POST | Ask a question (live DB execution) |
/dashboard |
POST | Generate full multi-panel dashboard |
/introspect |
POST | Auto-detect schema from connection string |
/billing/checkout |
POST | Stripe checkout session |
/billing/stripe-webhook |
POST | Stripe events (payment, cancellation) |
/billing/portal |
POST | Stripe customer portal |
| Variable | Description |
|---|---|
SECRET_KEY |
JWT secret — python -c "import secrets; print(secrets.token_hex(32))" |
QM_PROVIDER |
groq (recommended for cost) |
QM_API_KEY |
Your Groq/Claude/OpenAI key for Pro users |
QM_MODEL |
llama-3.3-70b-versatile |
FRONTEND_URL |
Your Vercel URL (used for CORS + Stripe redirects) |
STRIPE_SECRET_KEY |
From Stripe dashboard |
STRIPE_WEBHOOK_SECRET |
From Stripe → Webhooks |
STRIPE_PRICE_ID |
Your $19/mo recurring price ID |
- Live database connections via UI (currently schema-paste only)
- Multi-turn conversation with memory of previous results
- Scheduled reports via email / Slack
- Query history and saved analyses
- CSV / PDF export
- Startup ($79/mo) and Team ($299/mo) tiers
- Tenant isolation for multi-workspace Pro accounts
- Observability: query logging, error tracking, usage metrics
Open source under MIT. PRs welcome.
Most valuable contributions right now:
- Live DB connector — wire the Connect page to
/query/livewith a real connection string - SQL retry — if execution fails, re-prompt the LLM with the error and retry once
- Export — PDF/CSV download of dashboard panels and analysis results
Open an issue before large PRs.
MIT — use it, fork it, build on it.
Built by Henry Dibie