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/supabase | Nuxt PostgREST |
|---|---|
useSupabaseClient() | usePostgrest() |
serverSupabaseClient(event) | usePostgrestUser(event) |
serverSupabaseServiceRole(event) | usePostgrestAdmin() |
supabase.from('x') | client.from('x') (identical API) |
| Supabase Auth | Any auth library, then mintJwt() + setPostgrestToken(). 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.