Framework guides

Use Da8a with React (Vite)

Da8a works with the official @supabase/supabase-js client, so a React app talks to its own dedicated Postgres with the same code you’d write for Supabase.

Before you start

  • A Da8a project (the Overview page shows the project URL and anon key)
  • A table to query; the quickstart creates a todos table with Row Level Security

Install the client

shell
$ npm i @supabase/supabase-js

Create the client

src/supabase.ts
import { createClient } from '@supabase/supabase-js'
export const supabase = createClient(
  import.meta.env.VITE_SUPABASE_URL,
  import.meta.env.VITE_SUPABASE_ANON_KEY,
)

The anon key is safe in client code as long as Row Level Security is on for your tables. Never ship the service key to the browser: it bypasses RLS.

Query from a component

src/Todos.tsx
const [todos, setTodos] = useState([])
useEffect(() => {
  supabase.from('todos').select('id, title, done')
    .then(({ data }) => setTodos(data ?? []))
}, [])

Sign in

src/auth.ts
await supabase.auth.signInWithOtp({ email })
supabase.auth.onAuthStateChange((event, session) => {
  // update your app state
})

Host it

Deploy the frontend on Chapong and link it to the project: the URL, anon key and auth redirect URLs are kept in sync for you, including on preview deploys.

Questions

Do I need a Da8a SDK?

No. Use @supabase/supabase-js; there’s no fork or plugin.

Where do I find the URL and key?

On your project’s Overview page.

Updated 2026-10-23.