Examples
Learn by example
Each example pairs the React and Next.js code with a rendered sample of what it produces, plus the SQL and policies. They are illustrative snippets, not full repositories.
Todo app with RLS
A per-user todo list where Row Level Security keeps every user to their own rows.
Data APIAuthRLSNext.js
Magic-link sign-in
Passwordless sign-in: email a link, exchange the code for a session, share it with the server.
AuthNext.js
Multi-tenant SaaS starter
Tenants, membership and switching, with a restrictive RLS guard on every tenant table.
TenantsAuthRLSNext.js
File upload with Storage
Private per-user files: upload, list, sign a URL and delete, guarded by storage policies.
StorageRLSNext.js
Realtime chat
Room messages pushed over Postgres changes, with presence and a typing broadcast.
RealtimeData APIRLSNext.js