← back to Wallco Ai
wallco.ai · /design/:id JSON-LD — enriched Product schema with sku/color/motifs/rooms
149bfe00abfb82c0b0e76ac26a8070a21073cf93 · 2026-05-12 05:41:39 -0700 · SteveStudio2
Previous JSON-LD was 6-field minimal (name/desc/url/image/brand/offers).
Now: sku, productID, category, color (hue family), material (Wallpaper),
manufacturer (DW), @id (canonical), and additionalProperty[] surfacing
Category, Hue family, Dominant color hex, Motifs (comma-joined), Room previews
available (count), Generation seed.
Description rewritten to weave dominant hue + top 4 motifs + room-preview
count into a natural sentence. Google's snippet now has actual signal
beyond "AI-generated wallpaper" — e.g. /design/72 reads
"wallpaper pattern in rose (#e87d5d). Motifs: floral, peony, rose, leaf.
… Includes 4 room visualizations (residential, commercial, hospitality)."
Gracefully degrades: zero motifs → no motif sentence; zero rooms → no room
sentence; neutral hue → omits color sentence. Reversible: schema generation
isolated to single const + 1 inline hueName() helper. Standing rule honored —
never names a vendor (Replicate/SDXL/Gemini) in user-visible JSON-LD.
Files touched
Diff
commit 149bfe00abfb82c0b0e76ac26a8070a21073cf93
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Tue May 12 05:41:39 2026 -0700
wallco.ai · /design/:id JSON-LD — enriched Product schema with sku/color/motifs/rooms
Previous JSON-LD was 6-field minimal (name/desc/url/image/brand/offers).
Now: sku, productID, category, color (hue family), material (Wallpaper),
manufacturer (DW), @id (canonical), and additionalProperty[] surfacing
Category, Hue family, Dominant color hex, Motifs (comma-joined), Room previews
available (count), Generation seed.
Description rewritten to weave dominant hue + top 4 motifs + room-preview
count into a natural sentence. Google's snippet now has actual signal
beyond "AI-generated wallpaper" — e.g. /design/72 reads
"wallpaper pattern in rose (#e87d5d). Motifs: floral, peony, rose, leaf.
… Includes 4 room visualizations (residential, commercial, hospitality)."
Gracefully degrades: zero motifs → no motif sentence; zero rooms → no room
sentence; neutral hue → omits color sentence. Reversible: schema generation
isolated to single const + 1 inline hueName() helper. Standing rule honored —
never names a vendor (Replicate/SDXL/Gemini) in user-visible JSON-LD.
---
server.js | 47 ++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/server.js b/server.js
index 27736bf..68f4d76 100644
--- a/server.js
+++ b/server.js
@@ -2462,20 +2462,61 @@ app.get('/design/:id', (req, res) => {
.map(c => { const room = c.candidates.find(r => haveRooms.has(r)); return room ? { id: c.id, label: c.label, room } : null; })
.filter(Boolean);
+ // JSON-LD Product — enriched 2026-05-12 with sku/productID/color/material +
+ // additionalProperty (motifs, room previews, seed). Description weaves the
+ // top motifs + dominant hue so Google's snippet has real signal beyond
+ // "AI-generated wallpaper". Reference: schema.org/Product + Google Rich Result spec.
+ const _motifList = (design.motifs || []).slice(0, 4).join(', ');
+ const _hueName = (() => {
+ const h = (design.dominant_hex || '').toLowerCase();
+ if (!/^#[0-9a-f]{6}$/.test(h)) return '';
+ const r=parseInt(h.slice(1,3),16), g=parseInt(h.slice(3,5),16), b=parseInt(h.slice(5,7),16);
+ const max=Math.max(r,g,b), min=Math.min(r,g,b), s=max?(max-min)/max:0;
+ if (s<0.12) return 'neutral';
+ const hh = ((max===r ? (g-b)/(max-min)+(g<b?6:0) : max===g ? (b-r)/(max-min)+2 : (r-g)/(max-min)+4) * 60 + 360) % 360;
+ if (hh<15||hh>=345) return 'rose'; if (hh<40) return 'amber'; if (hh<60) return 'honey';
+ if (hh<90) return 'olive'; if (hh<160) return 'sage'; if (hh<200) return 'marine';
+ if (hh<250) return 'sapphire'; if (hh<290) return 'mauve'; return 'plum';
+ })();
+ const _enrichedDesc =
+ `wallco.ai original ${design.category} wallpaper pattern in ${_hueName} (${design.dominant_hex})` +
+ (_motifList ? `. Motifs: ${_motifList}.` : '.') +
+ ` Pattern No.${design.id}, generated through our proprietary AI design system — every pattern unique, never repeated.` +
+ ((design.room_mockups || []).length > 0
+ ? ` Includes ${design.room_mockups.length} room visualizations (residential, commercial, hospitality).`
+ : '') +
+ ` Free sample available.`;
+ const _addlProps = [
+ { "@type": "PropertyValue", "name": "Category", "value": design.category },
+ _hueName && { "@type": "PropertyValue", "name": "Hue family", "value": _hueName },
+ design.dominant_hex && { "@type": "PropertyValue", "name": "Dominant color", "value": design.dominant_hex },
+ (design.motifs && design.motifs.length) && { "@type": "PropertyValue", "name": "Motifs", "value": design.motifs.join(', ') },
+ (design.room_mockups && design.room_mockups.length) && { "@type": "PropertyValue", "name": "Room previews available", "value": design.room_mockups.length },
+ design.seed && { "@type": "PropertyValue", "name": "Generation seed", "value": String(design.seed) }
+ ].filter(Boolean);
+
const schema = JSON.stringify({
"@context": "https://schema.org",
"@type": "Product",
+ "@id": `https://wallco.ai/design/${design.id}`,
"name": design.title,
- "description": `wallco.ai original ${design.category} wallpaper pattern. Hand-curated through our proprietary design system — every pattern unique, never repeated.`,
+ "description": _enrichedDesc,
"url": `https://wallco.ai/design/${design.id}`,
"image": `https://wallco.ai${design.image_url}`,
- "brand": {"@type":"Brand","name":"wallco.ai"},
+ "sku": design.handle || `wallco-${String(design.id).padStart(4,'0')}`,
+ "productID": String(design.id),
+ "category": design.category,
+ "color": _hueName || undefined,
+ "material": "Wallpaper",
+ "brand": { "@type": "Brand", "name": "wallco.ai" },
+ "manufacturer": { "@type": "Organization", "name": "Designer Wallcoverings", "url": "https://designerwallcoverings.com" },
+ "additionalProperty": _addlProps,
"offers": {
"@type": "Offer",
"availability": "https://schema.org/InStock",
"url": `https://wallco.ai/samples?design=${design.id}`,
"priceCurrency": "USD",
- "description": "Free sample available"
+ "description": "Free sample available — full roll pricing on request"
}
});
← 3d1b6bd wallco.ai · /sitemap.xml + /robots.txt — 233 URLs, saturatio
·
back to Wallco Ai
·
wallco.ai · OG/Twitter enrich — og:type=product on /design/: 284e3dd →