|
99 | 99 | - `supabase/functions/post-signup/` — post-signup side effects |
100 | 100 | - `supabase/functions/platform-access/` — signed-in ban check (`accessService.checkPlatformAccess()`; fail-open on transport) |
101 | 101 | - `supabase/functions/waitlist-welcome/` — Pro waitlist confirmation email via Resend (fail-open; invoked after client insert) |
| 102 | + - `supabase/functions/sync-contacts/` — JWT-authenticated Resend contact upsert + one-time Free welcome email on sign-in (fail-open; identity from JWT only; atomic claim on `profiles.welcome_email_sent_at`; Resend segment via `RESEND_SEGMENT_ID` or legacy `RESEND_AUDIENCE_ID`) |
102 | 103 | - `supabase/functions/delete-account/` — self-service account deletion |
| 104 | +- Shared email HTML: `supabase/functions/_shared/transactionalEmails.ts` |
| 105 | +- **Not in 0.5.0:** LemonSqueezy webhook, subscriptions / usage_events / referrals / user_sessions tables (dropped via `20260720180000_drop_premature_saas_scaffolding.sql`); no viz-limit email, weekly digest, Pro nudge, or referral invite sends (Pro nudge + referral templates may exist in Resend as parked drafts for later) |
| 106 | +- Analytics: `src/services/analytics.js`, `src/services/analyticsEvents.js` — PostHog SPA pageviews + growth events `waitlist_joined`, `upgrade_limit_hit`; surveys disabled in SDK |
103 | 107 | - Context: `src/contexts/AuthProvider.jsx`, `src/hooks/useAuth.js` |
104 | 108 | - Avatar resolution: `src/utils/resolveUserAvatar.js` (`resolveUserAvatar`, `resolveDisplayName`, DiceBear notionists style) |
105 | 109 | - Components: `src/components/UserMenu.jsx`, `src/components/UserAvatar.jsx`, `src/components/RequireAuth.jsx` |
|
117 | 121 | | `display_name` | yes | Editable on profile settings page | |
118 | 122 | | `avatar_url` | no | OAuth / trigger-populated HTTPS URL | |
119 | 123 | | `avatar_preference` | yes | `google` (default) \| `generated` | |
| 124 | +| `welcome_email_sent_at` | no | Set atomically by `sync-contacts` when claiming the one-time welcome send | |
120 | 125 |
|
121 | | -Future (v0.6.0, not shipped): `username` (unique, set-once RLS), public `/u/:username` route; referral/billing columns (`referral_code`, `referred_by`, `referral_count`, `pro_months_earned`, `pro_expires_at`) — service role only. |
| 126 | +Future (post-0.5.0, not shipped): `username` (unique, set-once RLS), public `/u/:username` route; any referral/billing columns — new migrations then, not restore of dropped scaffolding. Through 0.5.0 Pro remains waitlist-only. |
122 | 127 |
|
123 | 128 | ### Personal learning tables |
124 | 129 |
|
|
0 commit comments