Supabase | Sheetly Cheat Sheet

Last Updated: November 21, 2025

Supabase

Open-source Firebase alternative

Core Features

Item Description
PostgreSQL Full Postgres database
Authentication Built-in auth with RLS
Storage S3-compatible file storage
Edge Functions Serverless Deno functions
Real-time PostgreSQL change subscriptions
REST API Auto-generated from schema

Usage Example

import { createClient } from '@supabase/supabase-js'

const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)

// Insert data
const { data, error } = await supabase
  .from('users')
  .insert([
    { name: 'John', email: 'john@example.com' }
  ])

// Query data
const { data: users } = await supabase
  .from('users')
  .select('*')
  .eq('status', 'active')
  .order('created_at', { ascending: false })

// Real-time subscription
const channel = supabase
  .channel('users')
  .on('postgres_changes',
    { event: '*', schema: 'public', table: 'users' },
    (payload) => console.log(payload)
  )
  .subscribe()

Row Level Security

Item Description
Policy SQL-based access rules
auth.uid() Get current user ID
Enable RLS Protect all rows by default
Insert Policy Control who can insert
Select Policy Control who can read

Best Practices

  • Always enable Row Level Security
  • Use generated TypeScript types
  • Leverage real-time subscriptions
  • Use edge functions for complex logic

💡 Pro Tips

Quick Reference

Supabase is built on PostgreSQL with full SQL support

← Back to Databases & APIs | Browse all categories | View all cheat sheets