Commit graph

102 commits

Author SHA1 Message Date
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
7669a084b1 Act to Get 2025-10-16 08:59:08 -04:00
b8226d44d6 file browser small UI improvements 2025-10-15 22:08:39 -04:00
68c5f602f9 file browser small UI improvements 2025-10-15 22:02:22 -04:00
a6971f4535 file browser small UI improvements 2025-10-15 21:54:38 -04:00
edcde5ba55 file browser small UI improvements 2025-10-15 21:45:00 -04:00
2dfeb4e2bb file browser small UI improvements 2025-10-15 21:35:31 -04:00
448bb8e034 file browser call fix 2025-10-15 21:26:56 -04:00
130db9725a svgnest remove back to main 2025-10-15 20:58:01 -04:00
582cafca0b svgnest render fix 2025-10-15 20:53:06 -04:00
13879407f7 svgnest render fix 2025-10-15 20:45:56 -04:00
c1fbdc843c bgbye routing fix 2025-10-15 19:05:56 -04:00
3c76ab69e5 buying guide header display fix 2025-10-15 18:23:06 -04:00
22bc048475 background remover fix 2025-10-15 18:19:23 -04:00
da4d0620a4 background remover fix 2025-10-15 16:57:22 -04:00
ab93441fc5 laser finder fix 2025-10-15 16:53:14 -04:00
73bba240ab buyingguide test fix 2025-10-15 16:50:32 -04:00
f08a7456ee completely refactored utilities for direct rendering, killed iframes 2025-10-12 22:24:23 -04:00
12dd2c6c06 cut,skip fix plus owner fix for view page 2025-10-08 23:21:29 -04:00
1156984fa6 submission form cleanup 2025-10-06 22:05:29 -04:00
d44d8448e7 submission form cleanup 2025-10-06 21:36:55 -04:00
4a085680ed submission form cleanup 2025-10-06 21:28:25 -04:00
190cb60ac0 submission form cleanup 2025-10-06 21:18:15 -04:00
b779d2c83a submission form cleanup 2025-10-06 21:07:41 -04:00
1f5a44ea9f submission form cleanup 2025-10-06 21:02:47 -04:00
01d16881d1 submission form cleanup 2025-10-06 20:54:05 -04:00
92ba85c570 submission form cleanup 2025-10-06 20:46:30 -04:00
51df489ce6 submission form cleanup 2025-10-06 20:37:40 -04:00
4359803a3f list and details cleanup 2025-10-05 22:38:40 -04:00
2e8297d426 list and details cleanup 2025-10-05 22:32:27 -04:00
6829f2840c list and details cleanup 2025-10-05 22:17:37 -04:00
8fc0989b17 list and details cleanup 2025-10-05 22:06:32 -04:00
c59ef98fd9 list and details cleanup 2025-10-05 21:52:16 -04:00
e8ba98aa91 settings overhaul and reset 2025-10-05 21:21:25 -04:00
7ef13e56ff settings overhaul and reset 2025-10-05 20:35:20 -04:00
8b3aa65e2e settings overhaul and reset 2025-10-05 18:58:55 -04:00
d3a1c3be8d settings overhaul and reset 2025-10-05 18:56:17 -04:00
98d9ae0d90 settings overhaul and reset 2025-10-05 18:48:36 -04:00
43c86c3ebc settings overhaul and reset 2025-10-05 18:21:33 -04:00
ee055b4060 settings overhaul and reset 2025-10-05 17:55:24 -04:00
3195ff5d74 settings overhaul and reset 2025-10-05 17:45:09 -04:00
4ef3160515 schema improvements 2025-10-05 17:09:39 -04:00
eb962b8283 build fixes 2025-10-05 12:35:24 -04:00
26fa64790d build fixes 2025-10-05 12:30:19 -04:00
e3d59b5512 build fixes 2025-10-05 11:54:02 -04:00
6f7065d486 submission form rework based on data sheet 2025-10-05 11:42:32 -04:00
fd97d67080 form fixes 2025-10-05 08:50:01 -04:00
d04613ffdc submit responsiveness 2025-10-05 08:24:51 -04:00
8654653589 refactor for envelope updates on submissions 2025-10-04 23:09:39 -04:00
f6a275cbc4 submission fixes for testing 2025-10-04 21:57:25 -04:00