#3232nd of 34 in RAG and searchFor data and documents, data analysis
natural-language-postgres
Next.js text-to-SQL over Postgres with auto-picked charts
- Stars
- 333
- License
- Apache-2.0
- Last commit
- Apr 2026
- Language
- TypeScript
300 on 28 Mar 2026333 on 21 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Vercel is hiring: 86 open roles
Overview
A Next.js app where the AI SDK and GPT-4o turn a plain-English question into SQL, run it against Postgres, show the rows, pick a chart type and render it with Recharts, and explain the query on request. It ships with a seed script for a unicorn-companies CSV you download yourself; there is no auth and no history. For developers who want a text-to-SQL and charting pattern to copy.
Who it is for: Developers copying a text-to-SQL and charting pattern
Strengths
- Shows the full loop: generate SQL, execute, explain, chart config, render
- Deployed demo on Vercel
- Two secrets to run: OPENAI_API_KEY and a Postgres URL
Weaknesses
- Single hardcoded dataset; the schema prompt must be rewritten for your tables
- OpenAI GPT-4o only
- No auth, tests or history
- Dataset CSV must be fetched manually from CB Insights
What it needs
- TypeScript, openai, ai-sdk
- Needs postgres, openai-api-key
- env example file
Also in RAG and search
See all 34| Rank | Project | Score |
|---|---|---|
| #29 | nextjs-openai-doc-searchBuild-time embeddings of your MDX docs into Supabase pgvector | 30 out of 100 |
| #30 | azure-search-openai-demo-csharp.NET RAG chat sample over your documents with Azure OpenAI and AI Search | 30 out of 100 |
| #31 | lightningragGo and Vue RAG platform with knowledge bases, agent canvas and admin UI | 22 out of 100 |
| #33 | vectordbC++ vector database with REST API and Python, JavaScript and Ruby clients | 7 out of 100 |
| #34 | openai-support-agent-demoSupport console where the model drafts and a human approves | 2 out of 100 |