Supabase for AI apps: Postgres, pgvector, auth and storage, plus open-source alternatives NocoDB and Baserow in 2026
What Supabase provides
Supabase started in 2020 as an open-source alternative to Firebase, built on PostgreSQL instead of a proprietary document store. Each project includes:
| Component | What it does | Open-source base |
|---|---|---|
| Database | Full PostgreSQL with extensions, including pgvector | PostgreSQL |
| Auth | Email, magic links, OAuth, phone and SSO login | Supabase Auth (GoTrue fork) |
| Storage | Files with access rules, image transformations | Supabase Storage |
| APIs | REST from PostgREST and GraphQL from pg_graphql | PostgREST |
| Realtime | Subscribe to database changes and broadcast messages | Supabase Realtime (Elixir) |
| Edge Functions | Server-side TypeScript on Deno | Deno |
| Studio | Web dashboard, SQL editor and table editor | Supabase Studio |
Row Level Security, a Postgres feature, controls who can read and write each row. Because the browser talks to the database through Supabase's API, correct security policies are essential.
Which directory projects relate to it
| Project | Relationship |
|---|---|
| Supabase | The platform itself, open source and self-hostable |
| NocoDB | Open-source Airtable alternative that can sit on top of an existing Postgres database |
| Baserow | Open-source no-code database with AI fields, built on Django and Postgres |
Supabase is also the default backend for apps generated by Lovable and Bolt, and a common choice in Next.js AI starter templates.
Plans and pricing
| Plan | Price | Key limits |
|---|---|---|
| Free | $0 | 500 MB database, 50,000 MAU, 5 GB egress, 1 GB storage; pauses after 1 week inactive; 2 active projects |
| Pro | From $25/month | Larger included quotas, daily backups, no pausing; usage billed beyond quotas |
| Team | From $599/month | SSO for the dashboard, SOC 2 reports, longer log retention, priority support |
| Enterprise | Custom | Dedicated support, custom terms |
Compute is billed separately by instance size, and Pro and Team include a $10 monthly compute credit, which covers the smallest instance. Larger databases for heavy AI workloads, such as vector search over millions of rows, need bigger compute add-ons.
Changes in fall 2026
| Date | Change |
|---|---|
| September 25, 2026 | Logs began moving to usage-based pricing, with a grace period into early 2027 |
| October 1, 2026 | OrioleDB storage engine entered public beta on Free, Pro, Team and Enterprise |
If your app writes large volumes of logs through Supabase, for example detailed request logs from AI features, check the new log pricing before the grace period ends.
AI features
Vector search. Enable the vector extension, add a vector column, create an HNSW index, and query with a SQL function or through the client library. Supabase's docs include full RAG examples with OpenAI, Hugging Face and other embedding providers.
Automatic embeddings. Supabase documents a pattern using database triggers, queues and edge functions to generate embeddings whenever a row is inserted or updated, keeping vectors in sync with content without a separate pipeline.
Edge Functions for model calls. Server-side functions keep API keys out of the browser and can stream model responses. Edge Functions also include a built-in runtime for small embedding models.
AI assistant in Studio. The dashboard includes an assistant that writes SQL, explains queries, designs schemas and drafts Row Level Security policies.
MCP server. Supabase's official MCP server lets coding agents such as Claude Code and Cursor create tables, run queries and manage projects. Use it with a development project and read-only mode where possible; giving an agent write access to production data is risky.
Self-hosting Supabase
Self-hosting runs the same components in Docker. It is useful for data residency, air-gapped environments or avoiding usage fees, but it takes ongoing work:
- Change every default secret and the JWT keys before going live.
- Put the API gateway behind TLS and keep Postgres off the public internet.
- Set up backups yourself with
pg_dumpor WAL archiving. - Track releases of each component and test upgrades.
Platform features such as branching, managed point-in-time recovery and some dashboard tools are limited or missing when self-hosted.
Security pitfalls in AI-built apps
Apps generated by AI builders often reach production with Supabase tables that have Row Level Security disabled or policies that allow anyone to read everything. Security researchers have repeatedly found such apps exposing user data through the public anon key. Before launch:
- Enable Row Level Security on every table in exposed schemas.
- Write policies that check
auth.uid()against the row's owner. - Never expose the
service_rolekey to the browser. - Run Supabase's Security Advisor in the dashboard and fix its warnings.
Building a RAG feature on Supabase
A typical retrieval feature on Supabase uses four pieces. A documents table stores source files, uploaded to Supabase Storage. A chunks table holds text passages with a vector column and a foreign key to the document. An edge function or a background job splits each upload into chunks, calls an embedding model and inserts the vectors. A Postgres function takes a query embedding and returns the closest chunks, filtered by the current user through Row Level Security, so users only retrieve their own documents. Combining that vector query with Postgres full-text search gives hybrid retrieval, which handles exact terms such as product codes better than vectors alone. For a few hundred thousand chunks, this runs comfortably on a small Pro compute instance.
Supabase compared with alternatives
| Option | Strength |
|---|---|
| Supabase | Postgres plus auth, storage and APIs in one |
| Neon | Serverless Postgres with branching; database only |
| Firebase | Google's backend platform with a document database |
| Appwrite | Open-source backend platform with its own database layer |
| PocketBase | Single-file backend on SQLite for small apps |
| Convex | Reactive backend with TypeScript functions |
| PostgreSQL on your own server | Full control, more work |
NocoDB and Baserow
Some teams want a spreadsheet-like interface over data that AI workflows read and write, such as lead lists, content calendars or labeled evaluation datasets. NocoDB and Baserow fill that role. Both are self-hostable, offer REST APIs, and add AI features such as fields that fill themselves by running a prompt on each row. NocoDB can attach to an existing Postgres database, so a team can browse and edit a Supabase table in a grid view without writing SQL; check that it respects your access rules, since it connects with database credentials rather than Supabase's Row Level Security.
Related: PostgreSQL stack, Vercel stack, Next.js stack, MCP stack, Django stack, Stack index.
Frequently asked questions
Is Supabase good for AI apps?
Yes, for most small and medium apps. It provides auth, a Postgres database with pgvector for embeddings, file storage for uploaded documents, and edge functions for calling model APIs, all in one project. Very large vector collections or heavy GPU workloads need other services alongside it.
Why does my free Supabase project pause?
Free projects pause after one week without activity to save resources. You can restore a paused project from the dashboard. Upgrade to Pro if the project must stay online, for example for a production app or a demo you share.
What is OrioleDB?
OrioleDB is a new storage engine for PostgreSQL, developed by a team Supabase acquired, designed to reduce bloat and improve write performance by changing how Postgres stores row versions. It entered public beta on Supabase on October 1, 2026. Use it for testing, not yet for critical production data.
Can I self-host Supabase?
Yes. Supabase publishes a Docker Compose setup with the database, auth, storage, API gateway, realtime and Studio dashboard. Self-hosted Supabase lacks some platform features, such as managed backups, branching and certain dashboard functions, and you are responsible for updates and security.
What are NocoDB and Baserow, and how do they relate to Supabase?
They are open-source, spreadsheet-style database tools, alternatives to Airtable. Like Supabase they give teams a database with an interface and API, but they are aimed at non-developers building tables and views, while Supabase is a developer backend. NocoDB can connect to an existing Postgres database, including Supabase's.