- Retire embedded Sanity Studio (incompatible React 18)
- Schemas en plain JS pour documentation/copie vers Studio séparé
- Ajoute config images Sanity CDN dans next.config.ts
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
Transformation complète du site HookLab de formation TikTok Shop
vers une landing page haute conversion pour agence web locale ciblant
les artisans du bâtiment dans le Nord (Douai, Orchies, Valenciennes).
- Nouveau design system : bleu nuit/orange sur fond clair (mobile-first)
- Hero avec promesse artisan + CTA orange "Réserver mon Audit"
- Section "Le Système" (3 étapes : Trouvé, Choisi, Contacté)
- Portfolio connecté à Sanity.io (fallback data intégré)
- Section "Qui suis-je" avec carte OpenStreetMap interactive
- FAQ orientée artisans avec JSON-LD pour Google
- Formulaire contact audit gratuit
- SEO local : 12 keywords artisans, JSON-LD LocalBusiness
- Sanity.io schemas (portfolio, siteSettings) + client conditionnel
- Accessibilité : skip-to-content, focus-visible, aria-labels
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
- Supprime SocialProofTicker (notifications fake visiblement artificielles)
- Navbar passe de fixed à sticky pour s'empiler correctement sous la bannière
- Bannière d'annonce responsive (texte court sur mobile, bouton close adapté)
- Hero: réduit le padding top (plus besoin de compenser un navbar fixed)
- Exit-intent popup fonctionne sur mobile (trigger au scroll-up après 60% de page)
- Popup responsive: tailles ajustées pour mobile
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
- 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
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
Store auth session in cookies instead of localStorage so server-side
code (admin layout, API routes, protected layout) can read the session.
Implements chunked cookie support for large session tokens.
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
- Wrap useSearchParams() in Suspense boundary (Next.js requirement)
- Read ?redirect= query param for post-login redirect to /admin
- Auto-detect admin users and redirect to /admin
- Fallback to /dashboard for regular users
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
- 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
- /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
- 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
@supabase/ssr uses __dirname internally which crashes in Vercel's Edge
runtime, causing MIDDLEWARE_INVOCATION_FAILED even without a middleware
file. Replaced with @supabase/supabase-js directly:
- Server client: manual cookie-based session restoration
- Browser client: direct createClient from supabase-js
- Admin client: already using supabase-js
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
- 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
Next.js 16.1.6 is not yet fully supported by Vercel's build system,
causing 404 on all routes. Downgraded to Next.js 15.5.12 + React 18,
fixed ESLint config, TypeScript config, and lint errors.
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
- Remove middleware.ts entirely (caused __dirname ReferenceError in Edge)
- Auth protection handled by dashboard layout.tsx (server-side redirect)
- Move pages out of (marketing) and (auth) route groups to fix 404 on /
- Keep (protected) route group for dashboard/formations/profil shared layout
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
- Check if Supabase env vars are configured before using them
- Wrap Supabase auth call in try/catch to prevent 500 crashes
- Graceful fallback: pass through on error instead of crashing
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
The @/ path alias was not resolved in Vercel's Edge Function bundler,
causing "unsupported modules" error. Inlined the middleware logic
directly to avoid the import.
https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y