How soumyaatanna/querychat works
QueryChat AI is a natural-language database query application. Users connect a SQLite or MySQL database (or try the demo), ask questions in chat, and receive executed SQL results, explanations, and visualizations. The React app routes users among connection, upload, analytics, settings, and chat screens; its API requests reach FastAPI, which coordinates SQL generation, database execution, and supporting database operations. The README describes additional chart, table, and upload capabilities; source excerpts show only part of their implementation, so those details are represented at the product-component level.
Main entry points: App.jsx App coordinator · main.py FastAPI endpoints · database.py Connection and query manager · gemini_service.py SQL generation and insights
Components 15
React interface
- App coordinator
frontend/src/App.jsx - Demo and landing
frontend/src/components/LandingPage.jsx - Navigation and theme
frontend/src/components/Sidebar.jsx - Connection screen
frontend/src/components/ConnectionScreen.jsx - Chat and results
frontend/src/components/ChatArea.jsx - Data upload screen
frontend/src/components/UploadScreen.jsx - Analytics screen
frontend/src/components/AnalyticsScreen.jsx - Settings screen
frontend/src/components/SettingsScreen.jsx
API and query services
- FastAPI endpoints
backend/main.py - SQL generation and insights
backend/gemini_service.py
Database management
- Connection and query manager
backend/database.py
External systems
- Connected database
- Google Gemini
- Seeded SQLite demo
Other components
- User
Connections 23
- User → Demo and landing: starts demo
frontend/src/components/LandingPage.jsx - User → App coordinator: uses application
README.md - App coordinator → Demo and landing: renders
frontend/src/App.jsx - App coordinator → Navigation and theme: renders
frontend/src/App.jsx - App coordinator → Connection screen: renders
frontend/src/App.jsx - App coordinator → Chat and results: renders
frontend/src/App.jsx - App coordinator → Data upload screen: renders
frontend/src/App.jsx - App coordinator → Analytics screen: renders
frontend/src/App.jsx - App coordinator → Settings screen: renders
frontend/src/App.jsx - App coordinator → FastAPI endpoints: requests connect and chat
frontend/src/App.jsx - Connection screen → FastAPI endpoints: connects database
README.md - Chat and results → App coordinator: sends questions
frontend/src/App.jsx - Data upload screen → FastAPI endpoints: uploads files
README.md - Analytics screen → FastAPI endpoints: requests telemetry
README.md - FastAPI endpoints → SQL generation and insights: generates SQL
backend/main.py - FastAPI endpoints → Connection and query manager: executes and manages queries
backend/main.py - FastAPI endpoints → Connection and query manager: reads analytics and tables
backend/main.py - FastAPI endpoints → Connection and query manager: loads tabular uploads
README.md - SQL generation and insights → Google Gemini: generates SQL and summaries
README.md - SQL generation and insights → SQL generation and insights: falls back to heuristics
backend/gemini_service.py - Connection and query manager → Connected database: connects and queries
backend/database.py - Connection and query manager → Seeded SQLite demo: seeds demo data
backend/database.py - App coordinator → Seeded SQLite demo: tries demo via API
frontend/src/App.jsx