What problem does it solve?
Supabase Edge Functions guidelines help developers write secure, efficient, and maintainable edge function code for Supabase projects.
Core Features & Use Cases
- Use Web APIs and Deno core APIs instead of external dependencies to keep functions lean.
- Centralize shared utilities under supabase/functions/_shared and import via relative paths to minimize cross-dependencies.
- Use explicit versioned imports (npm: or jsr:) for external dependencies and avoid bare specifiers.
- Prefer npm: and jsr: for external imports; minimize deno.land/x usage.
- Use Node built-ins with node: specifiers when needed for compatibility.
- Do not rely on deno.land/std http server; use Deno.serve and a simple router if needed.
- Supabase pre-populates essential environment variables; manage others with supabase secrets.
- Route design: prefix routes with /function-name to ensure correct routing.
- File writes are restricted to /tmp and long-running tasks should use EdgeRuntime.waitUntil.
- Example templates show common edge function structures and patterns.
Quick Start
Create a new edge function under supabase/functions and implement at least one route following the guidelines.