HIGH story-supabase-backend-core-global-admin-005 8 pts
8
Story Points
High
Priority
Supabase Backend Core
Feature

User Story

As a Global Administrator
I want to deploy and manage TypeScript/Deno Edge Functions via Supabase CLI for server-side operations that must not expose API keys to mobile clients
So that So that encrypted assignment dispatch, Bufdir report generation, and accounting webhook processing can execute securely on the server without leaking credentials to the mobile app

Acceptance Criteria

  • Given a new Edge Function is developed, when the admin runs supabase functions deploy, then the function is available at the expected endpoint in the target environment
  • Given an Edge Function requires a secret API key, when the admin sets the secret via supabase secrets set, then the key is accessible to the function at runtime but not exposed to mobile clients
  • Given an Edge Function is invoked, when the admin reviews function logs, then request/response details, execution time, and any errors are visible in Supabase dashboard
  • Given a function deployment fails, when the admin checks deploy status, then the previous version continues serving requests and the failure reason is clearly reported
  • Given multiple functions are deployed across environments, when the admin lists deployed functions, then each environment shows its own function versions with deployment timestamps

Business Value

Edge Functions enable the security architecture for sensitive operations. Without server-side execution, the mobile app would need direct API keys for Bufdir, accounting systems, and encryption infrastructure — exposing credentials that could be extracted from the app bundle. Edge Functions also enable the auto-reminder cron jobs (10-day assignment follow-up for Blindeforbundet) and referral link generation that require reliable server-side scheduling.

Components