feat: Transform HookLab to OBC Maçonnerie showcase site

Complete transformation of the Next.js project into a professional
showcase site for OBC Maçonnerie (Benoît Colin, maçon in Nord 59).

Key changes:
- Remove all HookLab/Sanity/Supabase/Stripe/admin/training infrastructure
- Full OBC Maçonnerie identity: logo, colors, contact info, SIREN
- Schema.org LocalBusiness structured data for Benoît Colin
- SEO metadata for all pages targeting Nord 59 keywords

New pages created (23 total):
- Home page with 10 sections (hero, services, pillars, partners,
  zone, realisations, testimonials, FAQ, contact form, footer)
- Service pages: construction-maison, renovation, assainissement,
  creation-acces, demolition, services
- Secondary pages: realisations, partenaires, contact
- Blog: listing + 6 SEO articles with static content
- 8 local SEO pages: Orchies, Douai, Valenciennes, Mouchin,
  Flines-lès-Raches, Saint-Amand-les-Eaux
- Legal pages: mentions-legales, cgv, confidentialite (OBC adapted)

Components:
- Navbar with OBC branding + mobile menu
- Footer with dark navy theme, services + navigation links
- ContactForm client component (devis request)
- LocalSEOPage reusable component for local SEO pages
- CookieBanner updated with OBC cookie key

Config:
- layout.tsx: OBC metadata, Schema.org, no Sanity CDN
- globals.css: stone color variables added
- next.config.ts: removed Sanity CDN remotePatterns
- sitemap.ts: all 30 OBC pages
- robots.ts: allow all except /api/
- api/contact/route.ts: OBC devis email template

https://claude.ai/code/session_01Uec4iHjcPwB1pU41idWEdF
This commit is contained in:
Claude
2026-02-27 09:05:03 +00:00
parent 45d080197a
commit 3adcec00b7
113 changed files with 3134 additions and 11663 deletions

View File

@@ -5,38 +5,39 @@ export const runtime = "nodejs";
export async function POST(request: Request) {
try {
const body = await request.json();
const { name, phone, metier, ville } = body as {
name?: string;
phone?: string;
metier?: string;
ville?: string;
const { nom, telephone, email, typeProjet, description, budget, zone } = body as {
nom?: string;
telephone?: string;
email?: string;
typeProjet?: string;
description?: string;
budget?: string;
zone?: string;
};
if (!name || !phone || !metier || !ville) {
if (!nom || !telephone || !typeProjet) {
return NextResponse.json(
{ error: "Tous les champs sont requis." },
{ error: "Nom, téléphone et type de projet sont requis." },
{ status: 400 }
);
}
if (!process.env.RESEND_API_KEY) {
return NextResponse.json(
{ error: "Service email non configuré." },
{ status: 500 }
);
// Pas de clé API — on log simplement et on retourne succès
console.log("Nouvelle demande devis OBC Maçonnerie:", { nom, telephone, email, typeProjet, zone });
return NextResponse.json({ success: true }, { status: 200 });
}
const { Resend } = await import("resend");
const resend = new Resend(process.env.RESEND_API_KEY);
const fromEmail =
process.env.RESEND_FROM_EMAIL || "HookLab <onboarding@resend.dev>";
const adminEmail = process.env.ADMIN_EMAIL || "enguerrandbusiness@outlook.com";
const fromEmail = process.env.RESEND_FROM_EMAIL || "OBC Maçonnerie <contact@obc-maconnerie.fr>";
const adminEmail = process.env.ADMIN_EMAIL || "contact@obc-maconnerie.fr";
await resend.emails.send({
from: fromEmail,
to: adminEmail,
subject: `Nouvelle demande d'audit - ${name} (${metier})`,
subject: `Nouvelle demande de devis — ${nom} (${typeProjet})`,
html: `
<!DOCTYPE html>
<html>
@@ -44,26 +45,43 @@ export async function POST(request: Request) {
<body style="margin:0;padding:0;background:#f4f4f5;font-family:Arial,Helvetica,sans-serif;">
<div style="max-width:560px;margin:0 auto;padding:32px 16px;">
<div style="background:#ffffff;border-radius:16px;padding:32px;border:1px solid #e4e4e7;">
<h2 style="margin:0 0 24px 0;color:#111827;font-size:20px;">Nouvelle demande d'audit gratuit</h2>
<div style="display:flex;align-items:center;gap:12px;margin-bottom:24px;">
<div style="width:40px;height:40px;background:#1B2A4A;border-radius:8px;display:flex;align-items:center;justify-content:center;">
<span style="color:#E8772E;font-weight:bold;font-size:11px;">OBC</span>
</div>
<h2 style="margin:0;color:#111827;font-size:18px;">Nouvelle demande de devis</h2>
</div>
<table style="width:100%;border-collapse:collapse;">
<tr>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#6b7280;font-size:14px;width:40%;">Nom</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#111827;font-size:14px;font-weight:600;">${name}</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#111827;font-size:14px;font-weight:600;">${nom}</td>
</tr>
<tr>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#6b7280;font-size:14px;">Téléphone</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#111827;font-size:14px;font-weight:600;">${phone}</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#E8772E;font-size:14px;font-weight:600;">${telephone}</td>
</tr>
${email ? `<tr>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#6b7280;font-size:14px;">Email</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#111827;font-size:14px;">${email}</td>
</tr>` : ""}
<tr>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#6b7280;font-size:14px;">Métier</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#111827;font-size:14px;font-weight:600;">${metier}</td>
</tr>
<tr>
<td style="padding:10px 0;color:#6b7280;font-size:14px;">Ville / Zone</td>
<td style="padding:10px 0;color:#111827;font-size:14px;font-weight:600;">${ville}</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#6b7280;font-size:14px;">Type de projet</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#111827;font-size:14px;font-weight:600;">${typeProjet}</td>
</tr>
${zone ? `<tr>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#6b7280;font-size:14px;">Zone</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#111827;font-size:14px;">${zone}</td>
</tr>` : ""}
${budget ? `<tr>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#6b7280;font-size:14px;">Budget</td>
<td style="padding:10px 0;border-bottom:1px solid #f3f4f6;color:#111827;font-size:14px;">${budget}</td>
</tr>` : ""}
${description ? `<tr>
<td style="padding:10px 0;color:#6b7280;font-size:14px;vertical-align:top;">Description</td>
<td style="padding:10px 0;color:#111827;font-size:14px;">${description}</td>
</tr>` : ""}
</table>
<p style="margin:24px 0 0 0;color:#6b7280;font-size:13px;">Reçu le ${new Date().toLocaleDateString("fr-FR", { day: "2-digit", month: "long", year: "numeric", hour: "2-digit", minute: "2-digit" })}</p>
<p style="margin:24px 0 0 0;color:#9ca3af;font-size:12px;">Reçu le ${new Date().toLocaleDateString("fr-FR", { day: "2-digit", month: "long", year: "numeric", hour: "2-digit", minute: "2-digit" })}</p>
</div>
</div>
</body>
@@ -73,9 +91,9 @@ export async function POST(request: Request) {
return NextResponse.json({ success: true }, { status: 200 });
} catch (err) {
console.error("Erreur API contact:", err);
console.error("Erreur API contact OBC:", err);
return NextResponse.json(
{ error: "Erreur serveur. Veuillez réessayer." },
{ error: "Erreur serveur. Appelez le 06 74 45 30 89." },
{ status: 500 }
);
}