Case study · AI analytics SaaS
AskBase AI
Natural-language analytics for business databases
- UI
- APIMy work
- NL-to-SQL engineMy work
- DatabasesSQLNoSQL
Overview
AskBase AI lets a business ask questions about its own data in plain English. Clients connect a MySQL, PostgreSQL, MongoDB or Firestore database; each question is turned into a query by a locally hosted qwen2.5-coder model via Ollama, validated with sqlglot, run read-only, and answered through a conversational interface. The frontend is a Next.js 15 app with Recharts dashboards and a Three.js 3D chart view; the backend is a Python FastAPI service backed by the askbase NL→query engine.
What I did
- Developed the full frontend in Next.js 15 (Turbopack) with React 19 and TypeScript, using Tailwind CSS for styling, Recharts for charts, Framer Motion for animation, and Three.js / React Three Fiber for a 3D chart view.
- Built the Python FastAPI backend and the natural-language-to-SQL pipeline using the askbase package, SQLAlchemy (async), sqlglot for SQL parsing and validation, and slowapi for rate limiting.
- Integrated locally hosted open-source models through Ollama (qwen2.5-coder for SQL generation and qwen2.5 instruct for chat), with multi-tenant isolation, read-only query execution and caching.
- Wired up connections to MySQL/MariaDB, PostgreSQL, MongoDB (Motor) and Google Cloud Firestore, and packaged the whole system with Docker Compose for easy deployment.
Key features
- Natural-language questions answered from live business databases
- Connects to MySQL/MariaDB, PostgreSQL, MongoDB (Motor) and Google Cloud Firestore
- Queries generated by qwen2.5-coder (SQL) and qwen2.5 instruct (chat) via Ollama
- sqlglot validates and rewrites generated SQL before execution
- Read-only query execution with rate limiting (slowapi) and result caching
- Recharts dashboards, Framer Motion animations, and a Three.js 3D chart view
- Docker Compose deployment for API, UI and a demo MySQL database