- src/lib/supabase/client.ts: Browser client for Client Components
- Uses createBrowserClient from @supabase/ssr
- Reads NEXT_PUBLIC_* env vars
- src/lib/supabase/server.ts: Server client for SSR/Actions
- Uses createServerClient from @supabase/ssr
- Async cookies() for Next.js 15+ compatibility
- Cookie handlers for session management
- Try/catch in setAll for Server Component safety
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- .env.example template for required variables
- .env.local with placeholders (gitignored)
- NEXT_PUBLIC_SUPABASE_URL for API endpoint
- NEXT_PUBLIC_SUPABASE_ANON_KEY for client-side auth
- SUPABASE_SERVICE_ROLE_KEY for server-side operations
- NEXT_PUBLIC_APP_URL for callback URLs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tasks completed: 3/3
- Create database migration with plans and profiles
- Create seed file for development
- Document database schema
SUMMARY: .planning/phases/01-foundation-auth/01-02-SUMMARY.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Document plans and profiles tables with all columns
- Document RLS policies and performance notes
- Document helper functions with TypeScript examples
- Document triggers and migration options
- Include security notes and best practices
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Verify plans exist before seeding
- Log seed completion with NOTICE
- Minimal seed - plans created in migration, profiles via trigger
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 01: Foundation & Auth
- Email verification mandatory
- Password: medium strength (8+, 1 num, 1 upper)
- Specific error messages (not generic)
- New device login notification
- Password reset via email link
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>