Skip to content

Documentation

Quickstart

Create a project, get its URL and keys, and read and write a table with supabase-js. About five minutes.

1. Create a project

  1. Sign up at /signup.
  2. Create an organization if asked, then choose New project.
  3. Give it a name and wait a few seconds while the database is created.

2. Find the URL and keys

Open your project in the dashboard: its Overview page shows them under Connect (they are also under Settings → Keys). You will find:

  • Project URL: the address of your project's API.
  • anon key: public, used in your app.
  • service_role key: secret, server only. It skips Row Level Security.

Keep the service_role key out of the browser

Never ship it in front-end code or commit it. If it leaks, rotate the JWT secret in the project settings; both keys are replaced.

3. Install the client

Vulcbase uses the official @supabase/supabase-js client. There is no separate SDK to learn.

npm install @supabase/supabase-js
lib/vulcbase.ts
import { createClient } from "@supabase/supabase-js"; export const vulcbase = createClient(  process.env.NEXT_PUBLIC_VULCBASE_URL!,      // your Project URL  process.env.NEXT_PUBLIC_VULCBASE_ANON_KEY!, // your anon key);
.env.local
NEXT_PUBLIC_VULCBASE_URL=https://<your-project-url>NEXT_PUBLIC_VULCBASE_ANON_KEY=<your-anon-key>

4. Create a table

Open the SQL editor and run this. It creates a table, turns on Row Level Security and lets each signed-in user manage only their own rows.

SQL editor
create table todos (  id bigint generated always as identity primary key,  user_id uuid not null default auth.uid() references auth.users (id),  title text not null,  done boolean not null default false,  created_at timestamptz not null default now()); alter table todos enable row level security; create policy "own todos" on todos  for all to authenticated  using (auth.uid() = user_id)  with check (auth.uid() = user_id);

You can also create tables in the Table editor and add policies from the Policies page.

5. Sign in, write, read

app.ts
// create the user and sign inawait vulcbase.auth.signUp({ email: "ana@example.com", password: "a-long-password" });await vulcbase.auth.signInWithPassword({ email: "ana@example.com", password: "a-long-password" }); // writeawait vulcbase.from("todos").insert({ title: "Ship it" }); // read, filter, orderconst { data, error } = await vulcbase  .from("todos")  .select("id, title, done")  .eq("done", false)  .order("created_at", { ascending: false })  .limit(20);
If your project requires email confirmation, the new user must confirm first. For development you can turn this off in the project's auth settings. Configure SMTP there to send real emails.

6. Listen for changes

Add the table to the realtime publication from the table editor or the Realtime page, then subscribe:

vulcbase  .channel("todos")  .on("postgres_changes", { event: "*", schema: "public", table: "todos" }, (payload) => {    console.log(payload.eventType, payload.new);  })  .subscribe();

Next steps

  • Coming from Supabase? Use the importer instead of recreating things by hand.
  • Read about auth, storage and realtime.
  • Set up SMTP in the auth settings so confirmation emails and magic links reach real inboxes.