QueryLens — Conversational Data Analytics

A conversational analytics workspace for CSV, SQLite, and PostgreSQL data, with inspectable SQL, query evidence, and downloadable written reports.

AI AgentsNext.jsFastAPIPostgreSQLText-to-SQLDocker
QueryLens — Conversational Data Analytics cover

Inside the Platform

Screenshots from the running application. Open any image to inspect it at full size.

QueryLens sample workspace showing a sales question, calculated results, and SQL evidence
The public demo calculates preset answers from a local sample dataset and exposes the supporting SQL. It runs without sign-in or model inference.
QueryLens Arabic landing page with right-to-left navigation and a localized analytics demo
English and Arabic interfaces share the same workflow, with right-to-left layout and localized copy for Arabic.

Timeline

Evolved from Chat OLAP into QueryLens, with the conversational workspace and public project presentation updated in October 2026.

Role & Scope

Built the Next.js interface, FastAPI backend, PostgreSQL source catalog, CSV and SQLite imports, conversational tool agent, SQL validation, and report and evidence downloads.

Team Setup

A portfolio project bringing frontend, backend, data modeling, and agent tooling together in one repository.

Context

Problem: Exploring unfamiliar tables takes SQL knowledge, while a fluent AI answer alone does not show which data or queries support its claims.

Solution: Built a source-aware analyst that inspects schemas, samples tables, executes guarded read-only SQL, and answers from observed results. Users can import datasets, select tables, follow tool activity, and request written analysis.

Impact: Brings data import, schema exploration, saved conversations, SQL inspection, and evidence-backed reporting into one English and Arabic workspace.

Implementation Details

Architecture

Next.js proxies same-origin requests to FastAPI and keeps authentication in an HTTP-only cookie. PostgreSQL persists sources, semantic cubes, and conversations. The tool agent inspects selected tables, samples rows, executes SELECT queries, and produces answers or reports linked to successful query evidence.

Data & Evaluation

The repository includes tests for imports, semantic modeling, query compilation, conversational history, SQL scope, narrative evidence references, and provider failures. The public demo calculates preset results locally; it does not demonstrate live model inference. Analytical claims still need review against the displayed results and limitations.

Production & Ops

Docker Compose packages PostgreSQL, migrations, FastAPI, and Next.js. SQL is parsed and checked against selected tables and allowed functions, then executed in read-only transactions with timeouts and bounded results. Imports have size and row limits, while source ownership scopes access to uploaded data.

Lessons Learned

Schema context, table scope, and observable query results make conversational analytics easier to inspect. Keeping tool evidence with saved conversations supports follow-up questions and report rewriting without losing the supporting queries.

Links

Last verified: October 18, 2026

RepositoryOpen Source

Public Evidence

Last verified: October 18, 2026

Jurai Assurance — AI Flight Claim AssessmentBART-MNLI CNN News Zero-Shot Classifier