feat: Zona de marca tipo Estilo/Brief + brandbooks desde ads/RRSS

UI con nav lateral numerada y panel editable; parse de brandbook JSON string;
enrich desde Meta/Google/IG/FB/web/CSS para que app.4ventures.es muestre el kit.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-10-15 03:23:23 +02:00
parent 102c100427
commit 3cb3ad1db1
10 changed files with 3967 additions and 69 deletions

View File

@@ -0,0 +1,930 @@
{
"4ventures-hub": {
"site": "https://4ventures.es/",
"theme_color": null,
"css_vars": [],
"top_hex": [
[
"#e05200",
6
],
[
"#25d366",
4
]
],
"fonts": [
[
"DM Sans",
1
],
[
"Cormorant Garamond",
1
],
[
"Georgia",
1
]
]
},
"agua-miia": {
"site": "https://aguamiia.es/",
"theme_color": null,
"css_vars": [
"#0085f2",
"#2071cf",
"#e8f1fb",
"#0f4f9e",
"#2e9b76",
"#e6f4ee",
"#1f7257",
"#2071cf",
"#e8f1fb",
"#0f4f9e",
"#c2603f",
"#f7ece6",
"#9a4527",
"#2FA36B",
"#2F80ED"
],
"top_hex": [
[
"#2071cf",
34
],
[
"#16204a",
27
],
[
"#c2603f",
26
],
[
"#8f8f8f",
21
],
[
"#5b54c9",
19
],
[
"#dde6ed",
8
],
[
"#e8f1fb",
8
],
[
"#f7ece6",
7
],
[
"#003388",
6
],
[
"#27374d",
6
],
[
"#e6f4ee",
6
],
[
"#eef0f6",
5
]
],
"fonts": [
[
"Urbanist",
22
],
[
"Nunito",
4
],
[
"var( --e-global-typography-primary-font-family )",
2
],
[
"sans-serif !important",
1
],
[
"var( --e-global-typography-accent-font-family )",
1
]
]
},
"bps": {
"site": "https://blueparrotschool.com/",
"theme_color": "#0051AA",
"css_vars": [],
"top_hex": [
[
"#0051aa",
13
],
[
"#5b6472",
10
],
[
"#201e22",
6
],
[
"#1187de",
4
],
[
"#dce8f7",
4
],
[
"#fdc526",
3
],
[
"#d6e2f0",
3
],
[
"#c62828",
3
],
[
"#0059c2",
3
],
[
"#eef4fb",
2
],
[
"#ffd65c",
2
],
[
"#dde5ee",
2
]
],
"fonts": [
[
"var(--font-display)",
19
],
[
"Figtree",
1
],
[
"Jost",
1
],
[
"var(--font-body)",
1
]
]
},
"brava-dermoestetica": {
"site": "https://www.bravadermoestetica.com/",
"theme_color": null,
"css_vars": [],
"top_hex": [
[
"#7a3f4d",
69
],
[
"#61323d",
7
],
[
"#1c1917",
4
],
[
"#25d366",
4
],
[
"#fafaf9",
3
],
[
"#f8f5f2",
2
]
],
"fonts": [
[
"Myriad Pro",
3
],
[
"Inter",
1
],
[
"Playfair Display",
1
]
]
},
"delgado-abogados": {
"site": "https://abogadosdelgado.es/",
"theme_color": null,
"css_vars": [
"#7a00df",
"#007cba",
"#006ba1",
"#005a87",
"#000000",
"#abb8c3",
"#ffffff",
"#f78da7",
"#cf2e2e",
"#ff6900",
"#fcb900",
"#7bdcb5",
"#00d084",
"#8ed1fc",
"#0693e3"
],
"top_hex": [
[
"#212121",
20
],
[
"#1863dc",
12
],
[
"#f4f4f4",
7
],
[
"#fffffe",
5
],
[
"#ebebeb",
5
],
[
"#444444",
3
],
[
"#ff9900",
3
],
[
"#25d366",
3
],
[
"#003388",
2
],
[
"#f0f0f0",
2
],
[
"#1ea0c3",
2
],
[
"#0757fe",
2
]
],
"fonts": [
[
"var(--wp--preset--font-family--inter)",
1
],
[
"var(--wp--preset--font-family--funnel-display)",
1
],
[
"var(--wp--preset--font-family--allura) !important",
1
],
[
"var(--wp--preset--font-family--archivo) !important",
1
],
[
"var(--wp--preset--font-family--barlow) !important",
1
]
]
},
"dtatf": {
"site": "https://detuatuformacion.es/",
"theme_color": null,
"css_vars": [
"#000000",
"#abb8c3",
"#ffffff",
"#f78da7",
"#cf2e2e",
"#ff6900",
"#fcb900",
"#7bdcb5",
"#00d084",
"#8ed1fc",
"#0693e3",
"#9b51e0"
],
"top_hex": [
[
"#788793",
12
],
[
"#253645",
4
],
[
"#f6a800",
2
],
[
"#273645",
2
],
[
"#ffd671",
2
],
[
"#f2a74b",
2
]
],
"fonts": [
[
"var( --e-global-typography-text-font-family )",
6
],
[
"Poppins-DeTUaTU",
2
]
]
},
"ecp": {
"site": "https://escueladecuidadoresprofesionales.com/",
"theme_color": null,
"css_vars": [
"#000000",
"#abb8c3",
"#ffffff",
"#f78da7",
"#cf2e2e",
"#ff6900",
"#fcb900",
"#7bdcb5",
"#00d084",
"#8ed1fc",
"#0693e3",
"#9b51e0",
"#25d366",
"#303030"
],
"top_hex": [
[
"#f7a801",
27
],
[
"#212121",
25
],
[
"#1863dc",
22
],
[
"#f7a800",
20
],
[
"#dcaa18",
15
],
[
"#2ea3f2",
14
],
[
"#faa95e",
10
],
[
"#f4f4f4",
8
],
[
"#555555",
7
],
[
"#0056a7",
5
],
[
"#0b1f40",
5
],
[
"#ebebeb",
5
]
],
"fonts": [
[
"Raleway",
18
],
[
"Open Sans",
12
]
]
},
"equinsa-parking": {
"site": "https://equinsaparking.com/",
"theme_color": null,
"css_vars": [
"#fafafa",
"#fbfbfb",
"#e7e7e7",
"#000",
"#046bd2",
"#045cb4",
"#1e293b",
"#334155",
"#F0F5FA",
"#FFFFFF",
"#D1D5DB",
"#111111",
"#111111",
"#046bd2",
"#045cb4"
],
"top_hex": [
[
"#000028",
4
],
[
"#003388",
3
],
[
"#046bd2",
3
],
[
"#fbfbfb",
2
],
[
"#475569",
2
],
[
"#111827",
2
],
[
"#9ca3af",
2
],
[
"#045cb4",
2
],
[
"#1e293b",
2
],
[
"#334155",
2
],
[
"#f0f5fa",
2
],
[
"#d1d5db",
2
]
],
"fonts": [
[
"Roboto",
9
]
]
},
"fbm-abogados": {
"site": "https://fbmasociados.com/",
"theme_color": null,
"css_vars": [
"#000000",
"#abb8c3",
"#ffffff",
"#f78da7",
"#cf2e2e",
"#ff6900",
"#fcb900",
"#7bdcb5",
"#00d084",
"#8ed1fc",
"#0693e3",
"#9b51e0"
],
"top_hex": [
[
"#04243c",
75
],
[
"#003388",
16
],
[
"#f9fbfb",
9
]
],
"fonts": [
[
"tahoma",
1
]
]
},
"halal-safety": {
"site": "https://www.halalsafety.com/",
"theme_color": null,
"css_vars": [
"#000000",
"#abb8c3",
"#ffffff",
"#f78da7",
"#cf2e2e",
"#ff6900",
"#fcb900",
"#7bdcb5",
"#00d084",
"#8ed1fc",
"#0693e3",
"#9b51e0"
],
"top_hex": [
[
"#003388",
8
],
[
"#efefef",
3
]
],
"fonts": [
[
"var(--font-display)",
3
],
[
"Manrope",
1
]
]
},
"la-freseria": {
"site": "https://lafreseria.es/",
"theme_color": null,
"css_vars": [
"#046bd2",
"#045cb4",
"#1e293b",
"#334155",
"#F0F5FA",
"#FFFFFF",
"#D1D5DB",
"#111111",
"#111111",
"#046bd2",
"#045cb4",
"#1e293b",
"#334155",
"#F0F5FA",
"#FFFFFF"
],
"top_hex": [
[
"#003388",
6
],
[
"#475569",
4
],
[
"#046bd2",
4
],
[
"#9ca3af",
2
],
[
"#045cb4",
2
],
[
"#1e293b",
2
],
[
"#334155",
2
],
[
"#f0f5fa",
2
],
[
"#d1d5db",
2
],
[
"#ef2b2d",
2
]
],
"fonts": [
[
"La Fresería",
9
],
[
"Campaña La Fresería",
3
],
[
"Campaña La Fresería 4",
2
],
[
"Campaña La Fresería 3",
2
],
[
"Campaña La Fresería 2",
1
]
]
},
"noberplast": {
"site": "https://noberplast.com/",
"theme_color": null,
"css_vars": [],
"top_hex": [
[
"#dde0e4",
6
],
[
"#bbbbbb",
4
],
[
"#06a161",
4
],
[
"#db062c",
4
],
[
"#0072ab",
3
],
[
"#e2e2e2",
2
],
[
"#444444",
2
]
],
"fonts": []
},
"tsp": {
"site": "https://talentoscholarprogram.com/",
"theme_color": null,
"css_vars": [],
"top_hex": [
[
"#a4caef",
10
],
[
"#161b2f",
7
],
[
"#a40406",
2
],
[
"#2c3349",
2
]
],
"fonts": [
[
"Poppins",
20
],
[
"Fraunces",
4
],
[
"Mulish",
3
]
]
},
"tyd": {
"site": "https://talentoydeporte.com/",
"theme_color": null,
"css_vars": [
"#000000",
"#abb8c3",
"#ffffff",
"#f78da7",
"#cf2e2e",
"#ff6900",
"#fcb900",
"#7bdcb5",
"#00d084",
"#8ed1fc",
"#0693e3",
"#9b51e0"
],
"top_hex": [
[
"#e92428",
18
],
[
"#004885",
8
],
[
"#003388",
7
],
[
"#32373c",
2
],
[
"#f00101",
2
]
],
"fonts": [
[
"Montserrat",
3
],
[
"Oswald",
1
]
]
},
"virginia-molet": {
"site": "https://gravitaeacademy.com/es/inicio/",
"theme_color": null,
"css_vars": [
"#000000",
"#abb8c3",
"#ffffff",
"#f78da7",
"#cf2e2e",
"#ff6900",
"#fcb900",
"#7bdcb5",
"#00d084",
"#8ed1fc",
"#0693e3",
"#9b51e0",
"#000000",
"#141214"
],
"top_hex": [
[
"#1863dc",
49
],
[
"#212121",
25
],
[
"#fafbfa",
21
],
[
"#004271",
19
],
[
"#f4f4f4",
8
],
[
"#003388",
7
],
[
"#141214",
6
],
[
"#0056a7",
5
],
[
"#ebebeb",
5
],
[
"#4e4b66",
4
],
[
"#1e1e1e",
4
],
[
"#d0d5d2",
3
]
],
"fonts": [
[
"quincy-cf",
5
],
[
"Inter",
4
],
[
"Inter'!important",
1
],
[
"serif!important",
1
]
]
},
"wine-advisors": {
"site": "https://www.wineadvisor.mx/",
"theme_color": "#fafafa",
"css_vars": [],
"top_hex": [
[
"#cc0100",
2
]
],
"fonts": []
}
}

