Skip to content
Skip to content
Goodspeed

Build apps with Supabase

Supabase is the backend every Goodspeed app runs on: PostgreSQL, PKCE auth with ExpoSecureStore, per-table RLS policies, and Edge Functions. Goodspeed generates Supabase as a standard part of every app, so the output is a working codebase from day one, not a scaffold you have to finish yourself.

WHAT GETS GENERATED

Built into every Supabase build

Every app Goodspeed generates with Supabase includes these production-ready patterns, wired together from the first build.

ItemDescriptionStrength
lib/supabase.ts with PKCE + ExpoSecureStoreA platform-split Supabase client: native uses ExpoSecureStore for token persistence; web uses localStorage. Both degrade gracefully when storage is unavailable.Auth
supabase/migrations/ with per-app RLSGenerated migration files create the app's tables and attach row-level security policies that enforce tenant isolation without application-layer guards.Database
supabase/functions/ Edge FunctionsWebhook handlers, scheduled jobs, and third-party API calls live in Edge Functions rather than client code, keeping secrets server-side.Serverless
lib/offline.ts offline write queueWhen the device is offline, lib/offline.ts enqueues Supabase writes in AsyncStorage and replays them on reconnect, in order, without duplicates.Reliability
Real-time subscriptions for live dataSupabase Realtime channels are wired in services/realtime.ts for features that need live updates (chat, collaborative lists, live leaderboards).Real-time
Storage for file and image uploadslib/media.ts uses Supabase Storage for profile photos, user-generated content, and app assets, with RLS policies applied at the bucket level.Storage

Source: gas-template repository · Backend and Database

REAL GENERATED CODE

A snippet from a Supabase app the studio shipped

This pattern comes directly from the gas-template codebase, the foundation every Goodspeed app is generated on. The studio generates Supabase code like this for every app in the pipeline, not just a hello-world scaffold.

  1. PKCE client init

    // lib/supabase.ts: PKCE auth + platform-split storage
    const supabaseUrl =
      gasConfig.backend.supabase.url || 'https://placeholder.supabase.co';
    const supabaseAnonKey =
      gasConfig.backend.supabase.anonKey || 'public-anon-key-placeholder';
    
    export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
      auth: {
        storage: Platform.OS === 'web'
          ? WebStorageAdapter
          : ExpoSecureStoreAdapter,
        autoRefreshToken: true,
        persistSession: true,
        flowType: 'pkce',
      },
    });
GDaily Allergens

Today's log

Gluten
Tree nuts
Shellfish
Dairy
HomeScanLogProfile

START WITH SUPABASE

Your Supabase app, generated