Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ QueryMindAI is an open-source AI data workspace that lets users connect a read-o

QueryMindAI is an early production-minded release. Implemented today: encrypted saved PostgreSQL connections, public-host SSRF checks, SSL connections, catalog snapshots, structured SQL generation, explicit approval drafts, parser/table validation, read-only execution, verified examples, history, audit events, Docker Compose, and Render configuration. Signed anonymous workspace sessions provide ownership isolation for the public demo; account login and enterprise identity integration remain roadmap work.

## Screenshots
## Product workflow

![AI Query Assistant placeholder](docs/screenshots/ai-query-assistant-placeholder.svg)
The web app contains only three API-backed workspaces:

1. **Connections** — test and save an encrypted, read-only PostgreSQL connection; inspect and refresh its live schema catalog.
2. **Query** — ask a business question, generate structured SQL, and review the SQL, explanation, assumptions, and warnings before explicitly running it.
3. **History** — review real approved executions and their metadata. Query result rows are not persisted.

No dashboard metrics, schemas, connections, query results, or history records are fabricated in the UI.

## Core capabilities and differentiators

Expand Down Expand Up @@ -49,7 +55,7 @@ FastAPI, SQLAlchemy, Alembic, PostgreSQL, sqlglot, OpenAI-compatible provider AP
```text
apps/api FastAPI service, migrations, scripts, tests
apps/web Next.js application
docs Architecture, deployment, and security guidance
docs Architecture, local setup, deployment, and security guidance
evaluations Small deterministic dataset and runner
scripts Operator helpers
.github CI and issue templates
Expand Down Expand Up @@ -80,6 +86,8 @@ npm run dev

Open `http://localhost:4028`.

For secret generation, read-only role SQL, local-database connectivity, and troubleshooting, follow the complete [local open-source setup guide](docs/local-development.md).

## Docker quickstart

The default stack runs PostgreSQL, API, and web. Because no LLM is bundled by default, configure a reachable remote provider or use the Ollama profile.
Expand Down
16 changes: 13 additions & 3 deletions apps/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

Next.js 15, React 19, TypeScript, and Tailwind UI for QueryMindAI.

## Architecture and implemented pages
## Product routes

`src/app` contains routes, `src/lib/api.ts` is the typed authenticated fetch boundary, and `src/types` contains contracts. Data Connections creates/tests/deletes encrypted PostgreSQL connections; Schema Explorer renders normalized live catalog snapshots; AI Query Workspace separates generation from explicit execution; Query History lists approved executions without stored rows. The client stores a signed anonymous workspace token in browser local storage; this is ownership isolation, not account login.
The frontend intentionally has three product routes:

- `/connections` creates, tests, lists, refreshes, and deletes encrypted PostgreSQL connections. Its expandable Schema Catalog renders live introspection data.
- `/query` generates validated SQL and requires a separate **Run query** approval before execution. It renders real results and can save a successful execution as a verified example.
- `/history` lists real approved executions and their metadata. Result rows are not persisted.

Old generated dashboard, login, browser, editor, and history URLs redirect to these routes. There are no fake metrics, login forms, connection records, schemas, results, or history entries.

`src/features` owns workflow UI, `src/lib/api.ts` is the typed authenticated fetch boundary, and `src/types` contains API contracts. The client stores a signed anonymous workspace token in browser local storage; this is ownership isolation, not account login.

## Configuration and API integration

Expand All @@ -29,4 +37,6 @@ The multi-stage Dockerfile builds a standalone, non-root image. Pass `NEXT_PUBLI

## UI conventions

Use AI Query Assistant, Generated SQL, Verified Example, Schema Explorer, Query History, and Data Connections. Label every non-API data source `Demo data` or `Coming soon`; never describe stored examples as model training.
Use Connections, AI Query Assistant, Generated SQL, Verified Example, Schema Catalog, and Query History. Product data must come from the API. Do not add sample metrics or fabricated operational records. Never describe stored examples as model training.

For the complete repository setup, database role, local-database caveat, and troubleshooting steps, read [Run QueryMindAI locally](../../docs/local-development.md).
22 changes: 0 additions & 22 deletions apps/web/image-hosts.config.mjs

This file was deleted.

12 changes: 8 additions & 4 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { imageHosts } from './image-hosts.config.mjs';

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
images: { remotePatterns: imageHosts },
async redirects() {
return [{ source: '/', destination: '/sql-editor-and-ai-assistant', permanent: false }];
return [
{ source: '/', destination: '/connections', permanent: false },
{ source: '/dashboard-and-connection', destination: '/connections', permanent: true },
{ source: '/database-browser', destination: '/connections', permanent: true },
{ source: '/sql-editor-and-ai-assistant', destination: '/query', permanent: true },
{ source: '/query-history', destination: '/history', permanent: true },
{ source: '/homepage-login', destination: '/connections', permanent: true },
];
},
};

Expand Down
Loading
Loading