superapp
BackendDatabases

Supabase

Connect to Supabase Postgres.

Chat in Claude

Connect to Supabase Postgres using the Supabase client SDK.

import { createEngine } from '@superapp/backend'
import { supabaseProvider } from '@superapp/backend/databases/supabase'

const engine = createEngine({
  providers: [supabaseProvider],
  connections: {
    main: {
      type: 'supabase',
      url: process.env.SUPABASE_URL!,
      serviceRoleKey: process.env.SUPABASE_SERVICE_ROLE_KEY!,
    },
  },
})

Install

npm install @supabase/supabase-js

Connection Options

OptionTypeDescription
urlstringSupabase project URL
serviceRoleKeystringService role key (bypasses RLS)
anonKeystringAnon key (respects RLS)

Use serviceRoleKey for backend access. The anon key enforces Row-Level Security and is intended for client-side use.

On this page