Skip to content

Commit e03ba96

Browse files
feat: add demo database seeding for end-to-end exploration
Add a comprehensive demo seeding system that gives new users a ready-to-explore e-commerce database with: - demo_shop database: 100 products, 500 customers, 5000+ orders with realistic data patterns including intentionally suboptimal queries for recommendations - Pre-configured index recommendations and slow query analysis - Sample saved queries in the SQL Editor (revenue reports, analytics, examples) - Sample agent conversation history - Scoped demo users (analyst, developer, viewer) Usage: - Manual: ./scripts/self-host/seed-demo-data.sh - Auto during install: DEEPSQL_SEED_DEMO_DATA=1 ./scripts/self-host/install.sh Files added: - docker/postgres/init/10_create_demo_shop.sql: E-commerce schema + sample data - scripts/self-host/seed-demo-data.sh: Orchestration script for full seeding Files modified: - scripts/self-host/install.sh: Optional demo seeding integration - .env.example: Document new DEEPSQL_SEED_* environment variables - README.md: Document demo database and seed-demo-data.sh script Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
1 parent 051691f commit e03ba96

5 files changed

Lines changed: 1477 additions & 0 deletions

File tree

.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,15 @@ EMBEDDING_FAIL_OPEN=false
136136
#DEEPSQL_SKIP_AGENT_SETUP=0
137137
#DEEPSQL_SMOKE_AGENT=1
138138

139+
# ── Demo Data Seeding ───────────────────────────────────────────────────────
140+
# Seed a ready-to-explore demo database with sample e-commerce data, users,
141+
# saved queries, slow query history, and index recommendations.
142+
# Set to 1 to automatically run seed-demo-data.sh during install.
143+
# Can also be run manually: ./scripts/self-host/seed-demo-data.sh
144+
#DEEPSQL_SEED_DEMO_DATA=0
145+
#DEEPSQL_SEED_CONNECTION_NAME=Demo Shop (E-commerce)
146+
#DEEPSQL_SEED_SKIP_DEMO_DB=0
147+
139148
# ── The /api/llm/v1 agent gateway ───────────────────────────────────────────
140149
# The DeepSQL CLI agent (`@deepsql/mcp`) points its model at <backend>/api/llm/v1
141150
# and authenticates with a DeepSQL token; the backend forwards those calls

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,28 @@ your schema — all from one shared brain.
249249
```bash
250250
./scripts/self-host/status.sh # compose ps + health probes
251251
./scripts/self-host/smoke-test.sh # end-to-end check against the vault DB
252+
./scripts/self-host/seed-demo-data.sh # seed demo e-commerce database for exploration
252253
./scripts/self-host/uninstall.sh # stop and remove containers, keep data
253254
./scripts/self-host/uninstall.sh --purge-data # also drop the volumes
254255
```
255256

257+
### Demo Database
258+
259+
To explore DeepSQL features without connecting your own database, run:
260+
261+
```bash
262+
./scripts/self-host/seed-demo-data.sh
263+
```
264+
265+
This creates a **demo_shop** e-commerce database with:
266+
- 100 products, 500 customers, 5,000+ orders
267+
- Intentionally suboptimal query patterns (to trigger recommendations)
268+
- Pre-configured slow query analysis and index recommendations
269+
- Sample saved queries in the SQL Editor
270+
- Sample agent conversation history
271+
272+
Alternatively, set `DEEPSQL_SEED_DEMO_DATA=1` in `.env` before running `install.sh` to seed automatically.
273+
256274
Upgrading:
257275

258276
```bash

0 commit comments

Comments
 (0)