8 Commits
Author SHA1 Message Date
NeilClack 91d162c746 Rebuild admin pages around DataTable/AdminModal; restructure categories/groups and v2 groups API
Remove the generic $lib/svelte-admin CRUD layer and AdminTable.svelte; each
admin route now owns its own form/modal logic. Add DataTable.svelte,
superform-errors.ts, and profile-specific modal/field components.

Flatten proclamation categories/groups and drop subscription levels; add the
v2 groups API; update v1/v2 endpoints, serializers, auth, and regenerated
Prisma client with the new migrations.

Document the overhaul plan in docs/ADMIN_OVERHAUL.md.
2026-09-10 09:38:01 -05:00
NeilClack f5896aa575 Update AGENTS.md 2026-07-16 20:23:59 -05:00
NeilClack 3243f1d4a1 docs: update AGENTS.md with API routes, GHL webhook, templates, drag-and-drop, key generation 2026-07-08 15:34:12 -05:00
NeilClack 55a29b9c1a feat: wire GHL webhook to Resend email templates
- Replace raw Resend text emails with sendMail using Resend templates
- automated-user-registration template: firstName, tempPassword,
  verifyUrl, loginUrl
- license-key-delivery template: firstName, license_key
- Remove requestPasswordReset call (temp password is the one-time
  credential; verification link handles email confirmation)
- Add .catch() to Better Auth email callbacks to prevent unhandled
  rejections from missing templates crashing the server
2026-07-08 15:01:08 -05:00
NeilClack 37bed4f64c Update AGENTS.md with detailed Svelte 5 gotchas, testing patterns, and admin form architecture
Covers select binding workaround, / sync pattern,
Playwright locator API, test patterns, dirty-state submit, and
Super-only proclamation restrictions.
2026-07-07 22:29:13 -05:00
NeilClack 38d1752f5b admin: Superforms + Zod validation, three-address-defaults schema, profiles toast fix
- Add Superforms + Zod 4 for all admin form validation
- Replace address isDefault with three separate boolean defaults (Mailing, Billing, Shipping)
- Update profiles page with three-checkbox address form and toast improvements
- Convert all admin page server actions to pass request directly to crud
- Export superFormErrorsToFieldErrors helper for profiles server actions
- Regenerate Prisma client for new schema fields
2026-07-07 13:36:23 -05:00
NeilClack a72b65be95 audit: harden better-auth config, fix types, cleanup
- Fix email verification link using Better Auth's url parameter (was hardcoded to google.com)
- Make App.Locals session/user types nullable to match reality
- Add explicit rate limiting config (60s window, 100 max)
- Add trusted origins for localhost:5173 and production domain
- Add Forgot Password? and Register links to login page
- Remove unused dead code from auth-client.ts
- Remove outdated known-bug note from AGENTS.md (register redirect is fixed)
2026-07-07 08:51:24 -05:00
NeilClack a42c32f014 Add email via Resend 2026-07-06 21:01:41 -05:00