Getting started
Quickstart
Create a project, grab the keys and run your first query in under 5 minutes.
Every HostBase project is a full Postgres database with a Supabase-compatible API: REST (PostgREST), Auth (GoTrue), Storage, Realtime and Edge Functions. If you know Supabase, you know HostBase.
1. Create an account and a project
- Sign up for free at /en/sign-up.
- In the dashboard click New project, pick an organization, a name, a region (e.g.
pl-waw-1— Warsaw oreu-north-1— Stockholm) and a database password. - After about 20 seconds the project becomes Active.
2. Get your API keys
In the project's Settings → API keys you'll find:
- Project URL — e.g.
https://abcdefghijklmnopqrst.host.ulewicz.space - anon key — the public key, safe in the browser (as long as RLS is enabled).
- service_role key — the admin key that bypasses RLS. Never ship it in frontend code.
The Connect button in the top bar gives you ready-made snippets for your framework.
3. Install the client
npm install @supabase/supabase-js
We use the official @supabase/supabase-js library — HostBase is fully compatible with it.
4. Create a table
Run this in the SQL editor:
create table todos (
id bigint generated always as identity primary key,
task text not null,
done boolean not null default false,
user_id uuid references auth.users default auth.uid(),
created_at timestamptz not null default now()
);
alter table todos enable row level security;
create policy "Users see their own todos"
on todos for all
using (auth.uid() = user_id)
with check (auth.uid() = user_id);
5. Your first query
import { createClient } from "@supabase/supabase-js";
const supabase = createClient(
"https://abcdefghijklmnopqrst.host.ulewicz.space",
process.env.HOSTBASE_ANON_KEY!
);
const { data, error } = await supabase
.from("todos")
.select("*")
.order("created_at", { ascending: false });