Back to projects
App · NL → SQL2026

SQL Copilot

Ask in plain language, get transparent SQL and results.

SQL Copilot — Ask in plain language, get transparent SQL and results.

The problem

Non-technical users can't query a database, and 'just trust the AI' tools hide the SQL they run — so you can never check what actually hit your data.

The solution

A web app that translates a natural-language question into PostgreSQL via a local Ollama model, runs it against Supabase, and always shows the generated SQL alongside the result table.

What it does

  • Natural-language question → PostgreSQL
  • Generated SQL always shown transparently
  • Local Ollama model — no data leaves for a hosted LLM
  • Full schema introspection feeds the prompt
  • Minimal-API C# backend, static frontend (no CORS)

How it works

  1. 1

    Introspect

    The backend reads the full DB schema — columns and foreign keys — via Npgsql.

  2. 2

    Translate

    Schema + question form a prompt to a local Ollama model, instructed to return valid PostgreSQL only.

  3. 3

    Run & show

    The SQL is executed against Supabase; the app always displays the generated SQL, then animates the result table.

Architecture

Click a node to see what it does.

Tech stack

  • ASP.NET Core 8
  • C#
  • Npgsql
  • Ollama
  • Supabase