# MUST OBEY — Mobile-first build requirements
This app's PRIMARY surface is a mobile phone. Build it impeccably on mobile FIRST, then verify on tablet and desktop. Treat the rules below as non-negotiable hard constraints, not suggestions.
## Viewports to verify (every screen, every state)
- 320 px, 360 px, 375 px, 390 px, 414 px, 480 px
- 768 px, 834 px (iPad portrait / Pro 11)
- 1024 px, 1280 px, 1440 px, 1920 px, 2560 px
- Plus: 200% browser zoom, landscape orientation on every mobile width, iPhone with safe-area insets visible
## Hard layout rules
- Mobile-first CSS. Default styles target mobile; `@media (min-width: ...)` for larger viewports.
- Use `dvh` and `svh` instead of `vh` for full-height surfaces (iOS Safari URL-bar bug).
- Use `clamp()` for fluid typography across all viewports.
- Prefer container queries (`@container`) over media queries for component-level responsiveness.
- Use `min(100%, ...)` widths so content never overflows. Zero horizontal overflow at any viewport.
- Add `` to every page.
- Apply `padding: max(safe-area-inset-X, fallback)` on every edge-bleeding container so notched iPhones in landscape never clip content.
- Wide tables and code blocks scroll INSIDE their container (`overflow-x: auto`), never push the body.
- Use `background-attachment: scroll` on mobile, not `fixed` (iOS Safari repaint bug).
- Avoid `backdrop-filter` on animated elements. Use it sparingly on static surfaces only.
- **Canvas Scaling**: Canvases must dynamically scale with window resize events and properly handle high-DPI screens (`window.devicePixelRatio`). Set physical dimensions (`canvas.width`/`canvas.height`) using pixel ratio and render relative to this grid, using CSS to control responsive viewport scaling.
- **Robust Storage**: Every access to `localStorage`/`sessionStorage` (especially `JSON.parse` of loaded state or writes) MUST be wrapped in a `try-catch` block to handle disabled storage, private browsing mode, quota limits, or corrupted JSON gracefully. Fall back to a robust in-memory object store.
## Touch & accessibility
- Tap targets ≥ 44 × 44 px on touch (Apple HIG). Increase to 48 px under `@media (hover: none) and (pointer: coarse)`.
- All interactive controls reachable by keyboard with a visible focus ring; respect `:focus-visible`.
- Color contrast ≥ 4.5:1 for body text, 3:1 for UI components.
- All images have meaningful `alt`. Decorative images use `alt=""`.
- Respect `prefers-reduced-motion: reduce` — zero animation durations under that query.
- Forms validate inline; error messages are specific, not "Invalid input".
- Modals: focus trap, `Esc` closes, `role="dialog"`, `aria-modal="true"`, focus restored on close.
## Performance bar (Lighthouse mobile, throttled 3G/4G)
- LCP < 2.5 s · INP < 200 ms · CLS < 0.1
- JS bundle gzip < 200 KB mobile-first; lazy-load non-critical screens via `React.lazy` / dynamic imports.
- No render-blocking resources above the fold.
- Images: WebP/AVIF preferred, `loading="lazy"`, explicit `width`/`height` attributes (zero CLS), `srcset` for retina.
- Videos: `preload="metadata"`, low-resolution poster, max 720p mobile fallback. Never autoplay with audio.
- Fonts: `font-display: swap`; preload only the one used above the fold.
- Smooth scroll honoured via CSS `scroll-behavior: smooth` with reduced-motion fallback.
## Pre-ship mobile checklist (the deployer MUST verify before declaring done)
1. Open at 375 px in DevTools — every screen scrolls vertically only; zero horizontal scroll.
2. Browser zoom 200% — layout reflows without overlap.
3. iPhone Safari with the URL bar visible AND landscape — no content under the home indicator; no notch clipping.
4. iPad portrait (768 px) and landscape (1024 px) — no awkward gaps; tablet-specific breakpoints land cleanly.
5. Tap every interactive element with a thumb at real-device size — every target is easy to hit.
6. `prefers-reduced-motion: reduce` — every transition / animation skips cleanly, scroll-behavior becomes instant.
7. Lighthouse mobile score ≥ 90 across all 4 categories.
8. Zero `console.error` and zero CLS shift in real-device testing on a mid-tier Android (e.g. Pixel 6a) and an iPhone SE.
---
The original template starts below. All rules above apply on TOP of whatever this template specifies.
---
# Build Prompt — Artisan Home and Lifestyle Store
Paste this into Google AI Studio's **Build** function. It is self-contained — every section below is part of the instructions.
_Source reference: https://lovable.dev/templates/websites/ecommerce/maison-artisan-home-lifestyle-store-template_
---
## 1. Project
Build a **Ecommerce** named **Artisan Home and Lifestyle Store**.
One-line description: _Editorial home goods storefront_
**What it is:**
This template gives you a home and lifestyle e-commerce store that looks editorial and high-end, and you don't need design skills or developer help to make it work. The warm Scandinavian aesthetic—terracotta accents, cream backgrounds, serif typography—sets a tone that makes artisan products feel worth their price.
The technical parts are already handled. A complete shopping flow from browsing to checkout, persistent cart and wishlist, mobile-responsive layouts, collection filtering via URL parameters, and product sorting with five options—all built in. You can focus on curating your products and building a brand people remember.
Every detail is designed to make your store feel premium—not like a DIY project. The sharp editorial aesthetic, smooth scrolling effects, and polished product interactions give customers the impression they're shopping a high-end brand. This template doesn't look like a template—it looks like something a creative director built for you.
## 2. Target audience
- Home goods makers and artisans launching their first online store without a developer budget
- Lifestyle brand founders who need their site to match the quality of what they sell
- Boutique owners moving from marketplaces to a standalone store they actually control
- Interior designers and stylists showcasing curated product collections alongside their work
- Agency teams building polished e-commerce sites for home and lifestyle clients on tight timelines
- Small batch producers who want presentation that justifies premium pricing
## 3. Core value propositions
Surface these clearly through copy, visual emphasis, and section ordering — they are the reasons users pick this product.
- **Editorial-Grade Visual Design** — Warm Scandinavian aesthetics with parallax effects and smooth animations that make products feel premium.
- **Complete Shopping Experience** — Full browse-to-checkout flow with persistent cart and wishlist ready to take orders.
- **Professional Product Presentation** — Multi-image galleries with smooth transitions and detailed material specs for every piece.
- **Mobile-First Responsive Layouts** — Polished shopping experience across all devices with animated menus and touch-friendly filters.
- **Zero Backend Required** — Persistent cart and wishlist with local storage so you can launch without developer setup.
## 4. Features to build
**Product features:**
Production-ready features built with modern tech stack for exceptional performance and user experience
- Parallax Hero Sections
- Dual-Image Product Cards
- Collection Filtering System
- Rich Product Galleries
- Persistent Cart and Wishlist
- Curated Typography Pairing
- Scroll-Triggered Animations
- Sticky Product Information
- Complete Checkout Flow
- Asymmetric Collection Grids
- Animated Mobile Navigation
- Warm Scandinavian Palette
## 4b. Required services & integrations
List the back-end services this template needs to function. If a service is not needed, say so explicitly — silence is ambiguous.
- **Auth — Required.** Customer accounts for order history + wishlist; guest checkout also supported. Admin auth separate.
- **Database — Required.** Products, variants, inventory, orders, customers, addresses.
- **Image CDN — Required.** Product photos at multiple sizes, optimised via Cloudinary/Imgix.
- **Payments — Required.** Stripe (cards + Apple Pay + Google Pay + Klarna where appropriate). Tax via Stripe Tax. Address validation.
- **Transactional email — Required.** Order confirmation, shipping notification, delivery confirmation, abandoned cart.
- **External APIs / third-party services:**
- Shipping (EasyPost / ShipStation)
- Inventory (or self-host)
- Analytics
- Reviews (Yotpo/Trustpilot if added)
**Environment variables to expose in the build:** mark every secret (API key, DB URL, JWT secret, Stripe key, S3 credential) as a clearly named `.env` variable — never hard-code. Include a `.env.example` with the full list.
**Auth + data privacy reminders:** never log secrets · never store passwords in plain text · use HTTPS everywhere · hash + salt with bcrypt or argon2 · refresh tokens with rotation · honor a 'delete my account' request inside the UI.
## 5. Use cases & content to include
Build dedicated UI sections or pages for each of these — they tell you what content the page must support.
- **Artisan Home Goods Stores** — Sell handmade ceramics, textiles, candles, or furniture with a storefront that feels as considered as your craft. The editorial layout with asymmetric collection grids and rich product detail pages—including materials, dimensions, and multiple image views—gives each piece the presentation it deserves.
- **Curated Lifestyle Boutiques** — Build a multi-collection store around a lifestyle point of view. Customers can browse eight collections, filter by category, and sort by price, popularity, or what's new—all on a page that looks editorial and works smoothly on any device. The cohesive typography and warm color palette keep your brand feeling polished everywhere.
- **Brand Launch and Market Entry** — Get a professional storefront running before your first product drops. The complete shopping flow—from browsing and wishlisting through cart and checkout—means you're not just showing products, you're ready to take orders. Persistent cart state means customers can come back and finish what they started.
- **Client Projects for Lifestyle Brands** — Present clients with a working store instead of a static mockup. The smooth animations, polished hover effects, and fully interactive shopping flow—browsing, filtering, cart, and checkout—demonstrate the kind of quality that wins project approvals. Every interaction feels intentional, making it easy to get client sign-off.
## 6. Recommended page structure
Generate the following sections in this order. Adjust labels to fit the brand voice, but keep the structural intent.
1. Hero with a single hero product / collection.
2. Curated collection grids.
3. Product detail page with gallery, variant picker, price, add-to-cart.
4. Mini cart drawer.
5. Checkout (single page, 3 steps).
6. About / story page.
7. Footer with policies.
## 6b. First-visit onboarding
Show a **first-visit onboarding** the first time a visitor lands on the site
(detect via `localStorage` flag; do not show on return visits). Keep it
short — three steps maximum — and respectful: visitors can dismiss at any
time and revisit later from a `?` icon in the header.
**Format:** a polished modal *or* a 3-step inline tour, designed to match the
overall visual style of the template (don't bolt on a generic stepper UI).
On mobile, full-screen sheet that slides up.
**Required content — three slides:**
1. **What this is.**
- One-line headline: "Welcome to *Artisan Home and Lifestyle Store* — a template for Editorial home goods storefront."
- One paragraph (max 60 words) explaining what the template demonstrates,
who it's for, and what you'd typically use it for.
- Visual: a small annotated screenshot of the page they're about to see,
OR a 4-frame storyboard of key sections.
2. **What to try.**
- 2–3 specific things the visitor should look at to understand the design
(e.g. "Open a section to see the booking flow", "Hover the gallery for
captions", "Resize the window — every layout is fluid").
- Reference real elements on the actual page so the visitor learns by doing,
not by reading.
3. **How to remix this.**
- A direct CTA: "Use this template" → links to Lovable / AI Studio Build
remix entry point.
- Below: 3 short bullets on how to make it yours — e.g.
• "Swap the copy in `data/content.{ts,json}` for your own."
• "Replace the imagery in `/public/images/` (we use AVIF + WebP)."
• "Connect your services using the env-var list in section 4b above."
- Plus a quieter secondary action: "Just looking — close" (closes modal,
remembers preference in localStorage, never auto-shows again).
**Persistent re-entry point:**
A small "?" icon in the top-right header next to the primary nav. Click → reopens the onboarding from slide 1. Tooltip: "How this template works".
**Accessibility:**
- Trap focus inside the modal while open
- `Esc` closes
- All controls reachable by keyboard, visible focus ring
- Heading hierarchy: modal title is `h1` inside the dialog
- `role="dialog"` + `aria-modal="true"` + `aria-labelledby`
- Restore focus to the trigger (or to ``) on close
- Respect `prefers-reduced-motion` — fade in/out only, no large transforms
**Copy tone:**
Warm and direct, not corporate. Avoid "Welcome to your dashboard" language.
Avoid all caps. Use the same voice as the rest of the template's copy.
**Don't:**
- Don't gate content behind the modal. The page below must be fully scrollable.
- Don't show the modal again on return visits. Use `localStorage['onboarding-seen']`.
- Don't include marketing CTAs unrelated to remixing (no newsletter signup, no
"follow us on X" — those live elsewhere).
## 7. Design language
- **Mood:** Product-forward, tactile, retail-grade.
- **Typography:** A confident display + clean body sans. Use a clear modular scale (e.g. 12 / 14 / 16 / 20 / 24 / 32 / 48 / 64 px) and tight tracking on display sizes.
- **Palette:** Brand-color-led; high-contrast product cards.
- **Spacing:** consistent 4-px base. Generous whitespace — let the content breathe.
- **Radius:** consistent token set (e.g. 6 / 12 / 20 px). Don't mix arbitrary values.
- **Shadows:** subtle, layered. Avoid heavy drop-shadows.
- **Imagery:** Realistic product photography. Multiple angles. Lifestyle shots.
- **Motion:** purposeful — entrance fades, hover lifts, page transitions. Respect `prefers-reduced-motion`. No bouncing splash animations.
## 8. Content generation rules
- Write **realistic, specific copy**. NO Lorem Ipsum. NO generic placeholders like 'Your tagline here'.
- Invent plausible names, dates, locations, prices, quotes, testimonials and product details that fit the domain.
- Tone should match the audience above — confident, specific, free of buzzwords.
- Headlines: punchy and concrete. No 'Empower your business' filler.
- Body copy: short paragraphs (2–4 sentences). Use lists where appropriate.
- All numbers, stats, and metrics must look plausible for the domain.
## 8a. Seed content (use these specific examples)
Anchor the generated copy in the concrete data below. Use these names, numbers, dates, and snippets verbatim where helpful, or generate close variants that sit in the same world.
**Brand identity:** Lumen · "Beautiful objects for the home, chosen one at a time." · Lisbon · founded 2019
**Hero feature (this week):**
"In stock now — Tomás G. ceramic oil lamps (limited run of 80) — €240"
**Featured products (10 cards):**
1. **Tomás G. — Ceramic oil lamp #28/80** · €240 · hand-thrown, Alentejo
2. **Marisa Quint linen tablecloth — natural** · €180 · 280×140 cm
3. **Atelier Pomar — wool throw, oxblood** · €290 · 200×150 cm
4. **Hana K. — porcelain mug (set of 2)** · €88 · ivory matte
5. **Cordage — natural rope shelf** · €620 · 4 tiers
6. **Forna — oak cutting board** · €145 · 60 cm
7. **Bairro — pewter candleholder** · €92 · hand-poured
8. **Salt — beeswax taper candles (set of 6)** · €38
9. **Linha — handwoven floor rug** · €1,490 · 240×170 cm · 8 weeks lead time
10. **Vela — brass bookend pair** · €240
**Story:** "Lumen works with 28 makers across Portugal, Spain, and Italy. We source by visit, not catalogue. Every piece signed by its maker."
**Categories:** Lighting · Textiles · Tabletop · Wall · Kitchen · Bath · Furniture · Gift cards
**The Maker Series strip:** "Each month we feature one maker's workshop · this month: Tomás G. — Évora ceramicist"
**Trade program:** "For interior designers — 15% discount, dedicated rep, NET-30 terms"
**Trust:** "Lead times honest · breakages covered · free EU shipping over €240"
**Sample testimonial:** "I waited 8 weeks for the rug. It was worth every day." — Maya R., Lisbon
## 9. Media & assets
Every ``, `background-image`, gallery tile, thumbnail, and decorative figure on the page must come from ONE of the three buckets below. Do NOT reference any image path that is not specified here. Do NOT ship stock-photo placeholders.
### Bucket 1 — Runtime-generated via Nano Banana Pro (`gemini-3-pro-image`)
Generate at build time, cache to Firebase Storage at the path listed, serve via signed URL. Each call uses model `gemini-3-pro-image`, output format `image/webp`, dimensions as listed. The visual register matches section 7 (Design language) and the specific seed content in section 8a.
- **Hero image** → `/public/generated/hero.webp` · 2400×1500 · prompt: "Editorial hero shot of the hero product or collection named in section 8a, in the visual register of section 7. Single subject, generous negative space, palette consistent with the brand. Real-photo aesthetic, 35mm or medium-format look. No on-image text, no logos overlaid."
- **Product images (4-6 angles per product in section 8a's catalogue)** → `/public/generated/products/{product-slug}/p-01.webp … p-06.webp` · 1500×1875 · prompt: "Per-product prompt template: white-seamless or styled-context studio shot of the product named in section 8a, angle index {01 = front · 02 = three-quarter · 03 = back · 04 = detail · 05 = lifestyle in-use · 06 = scale-with-hand}. No on-image text. One full set per product."
- **Collection-page banner (one per collection in section 8a)** → `/public/generated/collections/{collection-slug}.webp` · 2400×900 · prompt: "Wide editorial banner for the collection, evoking its season/material/mood from section 8a. No on-image text."
- **Lookbook / lifestyle tiles (8 images)** → `/public/generated/lookbook/l-01.webp … l-08.webp` · 1600×2000 · prompt: "Per-tile editorial lifestyle photograph showing the product in its real context (e.g. a leather tote on a café table, a ceramic mug on a windowsill at dawn). No on-image text."
- **Brand story / about images (3 tiles)** → `/public/generated/about/a-01.webp … a-03.webp` · 1600×1200 · prompt: "Documentary photographs of the studio / workshop / maker named in section 8a — bench, materials, hands at work. No on-image text."
- **Wordmark / monogram** → `/public/generated/wordmark.svg` · prompt: "A simple brand wordmark for the store named in section 8a, set in the display font of section 7, suitable for both shopfront header and order-confirmation email." Favicon export to `/public/generated/favicon-256.webp` (256×256).
### Bucket 2 — Seed assets shipped with the deliverable
Static files committed to `/public/samples/` as fallbacks when generation fails. Generated once via Nano Banana 2 (`gemini-3.1-flash-image`), 1024×1024 WebP unless noted.
- `/public/samples/empty-state-cart.webp` — 1024×1024 — prompt: "Minimal hand-drawn line illustration of an empty shopping bag with handles slack, single-stroke outline, no colour fill."
- `/public/samples/empty-state-wishlist.webp` — 1024×1024 — prompt: "Minimal hand-drawn line illustration of a single empty bookmark, single-stroke outline, no colour fill."
- `/public/samples/empty-state-search.webp` — 1024×1024 — prompt: "Minimal hand-drawn line illustration of a magnifying glass over a folded receipt, single-stroke outline, no colour fill."
- `/public/samples/hero-fallback.webp` — 1600×1000 — same prompt as the Bucket-1 hero, encoded once at build and committed so the page renders identically if Gemini quota is exhausted.
### Bucket 3 — User-supplied (when the template is remixed)
Onboarding modal surfaces a "Replace with your photos" hint. Uploads land via the file input → Firebase Storage path `stores/{storeSlug}/products/{productSlug}/uploads/`. The build ships with Bucket-1 + Bucket-2 only; no user-supplied images at first paint.
### Hard rules
- Every `` tag MUST have a `src` that resolves to a path listed above. Any `` referencing a path not in this section is a build error.
- No bare `image.jpg` / `hero.jpg` / `placeholder.png` references anywhere in the code.
- Icons: `lucide-react` only; use sparingly and consistently — never decorative-only.
- Optimisation: WebP or AVIF, `loading="lazy"` on everything below the fold, explicit `width`/`height` to prevent layout shift.
## 10. Interactivity & states
- Every interactive element has a hover, focus, active, and disabled state.
- Forms validate inline and show specific error messages.
- Loading states (skeletons, not spinners where possible).
- Empty states with helpful next-action guidance.
- Smooth scroll for in-page anchors.
## 11. Tech & responsive requirements
- **Stack:** React + TypeScript + Tailwind CSS. Use functional components and hooks.
- **Mobile-first.** Verify layouts at 375 px (iPhone SE), 768 px (iPad), 1024 px, 1440 px+.
- Use `clamp()` for fluid typography where appropriate.
- Prefer container queries over media queries for component-level responsiveness.
- Use `dvh` / `svh` units instead of `vh` to handle mobile viewport chrome.
- Zero horizontal overflow at any width. Zero layout shift on load.
- Respect safe-area insets on iOS.
## 12. Accessibility (WCAG 2.2 AA)
- Semantic HTML — `header`, `nav`, `main`, `section`, `article`, `footer`.
- All interactive controls reachable by keyboard with a visible focus ring.
- Color contrast ≥ 4.5:1 for body, 3:1 for large text and UI components.
- All images have meaningful `alt` text. Decorative images use `alt=""`.
- Form fields have associated `