@lynxflow/seo-engine 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +269 -39
- package/dist/index.mjs +269 -39
- package/dist/matrix-engine.d.ts +1 -0
- package/dist/og-image-generator.d.ts +27 -0
- package/dist/ui-icons.d.ts +19 -0
- package/package.json +1 -1
- package/src/engine.test.ts +41 -0
- package/src/index.ts +2 -0
- package/src/llm-prompt.ts +68 -41
- package/src/matrix-engine.ts +8 -0
- package/src/og-image-generator.ts +109 -0
- package/src/ui-icons.ts +134 -0
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export * from "./matrix-engine";
|
|
|
16
16
|
export * from "./built-in-locations";
|
|
17
17
|
export * from "./i18n-detector";
|
|
18
18
|
export * from "./brand-icons";
|
|
19
|
+
export * from "./ui-icons";
|
|
20
|
+
export * from "./og-image-generator";
|
|
19
21
|
export * from "./urlytics-engine";
|
|
20
22
|
export * from "./keyword-permutator";
|
|
21
23
|
export * from "./llm-prompt";
|
package/dist/index.js
CHANGED
|
@@ -40,8 +40,10 @@ var __export = (target, all) => {
|
|
|
40
40
|
var exports_src = {};
|
|
41
41
|
__export(exports_src, {
|
|
42
42
|
validateSeoSlug: () => validateSeoSlug,
|
|
43
|
+
resolveFeatureIcon: () => resolveFeatureIcon,
|
|
43
44
|
resolveBuiltInLocations: () => resolveBuiltInLocations,
|
|
44
45
|
resolveBrandIcon: () => resolveBrandIcon,
|
|
46
|
+
renderUiIconSvg: () => renderUiIconSvg,
|
|
45
47
|
renderBrandIconSvg: () => renderBrandIconSvg,
|
|
46
48
|
getSeoAgentPrompt: () => getSeoAgentPrompt,
|
|
47
49
|
default: () => src_default,
|
|
@@ -49,6 +51,7 @@ __export(exports_src, {
|
|
|
49
51
|
cleanSeoSlug: () => cleanSeoSlug,
|
|
50
52
|
YoastParityEngine: () => YoastParityEngine,
|
|
51
53
|
UrlyticsEngine: () => UrlyticsEngine,
|
|
54
|
+
UI_ICONS: () => UI_ICONS,
|
|
52
55
|
TokenQuotaManager: () => TokenQuotaManager,
|
|
53
56
|
TechnicalRulesAuditor: () => TechnicalRulesAuditor,
|
|
54
57
|
TeamRbacEngine: () => TeamRbacEngine,
|
|
@@ -68,6 +71,7 @@ __export(exports_src, {
|
|
|
68
71
|
RankMathParityEngine: () => RankMathParityEngine,
|
|
69
72
|
PseoMatrixEngine: () => PseoMatrixEngine,
|
|
70
73
|
PSEO_AGENT_SYSTEM_PROMPT: () => PSEO_AGENT_SYSTEM_PROMPT,
|
|
74
|
+
OgImageGenerator: () => OgImageGenerator,
|
|
71
75
|
NGramDensityAnalyzer: () => NGramDensityAnalyzer,
|
|
72
76
|
McpSeoServerHub: () => McpSeoServerHub,
|
|
73
77
|
MasterMarketingEngine: () => MasterMarketingEngine,
|
|
@@ -3338,6 +3342,87 @@ function resolveBuiltInLocations(territories) {
|
|
|
3338
3342
|
return results.length > 0 ? results : [...BUILT_IN_LOCATIONS_DATABASE.fr];
|
|
3339
3343
|
}
|
|
3340
3344
|
|
|
3345
|
+
// src/og-image-generator.ts
|
|
3346
|
+
class OgImageGenerator {
|
|
3347
|
+
static generateOgImageUrl(domain, pageMeta, brandName) {
|
|
3348
|
+
const cleanDomain = domain.replace(/\/+$/, "");
|
|
3349
|
+
const params = new URLSearchParams({
|
|
3350
|
+
title: pageMeta.h1 || pageMeta.title,
|
|
3351
|
+
badge: pageMeta.matrixFamily.toUpperCase(),
|
|
3352
|
+
desc: pageMeta.description ? pageMeta.description.slice(0, 120) : "",
|
|
3353
|
+
brand: brandName
|
|
3354
|
+
});
|
|
3355
|
+
if (pageMeta.location) {
|
|
3356
|
+
params.set("loc", `${pageMeta.location.name}, ${pageMeta.location.country}`);
|
|
3357
|
+
}
|
|
3358
|
+
return `${cleanDomain}/api/og?${params.toString()}`;
|
|
3359
|
+
}
|
|
3360
|
+
static renderDynamicOgSvg(opts) {
|
|
3361
|
+
const brand = opts.brandName || "LynxSEO";
|
|
3362
|
+
const badge = opts.badgeText || "OFFICIAL";
|
|
3363
|
+
const title = opts.title.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
3364
|
+
const loc = opts.locationName ? `\uD83D\uDCCD ${opts.locationName}` : "⚡ Instant Cloud Setup";
|
|
3365
|
+
const rating = opts.ratingValue ?? 4.9;
|
|
3366
|
+
const reviews = opts.reviewCount ?? 1280;
|
|
3367
|
+
const accent = opts.brandColor || "#6366F1";
|
|
3368
|
+
return `<svg width="1200" height="630" viewBox="0 0 1200 630" xmlns="http://www.w3.org/2000/svg">
|
|
3369
|
+
<defs>
|
|
3370
|
+
<linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
3371
|
+
<stop offset="0%" stop-color="#090D16"/>
|
|
3372
|
+
<stop offset="50%" stop-color="#0F172A"/>
|
|
3373
|
+
<stop offset="100%" stop-color="#020617"/>
|
|
3374
|
+
</linearGradient>
|
|
3375
|
+
<linearGradient id="textGrad" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
3376
|
+
<stop offset="0%" stop-color="#FFFFFF"/>
|
|
3377
|
+
<stop offset="100%" stop-color="#CBD5E1"/>
|
|
3378
|
+
</linearGradient>
|
|
3379
|
+
<filter id="glow" x="-20%" y="-20%" width="140%" height="140%">
|
|
3380
|
+
<feGaussianBlur stdDeviation="80" result="blur" />
|
|
3381
|
+
</filter>
|
|
3382
|
+
</defs>
|
|
3383
|
+
|
|
3384
|
+
<!-- Background -->
|
|
3385
|
+
<rect width="1200" height="630" fill="url(#bgGrad)"/>
|
|
3386
|
+
|
|
3387
|
+
<!-- Subtle Ambient Glow -->
|
|
3388
|
+
<circle cx="200" cy="150" r="220" fill="${accent}" opacity="0.15" filter="url(#glow)"/>
|
|
3389
|
+
<circle cx="1000" cy="480" r="260" fill="${accent}" opacity="0.12" filter="url(#glow)"/>
|
|
3390
|
+
|
|
3391
|
+
<!-- Top Glassmorphism Badge -->
|
|
3392
|
+
<g transform="translate(80, 80)">
|
|
3393
|
+
<rect width="220" height="42" rx="21" fill="${accent}" fill-opacity="0.15" stroke="${accent}" stroke-opacity="0.4" stroke-width="1.5"/>
|
|
3394
|
+
<text x="110" y="26" fill="#FFFFFF" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="14" font-weight="700" text-anchor="middle" letter-spacing="1.5">${badge}</text>
|
|
3395
|
+
</g>
|
|
3396
|
+
|
|
3397
|
+
<!-- Location / Scope Pill -->
|
|
3398
|
+
<g transform="translate(320, 80)">
|
|
3399
|
+
<rect width="260" height="42" rx="21" fill="#1E293B" fill-opacity="0.6" stroke="#334155" stroke-width="1"/>
|
|
3400
|
+
<text x="130" y="26" fill="#94A3B8" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="14" font-weight="600" text-anchor="middle">${loc}</text>
|
|
3401
|
+
</g>
|
|
3402
|
+
|
|
3403
|
+
<!-- Giant Title -->
|
|
3404
|
+
<text x="80" y="250" fill="url(#textGrad)" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="52" font-weight="900" letter-spacing="-1.5">
|
|
3405
|
+
<tspan x="80" dy="0">${title.slice(0, 38)}</tspan>
|
|
3406
|
+
${title.length > 38 ? `<tspan x="80" dy="68">${title.slice(38, 80)}</tspan>` : ""}
|
|
3407
|
+
</text>
|
|
3408
|
+
|
|
3409
|
+
<!-- Trust Stars & Social Proof -->
|
|
3410
|
+
<g transform="translate(80, 470)">
|
|
3411
|
+
<text x="0" y="32" fill="#FBBF24" font-size="24">★★★★★</text>
|
|
3412
|
+
<text x="140" y="30" fill="#F8FAFC" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="20" font-weight="800">${rating} / 5</text>
|
|
3413
|
+
<text x="210" y="30" fill="#64748B" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="16" font-weight="500">(${reviews.toLocaleString()} verified reviews)</text>
|
|
3414
|
+
</g>
|
|
3415
|
+
|
|
3416
|
+
<!-- Footer Brand -->
|
|
3417
|
+
<g transform="translate(80, 540)">
|
|
3418
|
+
<line x1="0" y1="0" x2="1040" y2="0" stroke="#1E293B" stroke-width="1.5"/>
|
|
3419
|
+
<text x="0" y="42" fill="#FFFFFF" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="20" font-weight="800">${brand}</text>
|
|
3420
|
+
<text x="1040" y="42" fill="#64748B" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="16" font-weight="500" text-anchor="end">Engineered with @lynxflow/seo-engine</text>
|
|
3421
|
+
</g>
|
|
3422
|
+
</svg>`;
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3341
3426
|
// src/matrix-engine.ts
|
|
3342
3427
|
class PseoMatrixEngine {
|
|
3343
3428
|
legalEngine;
|
|
@@ -3842,6 +3927,11 @@ class PseoMatrixEngine {
|
|
|
3842
3927
|
if (data.calculators) {
|
|
3843
3928
|
allPages.push(...this.generateCalculatorMatrix(domain, data.calculators, options));
|
|
3844
3929
|
}
|
|
3930
|
+
for (const p of allPages) {
|
|
3931
|
+
if (!p.ogImageUrl) {
|
|
3932
|
+
p.ogImageUrl = OgImageGenerator.generateOgImageUrl(domain, p, options.brandName);
|
|
3933
|
+
}
|
|
3934
|
+
}
|
|
3845
3935
|
return allPages;
|
|
3846
3936
|
}
|
|
3847
3937
|
resolvePage(slugOrPath, domain, data, options) {
|
|
@@ -4085,6 +4175,119 @@ function renderBrandIconSvg(input, className = "w-5 h-5 inline-block") {
|
|
|
4085
4175
|
return "";
|
|
4086
4176
|
return `<svg class="${className}" viewBox="${icon.viewBox}" fill="currentColor" aria-hidden="true"><path d="${icon.svgPath}"/></svg>`;
|
|
4087
4177
|
}
|
|
4178
|
+
// src/ui-icons.ts
|
|
4179
|
+
var UI_ICONS = {
|
|
4180
|
+
zap: {
|
|
4181
|
+
name: "Zap / Lightning",
|
|
4182
|
+
viewBox: "0 0 24 24",
|
|
4183
|
+
svgPath: '<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
|
|
4184
|
+
},
|
|
4185
|
+
shield: {
|
|
4186
|
+
name: "Shield / Security",
|
|
4187
|
+
viewBox: "0 0 24 24",
|
|
4188
|
+
svgPath: '<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
|
|
4189
|
+
},
|
|
4190
|
+
star: {
|
|
4191
|
+
name: "Star / Rating",
|
|
4192
|
+
viewBox: "0 0 24 24",
|
|
4193
|
+
svgPath: '<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor"/>'
|
|
4194
|
+
},
|
|
4195
|
+
chart: {
|
|
4196
|
+
name: "Chart / Analytics",
|
|
4197
|
+
viewBox: "0 0 24 24",
|
|
4198
|
+
svgPath: '<line x1="18" y1="20" x2="18" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="12" y1="20" x2="12" y2="4" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="6" y1="20" x2="6" y2="14" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>'
|
|
4199
|
+
},
|
|
4200
|
+
calendar: {
|
|
4201
|
+
name: "Calendar / Scheduling",
|
|
4202
|
+
viewBox: "0 0 24 24",
|
|
4203
|
+
svgPath: '<rect x="3" y="4" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2"/><line x1="16" y1="2" x2="16" y2="6" stroke="currentColor" stroke-width="2"/><line x1="8" y1="2" x2="8" y2="6" stroke="currentColor" stroke-width="2"/><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2"/>'
|
|
4204
|
+
},
|
|
4205
|
+
users: {
|
|
4206
|
+
name: "Users / Team",
|
|
4207
|
+
viewBox: "0 0 24 24",
|
|
4208
|
+
svgPath: '<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" fill="none" stroke="currentColor" stroke-width="2"/><circle cx="9" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2"/><path d="M23 21v-2a4 4 0 0 0-3-3.87" fill="none" stroke="currentColor" stroke-width="2"/><path d="M16 3.13a4 4 0 0 1 0 7.75" fill="none" stroke="currentColor" stroke-width="2"/>'
|
|
4209
|
+
},
|
|
4210
|
+
rocket: {
|
|
4211
|
+
name: "Rocket / Speed",
|
|
4212
|
+
viewBox: "0 0 24 24",
|
|
4213
|
+
svgPath: '<path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z" fill="none" stroke="currentColor" stroke-width="2"/><path d="m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z" fill="none" stroke="currentColor" stroke-width="2"/>'
|
|
4214
|
+
},
|
|
4215
|
+
sparkles: {
|
|
4216
|
+
name: "Sparkles / AI",
|
|
4217
|
+
viewBox: "0 0 24 24",
|
|
4218
|
+
svgPath: '<path d="m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3L12 3z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/>'
|
|
4219
|
+
},
|
|
4220
|
+
check: {
|
|
4221
|
+
name: "Check / Success",
|
|
4222
|
+
viewBox: "0 0 24 24",
|
|
4223
|
+
svgPath: '<polyline points="20 6 9 17 4 12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
|
|
4224
|
+
},
|
|
4225
|
+
lock: {
|
|
4226
|
+
name: "Lock / Privacy",
|
|
4227
|
+
viewBox: "0 0 24 24",
|
|
4228
|
+
svgPath: '<rect x="3" y="11" width="18" height="11" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4" fill="none" stroke="currentColor" stroke-width="2"/>'
|
|
4229
|
+
},
|
|
4230
|
+
clock: {
|
|
4231
|
+
name: "Clock / 24-7",
|
|
4232
|
+
viewBox: "0 0 24 24",
|
|
4233
|
+
svgPath: '<circle cx="12" cy="12" r="10" fill="none" stroke="currentColor" stroke-width="2"/><polyline points="12 6 12 12 16 14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>'
|
|
4234
|
+
},
|
|
4235
|
+
phone: {
|
|
4236
|
+
name: "Phone / Contact",
|
|
4237
|
+
viewBox: "0 0 24 24",
|
|
4238
|
+
svgPath: '<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" fill="none" stroke="currentColor" stroke-width="2"/>'
|
|
4239
|
+
},
|
|
4240
|
+
mapPin: {
|
|
4241
|
+
name: "Map Pin / Local",
|
|
4242
|
+
viewBox: "0 0 24 24",
|
|
4243
|
+
svgPath: '<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" fill="none" stroke="currentColor" stroke-width="2"/><circle cx="12" cy="10" r="3" fill="none" stroke="currentColor" stroke-width="2"/>'
|
|
4244
|
+
},
|
|
4245
|
+
euro: {
|
|
4246
|
+
name: "Euro / Pricing",
|
|
4247
|
+
viewBox: "0 0 24 24",
|
|
4248
|
+
svgPath: '<path d="M4 10h12M4 14h9M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12a7.9 7.9 0 0 0 7.8 8 7.7 7.7 0 0 0 5.2-2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>'
|
|
4249
|
+
},
|
|
4250
|
+
arrowRight: {
|
|
4251
|
+
name: "Arrow Right",
|
|
4252
|
+
viewBox: "0 0 24 24",
|
|
4253
|
+
svgPath: '<line x1="5" y1="12" x2="19" y2="12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><polyline points="12 5 19 12 12 19" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
|
|
4254
|
+
}
|
|
4255
|
+
};
|
|
4256
|
+
function renderUiIconSvg(iconName, className = "w-5 h-5 inline-block") {
|
|
4257
|
+
const icon = UI_ICONS[iconName.toLowerCase()] || UI_ICONS.check;
|
|
4258
|
+
return `<svg class="${className}" viewBox="${icon.viewBox}" aria-hidden="true">${icon.svgPath}</svg>`;
|
|
4259
|
+
}
|
|
4260
|
+
function resolveFeatureIcon(featureText) {
|
|
4261
|
+
const lower = featureText.toLowerCase();
|
|
4262
|
+
if (lower.includes("secur") || lower.includes("rgpd") || lower.includes("gdpr") || lower.includes("protect") || lower.includes("bank")) {
|
|
4263
|
+
return "shield";
|
|
4264
|
+
}
|
|
4265
|
+
if (lower.includes("sync") || lower.includes("speed") || lower.includes("instant") || lower.includes("real-time") || lower.includes("fast") || lower.includes("rapide")) {
|
|
4266
|
+
return "zap";
|
|
4267
|
+
}
|
|
4268
|
+
if (lower.includes("ai") || lower.includes("ia") || lower.includes("auto") || lower.includes("smart") || lower.includes("intel")) {
|
|
4269
|
+
return "sparkles";
|
|
4270
|
+
}
|
|
4271
|
+
if (lower.includes("chart") || lower.includes("analyt") || lower.includes("report") || lower.includes("stat") || lower.includes("roi") || lower.includes("kpi")) {
|
|
4272
|
+
return "chart";
|
|
4273
|
+
}
|
|
4274
|
+
if (lower.includes("schedul") || lower.includes("calen") || lower.includes("plan") || lower.includes("agenda")) {
|
|
4275
|
+
return "calendar";
|
|
4276
|
+
}
|
|
4277
|
+
if (lower.includes("user") || lower.includes("team") || lower.includes("collab") || lower.includes("client") || lower.includes("contact")) {
|
|
4278
|
+
return "users";
|
|
4279
|
+
}
|
|
4280
|
+
if (lower.includes("price") || lower.includes("tarif") || lower.includes("cost") || lower.includes("devis") || lower.includes("factur")) {
|
|
4281
|
+
return "euro";
|
|
4282
|
+
}
|
|
4283
|
+
if (lower.includes("local") || lower.includes("city") || lower.includes("ville") || lower.includes("map") || lower.includes("gps")) {
|
|
4284
|
+
return "mapPin";
|
|
4285
|
+
}
|
|
4286
|
+
if (lower.includes("24/7") || lower.includes("support") || lower.includes("hour") || lower.includes("time") || lower.includes("temps")) {
|
|
4287
|
+
return "clock";
|
|
4288
|
+
}
|
|
4289
|
+
return "zap";
|
|
4290
|
+
}
|
|
4088
4291
|
// src/urlytics-engine.ts
|
|
4089
4292
|
class UrlyticsEngine {
|
|
4090
4293
|
static parseUrl(rawUrl) {
|
|
@@ -4434,13 +4637,14 @@ import { matrixEngine, SEO_CONFIG, PSEO_DATASET } from "@/lib/seo";
|
|
|
4434
4637
|
|
|
4435
4638
|
export default function sitemap(): MetadataRoute.Sitemap {
|
|
4436
4639
|
const domain = process.env.NEXT_PUBLIC_SITE_URL || "https://example.com";
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4640
|
+
return matrixEngine.generateAllMatrices(domain, PSEO_DATASET, SEO_CONFIG)
|
|
4641
|
+
.filter((p) => p.robots.includes("index"))
|
|
4642
|
+
.map((p) => ({
|
|
4643
|
+
url: p.canonicalUrl,
|
|
4644
|
+
lastModified: new Date(),
|
|
4645
|
+
changeFrequency: "weekly",
|
|
4646
|
+
priority: 0.8,
|
|
4647
|
+
}));
|
|
4444
4648
|
}
|
|
4445
4649
|
\`\`\`
|
|
4446
4650
|
|
|
@@ -4451,49 +4655,75 @@ import { matrixEngine, SEO_CONFIG, PSEO_DATASET } from "@/lib/seo";
|
|
|
4451
4655
|
|
|
4452
4656
|
export async function GET() {
|
|
4453
4657
|
const domain = process.env.NEXT_PUBLIC_SITE_URL || "https://example.com";
|
|
4454
|
-
|
|
4455
|
-
const markdown =
|
|
4456
|
-
\`# \${SEO_CONFIG.brandName} Solutions Index\`,
|
|
4457
|
-
\`> Structured knowledge feed for LLMs and AI search engines (ChatGPT, Perplexity).\`,
|
|
4458
|
-
\`\`,
|
|
4459
|
-
\`## Solutions & Matrices\`,
|
|
4460
|
-
...pages.map((p) => \`- [\${p.h1}](\${p.canonicalUrl}): \${p.description}\`),
|
|
4461
|
-
].join("\\n");
|
|
4658
|
+
// ⚡ 1-Line high-density Markdown feed for ChatGPT Search & Perplexity
|
|
4659
|
+
const markdown = matrixEngine.generateLlmsTxt(domain, PSEO_DATASET, SEO_CONFIG);
|
|
4462
4660
|
return new NextResponse(markdown, { headers: { "Content-Type": "text/plain; charset=utf-8" } });
|
|
4463
4661
|
}
|
|
4464
4662
|
\`\`\`
|
|
4465
4663
|
|
|
4664
|
+
#### File 5: Dynamic AI Search & Bot Rules (\`app/robots.ts\` or \`public/robots.txt\`)
|
|
4665
|
+
\`\`\`typescript
|
|
4666
|
+
import { MetadataRoute } from "next";
|
|
4667
|
+
import { matrixEngine } from "@/lib/seo";
|
|
4668
|
+
|
|
4669
|
+
export default function robots(): MetadataRoute.Robots {
|
|
4670
|
+
const domain = process.env.NEXT_PUBLIC_SITE_URL || "https://example.com";
|
|
4671
|
+
return {
|
|
4672
|
+
rules: [
|
|
4673
|
+
{ userAgent: "*", allow: "/", disallow: ["/api/", "/admin/"] },
|
|
4674
|
+
{ userAgent: ["GPTBot", "ClaudeBot", "PerplexityBot", "Applebot"], allow: "/" },
|
|
4675
|
+
],
|
|
4676
|
+
sitemap: \`\${domain}/sitemap.xml\`,
|
|
4677
|
+
};
|
|
4678
|
+
}
|
|
4679
|
+
\`\`\`
|
|
4680
|
+
|
|
4466
4681
|
---
|
|
4467
4682
|
|
|
4468
|
-
### \
|
|
4683
|
+
### \uD83E\uDDF0 6. THE COMPLETE LYNXSEO STUDIO ENGINE & TOOL SUITE
|
|
4469
4684
|
|
|
4470
|
-
|
|
4471
|
-
- Comparisons: \`/vs/{competitor}\`
|
|
4472
|
-
- Alternatives: \`/alternatives/{competitor}\` (Zero keyword stuttering)
|
|
4473
|
-
- Pricing: \`/pricing/{competitor}\`
|
|
4474
|
-
- Audiences: \`/for/{target}\` (Unified industry/role mapping, anti-cannibalization)
|
|
4475
|
-
- Integrations: \`/integrations/{app}\` (Clean slug without stop words)
|
|
4476
|
-
- Use Cases: \`/use-cases/{useCase}\` (Actionable workflows with HowTo JSON-LD)
|
|
4477
|
-
- Templates: \`/templates/{slug}\` (High-converting spreadsheet/notion lead magnets)
|
|
4478
|
-
- Glossary: \`/glossary/{term}\` (Topic authority cluster hub)
|
|
4479
|
-
- Tools: \`/tools/{calculator}\` (Interactive ROI & value estimators)
|
|
4480
|
-
- Local Geo: \`/solutions/{service}/{country}/{city}\` (Tiered Indexing & Mesh Links)
|
|
4685
|
+
The SDK equips applications with 9 enterprise-grade SEO engines:
|
|
4481
4686
|
|
|
4482
|
-
|
|
4483
|
-
-
|
|
4484
|
-
-
|
|
4485
|
-
-
|
|
4486
|
-
- **Ecosystem & Integrations (10):** Module × App (e.g., CRM × Shopify), Connector × Webhook Trigger.
|
|
4487
|
-
- **Problem Playbooks (8):** Pain Point × Step-by-Step Playbook, Bottleneck × ROI.
|
|
4488
|
-
- **Interactive Calculators (6):** Time-Saved Estimator, Revenue Uplift Simulator.
|
|
4489
|
-
- **Topic Authority Clusters (6):** Financial Metrics (MRR, LTV), Technical Protocols (OAuth, Webhook).
|
|
4687
|
+
1. **⚡ In-Memory Programmatic Matrix Engine (\`matrixEngine\`):**
|
|
4688
|
+
- \`resolvePage(slug, domain, data, config)\`: Resolves full programmatic pages in < 0.05ms in local RAM.
|
|
4689
|
+
- \`resolveServicePage(serviceSlug, citySlug, ...)\`: Dedicated routing for \`app/[service]/[city]/page.tsx\`.
|
|
4690
|
+
- \`generateSitemapXml()\`, \`generateLlmsTxt()\`, \`generateRobotsTxt()\`.
|
|
4490
4691
|
|
|
4491
|
-
|
|
4692
|
+
2. **\uD83C\uDF0D Built-in Global Demographics (\`built-in-locations.ts\`):**
|
|
4693
|
+
- Automatically provisions verified cities, populations, GPS coordinates, and currencies across France, Spain, Germany, UK, US, Belgium, Switzerland, Italy, Canada, Europe, and International markets. Zero manual city typing.
|
|
4694
|
+
|
|
4695
|
+
3. **\uD83C\uDF10 Dynamic i18n Detector (\`I18nDetector\`):**
|
|
4696
|
+
- Seamless auto-detection and normalization across \`next-intl\`, \`i18next\`, \`paraglide\`, and \`astro:i18n\`. Adapts Google schemas and local currencies automatically.
|
|
4697
|
+
|
|
4698
|
+
4. **\uD83C\uDFA8 Vector Brand & Social Icons (\`renderBrandIconSvg\`):**
|
|
4699
|
+
- Zero-dependency official SVG vectors for 30+ brands (Facebook, Instagram, LinkedIn, Shopify, Slack, WhatsApp, Google, GitHub, TikTok, YouTube).
|
|
4700
|
+
|
|
4701
|
+
5. **✨ Standard UI & Feature Icons (\`renderUiIconSvg\`, \`resolveFeatureIcon\`):**
|
|
4702
|
+
- Zero-dependency Lucide-style vector icons (shield, zap, chart, calendar, users, rocket, sparkles, check, lock, clock, phone, mapPin, euro).
|
|
4703
|
+
- Semantic keyword auto-resolver: Automatically maps feature copy to the most relevant icon.
|
|
4704
|
+
|
|
4705
|
+
6. **\uD83D\uDDBC️ Dynamic OpenGraph (OG) Image Generator (\`OgImageGenerator\`):**
|
|
4706
|
+
- \`renderDynamicOgSvg(opts)\`: Generates high-converting 1200x630 SVG social cards with glassmorphism badges, star ratings, and gradient backdrops.
|
|
4707
|
+
- \`generateOgImageUrl(domain, pageMeta, brandName)\`: Edge-ready query URL for \`app/api/og/route.ts\`.
|
|
4708
|
+
|
|
4709
|
+
7. **\uD83C\uDFDB️ Google Schema.org Rich Graphs (\`ExtendedSchemaGraphBuilder\`):**
|
|
4710
|
+
- \`buildAggregateRating\` (Google Gold Stars 4.9★), \`buildAggregateOffer\` (price ranges), \`buildLocalBusiness\` (GPS & opening hours), \`buildSoftwareApplication\`, \`buildHowTo\`, \`buildFAQPage\`, \`buildBreadcrumbs\`.
|
|
4711
|
+
|
|
4712
|
+
8. **\uD83D\uDD0D URL Decomposition & Analysis (\`UrlyticsEngine\`):**
|
|
4713
|
+
- Deep structural directory decomposition, depth tracking, query parameter analysis, and slug tokenization (inspired by advertools).
|
|
4714
|
+
|
|
4715
|
+
9. **⚡ SEM Keyword Combinator (\`KeywordPermutatorEngine\`):**
|
|
4716
|
+
- Combinatorial matrix generation: Products × Modifiers × Locations with match types (\`[exact]\`, \`"phrase"\`, \`+broad\`) and intent classification.
|
|
4717
|
+
|
|
4718
|
+
10. **⚖️ Legal & Editorial Compliance (\`LegalDisclaimerEngine\`):**
|
|
4719
|
+
- 7 SeedRank-grade disclaimer templates, 90-day staleness verification, and multi-language anti-disparagement guardian.
|
|
4492
4720
|
|
|
4493
|
-
|
|
4721
|
+
11. **\uD83D\uDCCA Telemetry & Cloud Metering (\`matrixEngine.getTelemetryPayload\` & \`LynxAnalyticsClient\`):**
|
|
4722
|
+
- Synchronizes total programmatic pages, indexed hubs, and AI bot crawl hits (GPTBot, ClaudeBot, PerplexityBot) with the LynxSEO Studio dashboard.
|
|
4494
4723
|
|
|
4495
|
-
|
|
4496
|
-
-
|
|
4724
|
+
12. **\uD83E\uDDF9 URL Slug Engine & Schema.org Graphs:**
|
|
4725
|
+
- \`cleanSeoSlug(text, { language })\`: Strips accents, stop words across 10+ languages, and non-alphanumeric noise.
|
|
4726
|
+
- Outputs Google-validated Schema.org JSON-LD graphs with 0 syntax errors.
|
|
4497
4727
|
`.trim();
|
|
4498
4728
|
function getSeoAgentPrompt(customContext) {
|
|
4499
4729
|
if (!customContext)
|