Supabase Managed Postgres
Managed PostgreSQL database with Supabase Auth, Storage, and Realtime integrations.
Supabase provides an enterprise PostgreSQL database coupled with authentication, file storage, and realtime subscriptions.
Capabilities
- Auth Integration: Google, GitHub, and email/password authentication flows.
- Row Level Security (RLS): Enforce access control rules at the database level.
- Storage Buckets: Upload and serve images, user media, and documents.
TYPESCRIPT
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;
}