Modern marketing and pre-order experience for Timeon Watch built with Next.js 14 (App Router), TypeScript, Tailwind CSS, shadcn/ui, Framer Motion, next-intl, and Sanity CMS.
- Framework: Next.js 14 (App Router) + TypeScript
- Styling: Tailwind CSS, shadcn/ui component library
- Animations: Framer Motion micro-interactions
- Internationalisation: next-intl (FR/EN with locale-aware routing)
- Content: Sanity Studio embedded at
/studio - Payments: Stripe Checkout + webhook ingestion
- Email: Resend + React Email templates
- Analytics: Plausible (optional via env)
npm install
cp .env.example .env
# fill in SANITY_*, STRIPE_*, RESEND_* secrets
npm run devVisit http://localhost:3000/fr for the default locale (French).
- Populate
.envwithSANITY_PROJECT_ID,SANITY_DATASET, and API tokens. - Launch the embedded Studio:
npm run studio
- Seed baseline content (features, product, legal pages):
npm run cms:seed
| Script | Description |
|---|---|
npm run dev |
Start Next.js dev server |
npm run build |
Production build |
npm run start |
Start production server |
npm run lint |
ESLint |
npm run typecheck |
TypeScript project check |
npm run studio |
Run Sanity Studio locally |
npm run cms:seed |
Seed Sanity dataset with starter content |
See .env.example for the full list. Minimum required for production:
NEXT_PUBLIC_BASE_URLNEXT_PUBLIC_SANITY_PROJECT_ID,NEXT_PUBLIC_SANITY_DATASETSANITY_PROJECT_ID,SANITY_DATASET,SANITY_API_READ_TOKEN,SANITY_API_WRITE_TOKENSTRIPE_SECRET_KEY,NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY,STRIPE_WEBHOOK_SECRETRESEND_API_KEY,EMAIL_FROMNEXT_PUBLIC_PLAUSIBLE_DOMAIN(optional analytics)
src/
app/
[locale]/(marketing)/page.tsx # Home
[locale]/produit/[slug]/page.tsx # Product detail
[locale]/produit/page.tsx # Product listing redirect/list
[locale]/panier/page.tsx # Cart
[locale]/cgv/page.tsx # Terms & conditions
[locale]/confidentialite/page.tsx # Privacy policy
[locale]/contact/page.tsx # Contact & newsletter
(studio)/studio/[[...index]] # Embedded Sanity Studio
components/
analytics/ # Plausible script helper
animations/ # Framer Motion helpers
cart/ # Cart context & drawer
faq/ # FAQ accordion
forms/ # Newsletter & contact forms
layout/ # Header, footer, shell
product/ # Gallery, CTA, tech specs
rich-text/ # Sanity PortableText renderer
i18n/ # next-intl config & routing helpers
lib/ # CMS clients, Stripe, email, rate limiting
messages/ # Static copy for FR/EN
API routes live under src/app/api and cover checkout, Stripe webhooks, newsletter subscriptions, and contact submissions (with basic rate limiting).
npm run lintandnpm run typecheckkeep the codebase healthy.- Stripe/Resend/Sanity integrations fail gracefully when secrets are absent, but real credentials are required for end-to-end flows.
- Full order management dashboards inside Sanity
- Blog/FAQ sections fed by CMS documents
- Playwright E2E coverage and Lighthouse CI