← all repositories
supabase-community/chatgpt-your-files

A RAG workshop that actually ships: pgvector in 2 hours

Supabase's community repo teaches you to build a document-chat MVP with real security, not just another toy demo.

516 stars TypeScript RAG · SearchChat Assistants
chatgpt-your-files
Velocity · 7d
+0.5
★ / day
Trend
steady
star history

What it does

This is a guided workshop, not a framework. You build a full-stack RAG app—upload documents, chunk them by markdown heading, generate embeddings with pgvector, and chat via OpenAI—using Supabase’s Postgres stack. The output is a Next.js frontend, REST API, and row-level security policies that keep users out of each other’s files.

The interesting bit

Most RAG tutorials stop at “it works on my laptop.” This one forces you through production mechanics: SQL migrations, RLS policies with UUID path validation, and a git-tag checkpoint system so you can recover when you break things. The security model is baked in, not bolted on.

Key highlights

  • Document chunking splits by markdown headings for semantically coherent retrieval chunks
  • Storage RLS policies validate UUIDs in file paths via a custom uuid_or_null() Postgres function
  • Uses Supabase Edge Functions (Deno) with import maps for OpenAI and AI SDK dependencies
  • Includes 3 sample Roman Empire markdown files for testing—because why not
  • Workshop recorded as a 2-hour YouTube video with presenter-led checkpoints

Caveats

  • Requires Unix-based OS or WSL2; Windows native is unsupported
  • README truncates mid-sentence during the documents table setup, so some later steps may need inference or video reference
  • Explicitly pinned to Supabase CLI v1.102.0 and Node 18+, which may drift

Verdict

Worth it if you’re a backend-curious frontend dev who wants to understand how RAG actually gets deployed, not just how LangChain works. Skip if you already run pgvector in production and have strong opinions about chunking strategies.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.