View File

@@ -0,0 +1,52 @@
/**
* Auto-fill Zona de marca for all tenants (or one slug) + ensure Drive folders.
*
* npx tsx scripts/enrich_brandbooks.ts
* npx tsx scripts/enrich_brandbooks.ts bps
* DRY_RUN=1 npx tsx scripts/enrich_brandbooks.ts
* FORCE_SEED=1 npx tsx scripts/enrich_brandbooks.ts
*/
import { config } from 'dotenv';
import { resolve } from 'path';
config({ path: resolve(process.cwd(), '.env.local') });
import { enrichAllTenantBrandbooks } from '../src/lib/brandbook-enrich';
import { ensureCreativesDriveFolders } from '../src/lib/creatives-drive';
async function main() {
const slugFilter = process.argv[2]?.trim();
const dryRun = process.env.DRY_RUN === '1';
const forceSeed = process.env.FORCE_SEED === '1';
console.log(
`Enrich brandbooks · dryRun=${dryRun} · forceSeed=${forceSeed} · filter=${slugFilter || '*'}`
);
const results = await enrichAllTenantBrandbooks({
dryRun,
forceSeed,
slugFilter,
});
for (const r of results) {
console.log(
`[${r.slug}] ${r.ok ? 'OK' : 'FAIL'} · ${r.created ? 'created' : 'updated'} · ` +
`score ${r.completenessBefore}→${r.completenessAfter} · ` +
`sources=${r.sources.join('+')} · filled=${r.filledFields.slice(0, 12).join(',')}` +
(r.warning ? ` · ${r.warning}` : '')
);
if (r.ok && !dryRun) {
const drive = await ensureCreativesDriveFolders(r.tenantId, r.slug);
console.log(
` drive folders: ${drive.ok ? 'ads+rrss ok' : drive.warning || 'skip'}`
);
}
}
console.log(`Done · ${results.length} tenants`);
}
main().catch((e) => {
console.error(e);
process.exit(1);
});