Supabase Managed Postgres
Enterprise Postgres with auth, storage buckets, and realtime subscriptions.
Supabase provides a managed PostgreSQL database alongside authentication, file storage, and realtime subscriptions.
Capabilities
- Auth integration: Google, GitHub, and email/password flows.
- Row Level Security: enforce access rules at the database level.
- Storage buckets: upload and serve images, media, and documents.
import { createClient } from "@supabase/supabase-js";
export const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
);
export async function fetchOrders() {
const { data, error } = await supabase
.from("orders")
.select("*, items(*)")
.order("created_at", { ascending: false });
if (error) throw error;
return data;
}Enable RLS on every table
Client-side queries run with the anon key. A table without Row Level Security is readable by anyone with that key.
Provision it from the Supabase connector.
Was this page helpful?