// Generates distinct SVG placeholder images per product category, so the 200
// mock products render varied artwork instead of one shared no-items.png icon.
// Not photography — an honest stand-in, styled to the app's own gold/cream
// palette, with a distinct glyph + background tint per category so the grid
// reads as varied rather than one repeated tile.
const fs = require('fs');
const path = require('path');
const OUT_DIR = path.join(__dirname, '../../user-app/public/img/products');
fs.mkdirSync(OUT_DIR, { recursive: true });
// category slug -> [glyph path (viewBox 0 0 64 64), accent color]
const GLYPHS = {
rings: {
accent: '#B08D57',
path: '',
},
bracelets: {
accent: '#8D6A46',
path: '',
},
necklaces: {
accent: '#C9A24B',
path: '',
},
earrings: {
accent: '#A67C52',
path: '',
},
coins: {
accent: '#D4AF37',
path: 'Au',
},
};
// A handful of warm background tints so 200 tiles don't look identical even
// within one category.
const BG_TINTS = ['#F6F3EF', '#F3EADC', '#FAF5EC', '#F0E6D6', '#F8F1E6', '#EFE4D3'];
function svgFor(categorySlug, variantIndex) {
const g = GLYPHS[categorySlug] || GLYPHS.rings;
const bg = BG_TINTS[variantIndex % BG_TINTS.length];
return ``;
}
let written = 0;
for (const slug of Object.keys(GLYPHS)) {
for (let i = 0; i < 6; i++) {
const file = path.join(OUT_DIR, `${slug}-${i}.svg`);
fs.writeFileSync(file, svgFor(slug, i));
written++;
}
}
console.log(`wrote ${written} placeholder SVGs to ${OUT_DIR}`);