varunmundas-de-stack/convAI-nl2sql — reverse-engineered prompt
Reverse engineered prompt
Build me a CPG sales analytics app where a sales manager can log in, type plain English questions like “show top SKUs by net sales in North Zone for the last 30 days”, and get back the right data, a short AI explanation, and a suggested chart.
I want a clean web UI with a chat style query page, a dashboard with KPI cards and zone performance, and an insights page that shows automatic trend or anomaly alerts. The backend should translate questions into safe structured analytics queries against a PostgreSQL sales warehouse through Cube.js, respect each user’s role and territory, and ask a clarifying question if the request is missing details.
Please include authentication, chat history, feedback on answers, seeded demo sales data, and a CSV drop folder that can ingest new primary or secondary sales files. Use the stack already implied here, Next.js, FastAPI, PostgreSQL, Redis, Cube.js, Docker Compose, and Claude for the language parts. Look up current docs online if needed.
Want more depth? Deep Reverse