scribase
Guide

Connect your existing client to Scribase

Scribase keeps its data plane wire-compatible with the client SDK your app already uses, so an existing app moves over by changing the project URL and keys — not by rewriting code. This guide walks through pointing the client at Scribase and confirming auth, data, and realtime still work.

Published September 23, 20264 min read

1.Set the project URL and anon key

Copy the project URL and anon (publishable) key from the Scribase console and put them in your environment. These replace your current values; the variable names your app already uses can stay the same.

bash
# .env — swap the two values; keep the names your app already uses
SCRIBASE_URL=<environment URL from the console>
SCRIBASE_ANON_KEY=sb_publishable_…

2.Create the client as usual

The client constructor does not change. It reads the URL and key from the environment, so the same code that talked to your old backend now talks to Scribase.

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

export const client = createClient(
  process.env.SCRIBASE_URL!,
  process.env.SCRIBASE_ANON_KEY!,
)

3.Verify auth, data, and realtime

Run a signed-in query and open a realtime subscription. Both use the same /auth, /rest, and /realtime paths that are contract-tested for compatibility, so a green result confirms the swap worked.

ts
const { data, error } = await client
  .from('todos')
  .select('id, title')

client.channel('todos')
  .on('postgres_changes',
     { event: '*', schema: 'public', table: 'todos' },
     (payload) => console.log(payload))
  .subscribe()
FAQ

Common questions

Do I need to change my client code?

No. Only the URL and key change. The /auth, /rest, /realtime, /storage, and /functions/v1 paths are contract-tested for compatibility, so the client code stays the same.

Do my existing CLI scripts work too?

Yes. Point them at the Scribase URL and keys the same way — they use the same data-plane paths as the client SDK.

Ready to try it?

Start a free project and follow this guide against a real backend, or move an existing project in with a dry run first.