Commit Graph

10 Commits

Author SHA1 Message Date
fe0df7448f Update fromEmail to new HookLab address 2026-02-10 21:42:13 +01:00
Claude
a6f32dd77a feat: branded HookLab approval email + decouple email from Stripe
- Email sending now independent from Stripe payment link generation
- Professional dark-themed HTML email template matching HookLab branding
- Return emailSent/emailError/stripeError status in API response
- Admin UI shows detailed status after approve action
- Default to onboarding@resend.dev when no custom domain

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-10 19:43:05 +00:00
Claude
eafa783040 fix: use configurable RESEND_FROM_EMAIL with onboarding@resend.dev fallback
Allow sending emails without custom domain by defaulting to Resend's
free onboarding address. Set RESEND_FROM_EMAIL env var later when
hooklab.fr domain is purchased and verified.

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-10 19:02:43 +00:00
Claude
9ae7dd2d2d feat: add admin setup page and login redirect for admins
- Add /setup-admin page for first-time admin account creation
- Add /api/admin/setup route (only works when no admin exists)
- Update login to redirect admins to /admin instead of /dashboard
- Setup page creates auth user + profile with is_admin=true

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-10 13:33:52 +00:00
Claude
1d0bd349fd feat: secure admin panel with Supabase auth + course management CRUD
- Replace ADMIN_SECRET query param with proper Supabase auth + is_admin flag
- Add admin layout with auth check (redirects non-admin to /)
- Add AdminShell component with sidebar navigation (Dashboard, Candidatures, Cours)
- Add admin dashboard with stats (candidatures, users, modules)
- Add admin candidatures page with filters and approve/reject
- Add admin course management page (create, edit, delete, publish/unpublish)
- Add API routes: GET/POST /api/admin/modules, GET/PUT/DELETE /api/admin/modules/[id]
- Add verifyAdmin() helper for API route protection
- Update database types with is_admin on profiles

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-10 13:25:58 +00:00
Claude
c4934f5669 feat: add admin panel to manage candidatures and approve with Stripe link
- /admin page with secret-key authentication
- List all candidatures with details (expandable cards)
- Approve: updates status + generates Stripe checkout URL + sends email
- Reject: updates status
- Checkout URL displayed on screen for manual copy if Resend not configured
- Protected by ADMIN_SECRET env var

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-09 19:39:33 +00:00
Claude
db51e21075 fix: configure admin client with service role options and better error logging
- Add auth options (autoRefreshToken: false, persistSession: false) to
  createAdminClient so service role key works correctly with supabase-js
- Return actual Supabase error message in candidature API for debugging

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-09 18:52:45 +00:00
Claude
231667c2c6 feat: fix accents, improve candidature API, add legal pages
- Fix all missing French accents across 16 files (é, è, ê, à, ô, ç)
- Improve candidature API error handling: check env vars, better messages
- Add Mentions légales page (/mentions-legales)
- Add CGV page (/cgv)
- Add Politique de confidentialité page (/confidentialite)
- Business info: Enguerrand Ozano, SIREN 994538932, TVA FR16994538932

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-08 20:49:54 +00:00
Claude
ee6870d73e fix: resolve __dirname error by forcing Node.js runtime on all server routes
- Add serverExternalPackages for @supabase/ssr in next.config.ts
- Add export const runtime = 'nodejs' to all pages/routes using Supabase
- Replace createAdminClient to use @supabase/supabase-js directly (no SSR)
- Prevents @supabase/ssr from running in Edge runtime on Vercel

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-08 19:08:32 +00:00
Claude
41e686c560 feat: complete HookLab MVP - TikTok Shop coaching platform
Full-stack Next.js 15 application with:
- Landing page with marketing components (Hero, Testimonials, Pricing, FAQ)
- Multi-step candidature form with API route
- Stripe Checkout integration (subscription + webhooks)
- Supabase Auth (login/register) with middleware protection
- Dashboard with progress tracking and module system
- Formations pages with completion tracking
- Profile management with password change
- Database schema with RLS policies
- Resend email integration for transactional emails

Stack: Next.js 15, TypeScript, Tailwind CSS v4, Supabase, Stripe, Resend

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
2026-02-08 12:39:18 +00:00