Oxbit Logo
ENGINEERING

Why We Switched to Supabase from Firebase

Ejaz Shaikh
Ejaz ShaikhFeb 18, 20256 min read
Why We Switched to Supabase from Firebase

Supabase is an open-source Firebase alternative built on PostgreSQL. After hitting scaling limits with Firestore, we decided to make the switch.

What We Gained

  • Full SQL support with joins, views, and functions
  • Row-level security out of the box
  • Real-time subscriptions via PostgreSQL triggers
  • Auto-generated REST and GraphQL APIs
  • Migration

    TS
    // Firebase
    const doc = await getDoc(doc(db, 'users', uid))
    
    // Supabase
    const { data } = await supabase
      .from('users')
      .select('*')
      .eq('id', uid)
      .single()

    The migration took two weeks and we have not looked back since.