Skip to content

fix: enforce SUPABASE_URL and SUPABASE_SECRET_KEY presence in server-side client; remove unused supabase-server.ts file#138

Merged
willchen96 merged 1 commit into
mainfrom
supabase-env-cleanup
May 15, 2026
Merged

fix: enforce SUPABASE_URL and SUPABASE_SECRET_KEY presence in server-side client; remove unused supabase-server.ts file#138
willchen96 merged 1 commit into
mainfrom
supabase-env-cleanup

Conversation

@willchen96

Copy link
Copy Markdown
Owner

Summary

Clean up Supabase environment handling and remove an unused frontend server-side Supabase helper.

Changes

  • Removed the unused frontend/src/lib/supabase-server.ts helper.
  • Removed SUPABASE_SECRET_KEY from the frontend env documentation.
  • Clarified that the Supabase service-role key is backend-only.
  • Added a fail-fast guard in createServerSupabase() when SUPABASE_URL or SUPABASE_SECRET_KEY is missing.

Why

The frontend should not require or document the Supabase service-role key. Backend Supabase access should also fail clearly at startup/runtime instead of constructing a client with an empty URL or key.

Testing

  • npm run build --prefix backend
  • npm run build --prefix frontend

…side client; remove unused supabase-server.ts file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant