Skip to Content

Deploy

Edge functions are not deployed by EAS. You push them to Supabase with the Supabase CLI, separately from your app build.

Prerequisites

Complete the Supabase project setup and set your function secrets.

supabase link --project-ref <your-project-ref>

Your project ref is in the Supabase dashboard URL: https://supabase.com/dashboard/project/<project-ref>.

Push the database migrations

The AI features need the threads, messages, generations and scans tables, the chat-media storage bucket, and the count_monthly_usage function. All of it lives in supabase/migrations/.

yarn supabase:db-push-remote

Deploy the functions

Deploy all of them at once:

supabase functions deploy

Or one at a time while iterating:

supabase functions deploy chat supabase functions deploy generate supabase functions deploy identify supabase functions deploy delete-account

Verify

supabase functions list

All four functions should be listed as ACTIVE. Open the app and send a chat message; the response streams back. If nothing happens, check the logs:

supabase functions logs chat

supabase functions deploy bundles _utils/ automatically, because the shared helpers are imported with relative paths.

Redeploy after changing a secret

Functions read their secrets at start-up. If you rotate OPENROUTER_API_KEY or change AI_FREE_MESSAGES, run supabase functions deploy again so the running instances pick up the new value.

Last updated on