PostgreSQL database
Authentication (auto handle password hashing, token issue, session management, oauth flow)
Realtime subscriptions
supabase
.channel('posts')
.on('postgres_changes', { event: '*', schema: 'public', table: 'posts' }, handler)
.subscribe()
Storage (files)
supabase.storage
.from('avatars')
.upload('user.png', file)
Edge Functions
// for client components, uses anon public key, RLS is always enforced
// for server components, can bypass rls, use own auth rule code
create policy "Users can read own profile"
on profiles
for select
using (auth.uid() = id);
User logs in
↓
Supabase Auth
↓
JWT issued
↓
JWT sent with every request