Playbooks

Coming from Supabase

Map @nuxtjs/supabase patterns to Nuxt PostgREST.

Both modules use the same postgrest-js query builder and the same generated types, so queries move over unchanged. What differs is everything around the database.

@nuxtjs/supabaseNuxt PostgREST
useSupabaseClient()usePostgrest()
serverSupabaseClient(event)usePostgrestUser(event)
serverSupabaseServiceRole(event)usePostgrestAdmin()
supabase.from('x')client.from('x') (identical API)
Supabase AuthAny auth library, then mintJwt() + setPostgrestToken(). See Authentication
Storage, RealtimeNot included

Your existing database.types.ts works as is. Put it at shared/types/database.types.ts, the path the module reads by default.

Copyright © 2026