- Tạo project tại supabase.com
- SQL Editor → dán nội dung
supabase/schema.sql→ Run - Authentication → Providers
- Bật Anonymous (Guest)
- Bật Google (Client ID/Secret từ Google Cloud Console)
- Bật Apple (Services ID từ Apple Developer)
- Authentication → URL Configuration
- Site URL:
http://localhost:5173(dev) hoặc URL production - Redirect URLs: thêm
http://localhost:5173/**
- Site URL:
- Database → Replication → bật user_data cho Realtime
cp .env.example .envVITE_SUPABASE_URL=https://xxxx.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbG...
VITE_POSTHOG_KEY=phc_... # optionalnpm run dev- Guest: đăng nhập ẩn danh Supabase (sync được)
- Google/Apple: redirect OAuth → quay lại app → auto sync
- Thay đổi note/task → auto sync sau 1.5s
- Thiết bị khác → Realtime cập nhật tự động
| Tính năng | Cách test |
|---|---|
| Auto sync | Sửa note → Settings xem thời gian sync |
| Realtime | Mở 2 tab/browser → sửa ở tab 1, tab 2 cập nhật |
| Analytics | Stats → mục Analytics, PostHog dashboard |
| OAuth | Settings → Sign in Google |
| Email reminders | EMAIL_REMINDER_SETUP.md |