Add a backend to a Kotlin or Android app
A Kotlin app uses the supabase-kt libraries, which work with Scribase unchanged. Create the project in the console, copy two values, and generate serializable classes for your tables.
1.Create the backend
Sign up in the console. Your first project is created automatically and the "Your backend is live" screen shows the Project URL and the publishable key with one-click copy.
2.Add the libraries
The client modules you use, plus a Ktor engine.
implementation(platform("io.github.jan-tennert.supabase:bom:3.8.0"))
implementation("io.github.jan-tennert.supabase:postgrest-kt")
implementation("io.github.jan-tennert.supabase:auth-kt")
implementation("io.ktor:ktor-client-android:3.5.1")3.Create your first table
Open your project in the console, go to Editor, then SQL, and run this. Or ask your coding agent: with the Scribase MCP server connected it applies the same SQL as a migration. Row-level security is on, so the public key can only read what the policy allows.
create table public.todos (
id bigint generated always as identity primary key,
title text not null,
done boolean not null default false,
created_at timestamptz not null default now()
);
alter table public.todos enable row level security;
create policy "todos are readable" on public.todos
for select to anon, authenticated using (true);
insert into public.todos (title) values ('Ship the backend'), ('Tell a friend');4.Generate @Serializable classes
One Row, Insert and Update data class per table, from the live schema. Re-run after schema changes.
scribase gen types <org> <project> production --lang kotlin --out app/src/main/java/DatabaseTypes.kt5.Query with the classes
Rows decode into the generated classes.
val todos = supabase.from("todos").select().decodeList<TodosRow>()Paste this into Claude Code, Cursor or Codex
The agent runs init, asks you to approve once in the browser, creates the table and wires up the first screen.
Add a Scribase backend to this Android app.
1. Add supabase-kt (bom 3.8.0, postgrest-kt and auth-kt) and the Ktor Android engine.
2. Create the client with createSupabaseClient from the project URL and publishable key kept in BuildConfig; never ship the service role key.
3. Create a `todos` table with row-level security on and a read policy using the Scribase MCP server or a SQL migration.
4. Run `scribase gen types <org> <project> production --lang kotlin` into the app and show the todos in a list.Connect the MCP server first so the agent can run SQL safely: setup for Claude Code, Codex or Cursor.
Common questions
Does Google sign-in work?
Yes. Turn Google on for the environment in the console, with your own client id or with Scribase's app.
Your Kotlin (Android) backend, live in a minute
$25 a month per project, flat. Sign up with one click; the $1 card check is credited to your first invoice.
Start now