feat(sync)!: migrate backend from Cloudflare Workers to Supabase#147
Closed
vscarpenter wants to merge 1 commit intomainfrom
Closed
feat(sync)!: migrate backend from Cloudflare Workers to Supabase#147vscarpenter wants to merge 1 commit intomainfrom
vscarpenter wants to merge 1 commit intomainfrom
Conversation
Replace the entire Cloudflare Worker sync backend with Supabase (Auth + Postgres + Realtime + PostgREST). This is a complete architectural migration that simplifies the stack significantly. Key changes: - Auth: Supabase Auth with Google/Apple OAuth (replaces custom OIDC) - Database: Supabase Postgres with RLS (replaces D1/KV) - Realtime: Supabase Realtime WebSocket (replaces polling) - Sync: Direct Supabase SDK calls (replaces custom API client) - MCP Server: Supabase service role queries (replaces JWT auth) Removed: - Entire worker/ directory (Cloudflare Worker backend) - Custom OAuth handshake, token manager, vector clocks - Health monitor, custom API client, config migration - All associated tests for removed modules Added: - lib/supabase.ts - Supabase client singleton - lib/sync/supabase-sync-client.ts - Sync CRUD via Supabase SDK - lib/sync/realtime-listener.ts - Realtime subscription manager - components/sync/supabase-auth-dialog.tsx - Auth UI - components/sync/supabase-oauth-buttons.tsx - OAuth provider buttons BREAKING CHANGE: Sync backend changed from Cloudflare Workers to Supabase. Users must re-authenticate and configure Supabase env vars. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
worker/directory, custom OAuth handshake, token manager, vector clocks, health monitor, and all associated testsWhat Changed
Replaced
updated_at)Removed
worker/— entire Cloudflare Worker backend (~150 files)lib/sync/oauth-handshake/)Added
lib/supabase.ts— Supabase client singletonlib/sync/supabase-sync-client.ts— CRUD operations via Supabase SDKlib/sync/realtime-listener.ts— WebSocket subscription managercomponents/sync/supabase-auth-dialog.tsx— Auth UIcomponents/sync/supabase-oauth-buttons.tsx— Google/Apple OAuth buttonsVerification
Test plan
bun run build)Breaking Changes
Sync backend changed from Cloudflare Workers to Supabase. Users must:
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYenv vars🤖 Generated with Claude Code