Guide
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/supabase | Nuxt PostgREST |
|---|---|
useSupabaseClient() | usePostgrest() |
serverSupabaseClient(event) | usePostgrestUser(event) |
serverSupabaseServiceRole(event) | usePostgrestAdmin() |
supabase.from('x') | postgrest.from('x') (identical API) |
| Supabase Auth | Your auth, e.g. nuxt-auth-utils. See Authentication |
| Storage, Realtime | Not included |
Your existing database.types.ts works as is — put it at shared/types/database.types.ts, the path the module reads by default.