supabaseedge-functionsdenoarchitecture
Supabase Edge Functions: When and How to Use Them
Decouple heavy backend processes with Deno-based edge functions — cron jobs, webhooks, and AI generation.
Supabase Edge Functions run on Deno, close to your database. They are perfect for backend processes that shouldn't block your main application server.
Three use cases where edge functions shine:
Deployment is simple: npx supabase functions deploy my-function. Set secrets with npx supabase secrets set KEY=value. The function gets its own HTTPS endpoint at your-project.supabase.co/functions/v1/my-function.
For auth, either disable JWT verification (--no-verify-jwt) and handle auth in your function code, or let Supabase's gateway verify the user's JWT automatically.