Commit graph

27 commits

Author SHA1 Message Date
bb944f5b61 debug for missing Kofi Link 2025-10-19 20:34:21 -04:00
f03cf73137 removed deprecated AccountClient 2025-10-19 19:42:24 -04:00
912cf71bb9 feat(support): Ko-fi end-to-end linking + badges (derive-on-read, no cron)
- Add Ko-fi webhook (/api/webhooks/kofi) with upsert by (provider, external_user_id)
  • Computes renews_at = timestamp + 1 calendar month + 1 day
  • Preserves first started_at; stores raw payload; canonicalizes by email when available
- Add Ko-fi claim flow
  • POST /api/support/kofi/claim/start — sends verification email via SMTP
  • GET  /api/support/kofi/claim/verify — finalizes link (sets app_user), redirects to /portal/account
  • POST /api/support/kofi/unlink — clears app_user on Ko-fi rows
- Add derive-on-read membership logic
  • /lib/memberships.ts — single source of truth for badges & “active” state
  • /api/support/badges — thin wrapper that returns per-provider badges
- Account UI
  • components/account/SupporterBadges.tsx — renders provider badges (Ko-fi now; extensible)
  • components/account/ConnectKofi.tsx — “Link Ko-fi” form (email → verify link)
  • components/account/LinkStatus.tsx — success/error banner on return
  • app/portal/account/AccountPanel.tsx — integrates badges, link panel, and banner
- Config/env
  • Requires: DIRECTUS_URL, DIRECTUS_TOKEN_ADMIN_SUPPORTER, KOFI_VERIFY_TOKEN
  • SMTP: SMTP_HOST, SMTP_PORT, SMTP_SECURE, SMTP_USER, SMTP_PASS, EMAIL_FROM
  • APP_ORIGIN used to build absolute verify URLs
- Misc
  • Fixed import to use @/lib/memberships
  • No cron required; UI derives active state via status === active && renews_at >= now

Refs: beta readiness for Ko-fi supporters
2025-10-19 17:51:04 -04:00
f08a7456ee completely refactored utilities for direct rendering, killed iframes 2025-10-12 22:24:23 -04:00
4eeb46fe21 laser-settings Client fix 2025-10-03 19:05:32 -04:00
def73b0aa5 show my settings ONLY if exact owner match, removes uploader fallback 2025-10-02 22:42:28 -04:00
59d2d98a8c fix to populate results in my-settings 2025-10-02 22:25:26 -04:00
9c7cfb3aaa fix to populate results in my-settings 2025-10-02 22:20:25 -04:00
b41fbd98a0 my-settings tab update 2025-10-02 22:15:06 -04:00
ef7b5b2588 added basic UtilitySwitcher for utility access in-app 2025-09-30 23:05:29 -04:00
86fdd403b0 account management upgrades 2025-09-30 19:35:27 -04:00
6162722c87 account page render fix 2025-09-30 13:12:17 -04:00
6ea6080b11 account page render fix 2025-09-30 13:02:57 -04:00
170c852bb6 account page render fix 2025-09-30 12:03:15 -04:00
6c0278c624 account page render fix 2025-09-30 10:42:48 -04:00
f743532887 middleware update for reauth 2025-09-30 10:24:20 -04:00
11bc584dec delay reauth to edit 2025-09-30 10:11:13 -04:00
787de00274 basic user accounts + 2025-09-30 00:56:23 -04:00
387c70bf56 build bug fixes 2025-09-29 19:42:51 -04:00
36ae15162a build error fix 2025-09-27 18:34:59 -04:00
78a7ff2060 portal pages update for details view 2025-09-27 18:30:18 -04:00
656ad5fe7e [id] pages render in portal 2025-09-27 17:45:20 -04:00
049f5fb841 added sub-tabs for 'additions' 2025-09-27 15:28:02 -04:00
57d5177c70 added rig viewer to portal 2025-09-27 15:12:08 -04:00
8254cd5c8c build error fix 2025-09-27 14:59:15 -04:00
45d4e08cd8 added project, material, sources to portal 2025-09-27 14:56:58 -04:00
37d474d7c8 built user portal behind auth 2025-09-27 14:30:16 -04:00