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

✅ merged · #138 · willchen96/mike ← willchen96/mike · opened 24d ago by willchen96 · merged 24d ago by willchen96 · self · +4-40 across 3 files · ↗ on GitHub

From the PR description

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

Our analysis

Tighten Supabase env handling and drop unused frontend helper — read the full analysis →

Think the analysis missed something the PR description covers?

Commits in this PR (1)

SHA Subject Author Date
9749d601 fix: enforce SUPABASE_URL and SUPABASE_SECRET_KEY presence in server-side client; remove unused supabase-server.ts file willchen96 2026-05-16 ↗ GitHub

Capture this PR into my fork

Download a Markdown prompt that tells Claude how to port every commit in this PR into your working tree. Run it via claude -p < capture-pull-138.md from inside the repo you want the changes in.

⬇ Download capture-pull-138.md