How vaibhavburad15/query-genie works
Query Genie is a natural-language database assistant. Users sign in, connect a database or uploaded file, browse metadata, ask questions, and receive read-only SQL results for tables or charts; they can also save favorites, manage chat history, and build custom dashboards. The React frontend communicates with a FastAPI backend, which handles authentication, source sessions, query generation and execution, and persisted user features. The README documents the major backend capabilities and provider options; backend excerpts are partial, so internal call relationships beyond those documented are not inferred.
Main entry points: backend.py HTTP API and orchestration · App.tsx Route and state shell · DashboardPage.tsx Chat dashboard · api.ts API client
Components 21
React frontend
- Sign in / signup
Query-frontend/src/pages/AuthPage.tsx - Route and state shell
Query-frontend/src/App.tsx - Source connection UI
Query-frontend/src/components/dashboard/DatabaseConnectionModal.tsx - Chat dashboard
Query-frontend/src/pages/DashboardPage.tsx - Chat and results UI
Query-frontend/src/components/dashboard/ChatWindow.tsx - Tables and charts
Query-frontend/src/components/dashboard/EnhancedDataTableV2.tsx - Custom dashboards
Query-frontend/src/pages/Customdashboard.tsx - API client
Query-frontend/src/services/api.ts
FastAPI services
- HTTP API and orchestration
backend/backend.py - Authentication and OTP
backend/backend.py - Source sessions and metadata
backend/backend.py
Query execution
- SQL prompt rules
backend/sql_system_prompt.py - LLM SQL generation
backend/backend.py - Read-only SQL execution
backend/backend.py
Persistence
- Favorites, history, settings
backend/extended_models.py - Saved dashboards
backend/backend.py
Other components
- User
- User data sources
- Ollama / Groq
- Internal database
- Email delivery
Connections 23
- User → Route and state shell: uses
README.md - Route and state shell → Sign in / signup: routes to
Query-frontend/src/App.tsx - Route and state shell → Chat dashboard: routes to
Query-frontend/src/App.tsx - Route and state shell → Custom dashboards: routes to
Query-frontend/src/App.tsx - Sign in / signup → API client: authenticates via
README.md - Chat dashboard → Source connection UI: opens connection
Query-frontend/src/pages/DashboardPage.tsx - Chat dashboard → Chat and results UI: renders
Query-frontend/src/pages/DashboardPage.tsx - Chat dashboard → API client: confirms SQL via
Query-frontend/src/pages/DashboardPage.tsx - Chat and results UI → Tables and charts: presents results
- Custom dashboards → API client: loads and saves via
README.md - API client → HTTP API and orchestration: calls REST API
README.md - HTTP API and orchestration → Authentication and OTP: handles authentication
README.md - HTTP API and orchestration → Source sessions and metadata: manages connections
README.md - HTTP API and orchestration → LLM SQL generation: orchestrates chat
README.md - HTTP API and orchestration → Read-only SQL execution: executes validated SQL
README.md - HTTP API and orchestration → Favorites, history, settings: persists user features
README.md - HTTP API and orchestration → Saved dashboards: persists dashboards
README.md - HTTP API and orchestration → Internal database: stores application data
README.md - Authentication and OTP → Email delivery: sends signup OTP
README.md - Source sessions and metadata → User data sources: connects to
README.md - LLM SQL generation → SQL prompt rules: uses rules
backend/backend.py - LLM SQL generation → Ollama / Groq: requests SQL
README.md - Read-only SQL execution → User data sources: queries
README.md