-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: migrate to Supabase (Database + Auth + Storage) #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kazuya09322333
wants to merge
30
commits into
FormOnce:main
Choose a base branch
from
Kazuya09322333:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Migrate from Neon to Supabase PostgreSQL (Tokyo region) - Add Supabase Auth alongside NextAuth (parallel operation) - Migrate from Backblaze B2 to Supabase Storage - Create Supabase client libraries - Add authentication hooks and API routes - Create Supabase-compatible video upload router - Update environment variables for Supabase - Add comprehensive migration documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
@Kazuya09322333 is attempting to deploy a commit to the ksushant6566's projects Team on Vercel. A member of the Team first needs to authorize it. |
- Update auth form export to use UserAuthForm.supabase - This enables Google OAuth login via Supabase Auth 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Rename export to match import in signin/signup pages - This fixes the build error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change redirect from home (/) to /dashboard - Users now land on dashboard after successful authentication 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Create getServerAuthSessionSupabase helper for SSR - Update dashboard/index.tsx to use Supabase Auth - Update dashboard/forms/index.tsx to use Supabase Auth - Replace NextAuth useSession with Supabase useAuth hook 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace custom cookie handling with official auth-helpers method - This fixes session detection in getServerSideProps - Dashboard pages now correctly recognize logged-in users 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Log cookie presence - Log user detection - Log auth errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace App Router callback with Pages Router version - This ensures cookie compatibility between auth and dashboard - Both use the same cookie management system (createPagesServerClient) - Fixes session detection issue in getServerSideProps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update form editor page ([id]/index.tsx) to use getServerAuthSessionSupabase - Update form summary page ([id]/summary.tsx) to use getServerAuthSessionSupabase - All dashboard pages now use Supabase authentication - Enables access to form creation and management features 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update homepage (index.tsx) to use getServerAuthSessionSupabase - Restore sign in/sign out functionality in navigation bar - Add dashboard redirect for authenticated users - Update signout handler to use Supabase Auth - Now users can access sign in page from homepage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Log all OAuth callback requests and parameters - Log session exchange results - Add error handling with redirect to signin on failure - Help diagnose OAuth flow issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Log OAuth redirect URL being used - Log full response from signInWithOAuth - Log success URL that should be redirected to - Help diagnose why OAuth flow is not starting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add explicit cookieOptions with domain .vercel.app - Set sameSite to lax and secure to true for production - Add more detailed logging for session establishment - Use 307 redirect to maintain POST method if needed - Restore authentication check in forms index page 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove cookieOptions that caused build error - Keep simple createPagesServerClient configuration - Auth helpers should manage cookies automatically 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Create /auth/callback page for client-side session handling - Change redirect URL from /api/auth/callback to /auth/callback - Supabase client will handle cookies automatically - This approach works better with Pages Router 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
完全にNextAuth + Google ProviderからSupabase OAuthに移行しました。 ## 主な変更 ### 認証基盤 - tRPCコンテキストをSupabase Auth Helpersを使用するように更新 - NextAuthのSessionProviderをSupabaseのSessionContextProviderに置き換え - セッション型をSupabaseSessionに変更 ### UIコンポーネント - UserNav: useSession → useUser + useSupabaseClient - TeamSwitcher: useSession → useUser + useSupabaseClient - Sidebar: useSession → useUser + useSupabaseClient - すべてのサインアウト処理をsupabase.auth.signOut()に更新 ### ドキュメント - SUPABASE_OAUTH_SETUP.md: 詳細なセットアップガイド - GOOGLE_TO_SUPABASE_OAUTH_MIGRATION.md: 移行ガイド - SUPABASE_OAUTH_MIGRATION_COMPLETE.md: 移行完了レポート - .env.example: Supabaseを主要な認証方法として明記 ### その他 - video router: 不完全なクエリを修正 ## 利点 - セキュリティ向上(クライアントシークレット不要) - 一元管理(Supabaseダッシュボード) - 統合性(Storage と Auth が同じシステム) - 自動トークンリフレッシュ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add @supabase/auth-helpers-react package - Update _app.tsx to use createPagesBrowserClient 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit completes the migration from NextAuth to Supabase OAuth authentication and adds comprehensive error handling pages. Key changes: - Remove all NextAuth dependencies and configuration files - Consolidate authentication into single UserAuthForm component - Add user setup endpoint for initial workspace creation - Add custom 404, 500, and generic error pages with Japanese UI - Add Badge UI component for enhanced visual elements - Update environment variables to use Supabase-only configuration - Clean up deprecated authentication-related files - Update all dashboard and form pages to use new auth flow - Remove duplicate Supabase-specific component variants - Fix JSX parsing errors in CheckCircle components - Remove unnecessary async from getServerSideProps functions The authentication flow now: 1. Uses Supabase OAuth providers (Google, GitHub) 2. Handles callback on client-side for better security 3. Automatically creates user workspace on first login 4. Provides better error handling and user feedback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The Infinity icon doesn't exist in lucide-react library, causing 'Element type is invalid' error. Replaced with Zap icon to fix the landing page rendering issue. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- 新規フォーム作成ページ(/dashboard/forms/new)を実装 - フォーム名と説明を入力できる画面を追加 - サイドバーメニューをすべて日本語化 - Dashboard → ダッシュボード - All Forms → すべてのフォーム - Templates → テンプレート - Settings → 設定 - Keys → APIキー - Sign out → ログアウト - フォーム作成後は編集画面へ遷移するように設定 - エラーハンドリングとトースト通知を実装 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove new.tsx page (was causing authentication issues) - Use original form builder with id='new' parameter - This restores the working form creation functionality The original implementation handles new forms by using /dashboard/forms/new where 'new' is a special ID that triggers form creation in [id]/index.tsx 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
フォームビルダーのUIを完全に日本語化しました: 基本ビルダー: - 公開中のフォームは編集できません - 非公開にする - 新しい質問を追加 質問フォーム(テキスト・選択式): - タイトル → ユーザーに表示される質問のタイトル - 説明 → ユーザーに表示される質問の説明文 - プレースホルダー → 入力欄に表示されるヒントテキスト - 入力タイプ - 質問を追加 / 質問を編集 選択式質問: - 複数選択を許可 - 選択肢 - 選択肢を入力 すべてのフォーム作成・編集画面が日本語で使いやすくなりました。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added cookie headers to httpBatchLink to ensure authentication cookies are sent with tRPC requests. This should fix the UNAUTHORIZED error when creating forms. The issue was that Supabase auth cookies weren't being forwarded to the API endpoints, causing authentication to fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add VideoAsk implementation guides - Add branching logic guide - Add HubSpot integration plan - Add product roadmap and tech stack documentation - Add MVP completion status - Add test embed HTML example 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add videoask-input and videoask-renderer components - Add video-ask-player component with full playback support - Add video converter and thumbnail utilities - Add analytics utility for tracking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add improved question, start, and end nodes - Add improved custom edge component - Add question dialog and advanced editor - Add form progress bar component 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add advanced video editor component - Add analytics dashboard component - Add CTA button form component - Add logic evaluation utility - Add question progress utility - Add form preview page - Add middleware for route protection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Core changes: - Update package dependencies and Prisma schema for VideoAsk support - Enhance video upload dialog with advanced features - Improve flow builder with better question editing and logic - Update form renderer and input renderer for video support - Enhance share dialog with multiple sharing options Backend improvements: - Migrate all API routers to Supabase (forms, keys, video, webhook, workspace, auth) - Update tRPC configuration for Supabase authentication - Improve error handling and type safety across routers UI/UX enhancements: - Update dashboard pages with improved layouts - Add team switcher functionality - Improve form settings pages Configuration: - Update Next.js config for video support - Add Supabase environment variables - Update authentication callbacks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
🤖 Generated with Claude Code