freemium F2: registra nucleo no wiki/log

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Leonardo
2026-06-13 19:05:55 -03:00
parent a2f3b9fae4
commit 5a87c29dd0
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -1699,3 +1699,6 @@ Touched: Freemium PLG
## [2026-06-13 19:45] session | Freemium F1 done (enforcement pacientes + Upgrade PRO) ## [2026-06-13 19:45] session | Freemium F1 done (enforcement pacientes + Upgrade PRO)
Touched: Freemium PLG Touched: Freemium PLG
## [2026-06-13 21:40] session | Freemium F2 nucleo (RPCs + signup + onboarding + audit fix)
Touched: Freemium PLG
+1 -1
View File
@@ -34,7 +34,7 @@ Blueprint pede welcome email via **Resend**; aqui é **SMTP/Mailpit** (`process-
## Fases ## Fases
- **F1** ✅ DONE (2026-06-13) — therapist_free ganhou max_patients=20; trigger `enforce_patient_plan_limit` em patients (lê `plan_features.limits` em runtime, resolve plano via `tenant_active_plan_id`, conta vivos, RAISE `PLAN_LIMIT_REACHED|patients|n`); helpers globais + wiring + backfill 9 schemas. Front: `utils/planLimit.js` (toast com CTA via grupo system-alerts) nos 3 pontos de criação de paciente + botão **Upgrade PRO** no AppTopbar quando plano é free. Migrations: `20260613000005_*` + `manual/freemium_f1_plan_limits.supabase_admin.sql`. Testado em ROLLBACK (clinic_free bloqueia em 30, therapist_free em 20, PRO ilimitado). - **F1** ✅ DONE (2026-06-13) — therapist_free ganhou max_patients=20; trigger `enforce_patient_plan_limit` em patients (lê `plan_features.limits` em runtime, resolve plano via `tenant_active_plan_id`, conta vivos, RAISE `PLAN_LIMIT_REACHED|patients|n`); helpers globais + wiring + backfill 9 schemas. Front: `utils/planLimit.js` (toast com CTA via grupo system-alerts) nos 3 pontos de criação de paciente + botão **Upgrade PRO** no AppTopbar quando plano é free. Migrations: `20260613000005_*` + `manual/freemium_f1_plan_limits.supabase_admin.sql`. Testado em ROLLBACK (clinic_free bloqueia em 30, therapist_free em 20, PRO ilimitado).
- **F2** — Self-service: `enable_confirmations`, RPCs idempotentes, signup rewrite (nome+slug+metadata), `/onboarding`, welcome email, plano free visível na vitrine. - **F2** 🟡 NÚCLEO DONE (2026-06-13) — `enable_confirmations=true` (config.toml, gitignored, ativa no restart do stack); RPCs `slug_disponivel`/`auto_provision_free_tenant`/`processar_pos_signup` (manual/freemium_f2_provisioning.supabase_admin.sql, testados em ROLLBACK clínica+terapeuta); **fix de regressão** `log_audit_change` (migration 20260613000006) que quebrava INSERT em tenant_members; Signup.vue reescrito (kind+nome+slug ao vivo+metadata, signOut-local + tela confirme-email); OnboardingPage.vue (provision+estados slug-colidiu/erro); guard → /onboarding; rota registrada. Build OK. **Restam (polish):** welcome email best-effort (infra SMTP schema-per-tenant) + apresentação do free na vitrine (public_name/preço "Grátis"/bullets — os planos já são is_visible=true mas sem nome/preço).
- **F3** — Extras (4). - **F3** — Extras (4).
- **F4** — Deploy (hosted, dirigido pelo Leonardo). - **F4** — Deploy (hosted, dirigido pelo Leonardo).