caelum0x 99be4ae12d docs: SCR-DIR AGENTS.md says a new table reaches the REST API about 3 s after the SQL commits
Measured on a clean clone: 404 schema cache for 2.5 s after setup.sql, then 200.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-30 21:11:59 +03:00

expo-scribase-starter

Expo app on Scribase: email and password sign-in and a per-user Postgres table behind row level security, with the session kept in AsyncStorage between launches. A coding agent can set up the whole backend by itself; you get a claim link at the end.

Run it

git clone https://rithub.dev/scribase/expo-scribase-starter.git
cd expo-scribase-starter
npm install
npx scribase init --temp                      # detects Expo, writes EXPO_PUBLIC_ keys to .env
npx scribase sql --file supabase/setup.sql    # the notes table, row level security on
npx expo start

Scan the QR code with Expo Go, or press i / a for a simulator. Sign up with any email and you land on the notes screen.

For coding agents

AGENTS.md is the whole job in four steps. Point Claude Code, Codex, Cursor or Windsurf at this repo and say "set this up". The agent runs:

npx scribase init --temp --yes --json

It gets a live backend in about a minute with no sign-up, sees the first request answered in the same JSON (first_request: 2 rows read from a sample table over REST with the public key), creates the notes table and hands you one link.

Claim the project

The backend the agent made is a temporary project: free, real, and deleted after 72 hours unless someone keeps it. The link the agent gives you (also the second line of .env) is the claim link.

  1. Open it. Use the whole link, including the part after #.
  2. Sign up. Free for 14 days, no card. One project stays free after that.
  3. The project moves into your account. The URL and keys do not change, so the app keeps running and .env stays as it is.

Not claimed in 72 hours: the project and its data are deleted. Nothing else happens and nobody is billed.

The approver gate

A claimed project is where your agent keeps working, so decide what it may do alone. In the console: Project > Settings > Policies > Production approver. Type one email address and save.

From then on:

  • The agent's token reads, writes and adds tables as before.
  • A destructive change to production from that token (DROP, TRUNCATE, a DELETE or UPDATE without WHERE, a restore) does not run. The agent gets 202 approval_required and waits.
  • The approver gets an email with Approve and Deny. Approve runs the stored request once, exactly as it was sent. Deny, or no answer, runs nothing.
  • The agent cannot name the approver or approve its own request.
  • Row level security is required on every public table. supabase/setup.sql here already has it; a table without it is refused.

A run of this gate against the live API, with the transcript: approval-gate-demo. Docs: production approver.

Why EXPO_PUBLIC_ names

Expo only puts variables with the EXPO_PUBLIC_ prefix into the app bundle. scribase init sees app.json and writes EXPO_PUBLIC_SUPABASE_URL and EXPO_PUBLIC_SUPABASE_ANON_KEY with no flag. The public key is meant to be public; row level security is what protects the rows.

Files

  • AGENTS.md: the steps a coding agent follows
  • supabase/setup.sql: the notes table and its policy
  • App.tsx: sign up, sign in, the notes list and the add-note form
  • lib/supabase.ts: the client with AsyncStorage session storage
Description
Expo starter a coding agent can set up alone: npx scribase init --temp gives auth + Postgres with RLS, then a claim link for the human.
https://scribase.com?ref=expo-scribase-starter Readme 36 KiB
Languages
TypeScript 97.7%
JavaScript 2.3%