#### Pick your app

The examples below will be updated with your app ID.

Want to give Instant a try but already have a Supabase project? No problem! Copy this prompt into your AI coding assistant to migrate a Supabase project to InstantDB.

```markdown
# Supabase to InstantDB Migration

Migrate a Supabase project to InstantDB in a new directory.

**Primary reference**: Fetch `https://www.instantdb.com/llms.txt` for the full
doc index. Use it to find relevant docs for each step below.

## Inputs

Ask the user for source and target directories.

## Process

1. **Setup**: Run `npx instant-cli info` to check login. If not logged in,
direct user to https://instantdb.com then `npx instant-cli login`.
   Create app: `npx instant-cli init-without-files --title "<Name>"`

2. **Copy project**: Copy source to target (excluding `node_modules`, `.next`).
   Remove `@supabase/*` deps, add the appropriate `@instantdb/*` SDK.
   Add app ID and admin token to env. Install deps.

3. **Schema**: Create `instant.schema.ts` — profiles merge into `$users`,
   foreign keys become links, join tables become many-to-many links.
   Push: `npx instant-cli push schema --yes`

4. **Permissions**: Create `instant.perms.ts` — translate RLS policies to CEL.
   `auth.uid()` → `auth.id`, ownership checks → `data.ref('link.id')`.
   Push: `npx instant-cli push perms --yes`

5. **Rewrite app**: Server components become client components with `db.useQuery()`.
   Supabase inserts/updates/deletes become `db.transact()`. Auth becomes magic
   codes or OAuth. Remove middleware, proxy, session management. Remove all
   `router.refresh()` — queries are live.

6. **Migrate data**: Ask the user if they have data to migrate. If yes, ask for
their Supabase service role key. Write and run export + import scripts.
   If app uses Supabase Storage, migrate files too.

7. **Verify**: Build must pass. Test all pages and auth flows.

8. **Agent rules**: Ask the user if they want to install Instant agent rules:
   `npx skills add instantdb/skills --yes`

## Rules

- Ask one question at a time — don't batch user prompts
- Fetch docs just-in-time from `llms.txt` index, not all at once
- `$files` permissions default to all false — must enable explicitly
```

If you are an LLM trying to learn how to develop with Instant, here are all of the links to the docs:

[Getting started w/ React](/content/docs/index.html)  
[Getting started w/ React Native](/content/docs/start-rn/index.html)  
[Getting started w/ Vanilla JS](/content/docs/start-vanilla/index.html)  
[Getting started w/ SolidJS](/content/docs/start-solidjs/index.html)  
[Getting started w/ Svelte](/content/docs/start-svelte/index.html)  
[Getting started w/ TanStack Start](/content/docs/start-tanstack/index.html)  
[Create Instant App](/content/docs/create-instant-app/index.html)  
[Recommended Workflow](/content/docs/workflow/index.html)  
[Using LLMs](/content/docs/using-llms/index.html)  
[Init](/content/docs/init/index.html)  
[Modeling data](/content/docs/modeling-data/index.html)  
[Writing data](/content/docs/instaml/index.html)  
[Reading data](/content/docs/instaql/index.html)  
[Infinite Queries](/content/docs/infinite-queries/index.html)  
[Instant on the backend](/content/docs/backend/index.html)  
[Patterns](/content/docs/patterns/index.html)  
[Auth](/content/docs/auth/index.html)  
[Magic codes](/content/docs/auth/magic-codes/index.html)  
[Guest Auth](/content/docs/auth/guest-auth/index.html)  
[Google OAuth](/content/docs/auth/google-oauth/index.html)  
[Sign In with Apple](/content/docs/auth/apple/index.html)  
[GitHub OAuth](/content/docs/auth/github-oauth/index.html)  
[LinkedIn OAuth](/content/docs/auth/linkedin-oauth/index.html)  
[Clerk](/content/docs/auth/clerk/index.html)  
[Firebase Auth](/content/docs/auth/firebase/index.html)  
[Permissions](/content/docs/permissions/index.html)  
[Rate Limits](/content/docs/rate-limits/index.html)  
[Managing users](/content/docs/users/index.html)  
[Presence, Cursors, and Activity](/content/docs/presence-and-topics/index.html)  
[Instant CLI](/content/docs/cli/index.html)  
[Devtool](/content/docs/devtool/index.html)  
[Platform API](/content/docs/platform-api/index.html)  
[Explorer Component](/content/docs/explorer-component/index.html)  
[Custom emails](/content/docs/emails/index.html)  
[App teams](/content/docs/teams/index.html)  
[Storage](/content/docs/storage/index.html)  
[Streams](/content/docs/streams/index.html)  
[Stripe Payments](/content/docs/stripe-payments/index.html)  
[Admin HTTP API](/content/docs/http-api/index.html)  
[(Experimental) Next.js SSR](/content/docs/next-ssr/index.html)  
[Migrating from Supabase](/content/docs/migrate-from-supabase/index.html)
