@lynxflow/seo-engine 1.8.30 → 2.0.1

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.
Files changed (96) hide show
  1. package/README.md +60 -117
  2. package/dist/ai-copilot-client.d.ts +2 -0
  3. package/dist/built-in-locations.d.ts +22 -0
  4. package/dist/content-ai-arsenal.d.ts +28 -0
  5. package/dist/existing-media-harvester.d.ts +33 -0
  6. package/dist/extended-schemas.d.ts +84 -0
  7. package/dist/features-knowledge-harvester.d.ts +56 -0
  8. package/dist/geo-citation-scorer.d.ts +34 -0
  9. package/dist/i18n-detector.d.ts +1 -1
  10. package/dist/index.d.ts +32 -7
  11. package/dist/index.js +567 -83
  12. package/dist/index.mjs +2062 -169
  13. package/dist/internal-pagerank-graph.d.ts +59 -0
  14. package/dist/knowledge-bank-builder.d.ts +91 -0
  15. package/dist/marketing-skills-engine.d.ts +74 -0
  16. package/dist/matrix-engine.d.ts +29 -0
  17. package/dist/power-words-psychology.d.ts +27 -15
  18. package/dist/public-manifest-engine.d.ts +58 -0
  19. package/dist/rag-knowledge-engine.d.ts +50 -0
  20. package/dist/rate-limited-translator.d.ts +19 -0
  21. package/dist/token-quota-manager.d.ts +4 -0
  22. package/package.json +11 -3
  23. package/TUTORIEL_INTEGRATION_SITE.md +0 -283
  24. package/connectors/cloudflare-worker/worker.js +0 -106
  25. package/connectors/laravel/LynxSeoController.php +0 -37
  26. package/connectors/wordpress/lynxseo-admin-app.js +0 -2611
  27. package/connectors/wordpress/lynxseo-connector.php +0 -1712
  28. package/connectors/wordpress/lynxseo-connector.zip +0 -0
  29. package/lynxflow-seo-engine-1.2.0.tgz +0 -0
  30. package/src/ad-intelligence-cro.ts +0 -140
  31. package/src/ai-bots-log-analyzer.ts +0 -127
  32. package/src/ai-copilot-client.ts +0 -99
  33. package/src/analytics-client.ts +0 -315
  34. package/src/auth-key.ts +0 -262
  35. package/src/backlinks-client.ts +0 -85
  36. package/src/brand-dna-calendar.ts +0 -120
  37. package/src/brand-icons.ts +0 -138
  38. package/src/built-in-locations.ts +0 -170
  39. package/src/content-ai-arsenal.ts +0 -268
  40. package/src/copy-frameworks-master.ts +0 -89
  41. package/src/cro-copywriting-engine.ts +0 -105
  42. package/src/crosslink-scorer.ts +0 -101
  43. package/src/embeddable-seo-widget.ts +0 -57
  44. package/src/engine.test.ts +0 -386
  45. package/src/engine.ts +0 -813
  46. package/src/existing-media-harvester.ts +0 -98
  47. package/src/extended-schemas.ts +0 -589
  48. package/src/features-knowledge-harvester.ts +0 -190
  49. package/src/free-public-tools.ts +0 -224
  50. package/src/geo-mesh-linking.ts +0 -93
  51. package/src/google-business-profile.ts +0 -280
  52. package/src/i18n-detector.ts +0 -98
  53. package/src/i18n-dictionary.ts +0 -422
  54. package/src/index.ts +0 -164
  55. package/src/indexnow-client.ts +0 -94
  56. package/src/instant-matrix-search.ts +0 -48
  57. package/src/isr-cache-manager.ts +0 -78
  58. package/src/keyword-permutator.ts +0 -118
  59. package/src/knowledge-bank-builder.ts +0 -299
  60. package/src/knowledge-graph-linker.ts +0 -81
  61. package/src/lago-token-meter.ts +0 -120
  62. package/src/legal-disclaimers.ts +0 -407
  63. package/src/llm-content-cleaner.ts +0 -64
  64. package/src/llm-prompt.ts +0 -323
  65. package/src/master-marketing-engine.ts +0 -314
  66. package/src/matrix-engine.ts +0 -1204
  67. package/src/mcp-seo-server.ts +0 -108
  68. package/src/ngram-density-analyzer.ts +0 -108
  69. package/src/og-image-generator.ts +0 -109
  70. package/src/power-words-psychology.ts +0 -369
  71. package/src/public-manifest-engine.ts +0 -109
  72. package/src/rag-knowledge-engine.ts +0 -163
  73. package/src/rank-math-parity.ts +0 -235
  74. package/src/rate-limited-translator.ts +0 -110
  75. package/src/real-reviews-sync.ts +0 -207
  76. package/src/rss-syndication-feed.ts +0 -56
  77. package/src/schema-builder.ts +0 -134
  78. package/src/seo-opportunities-decay.ts +0 -154
  79. package/src/serp-client.ts +0 -89
  80. package/src/serp-history-alerts.ts +0 -75
  81. package/src/site-auditor.ts +0 -83
  82. package/src/site-crawler.ts +0 -406
  83. package/src/slug-engine.ts +0 -183
  84. package/src/social-ads-seo.ts +0 -211
  85. package/src/social-growth-suite.ts +0 -310
  86. package/src/social-trend-seo.ts +0 -103
  87. package/src/social-video-seo.ts +0 -100
  88. package/src/team-rbac.ts +0 -61
  89. package/src/technical-rules-auditor.ts +0 -171
  90. package/src/token-quota-manager.ts +0 -91
  91. package/src/types.ts +0 -143
  92. package/src/ui-icons.ts +0 -134
  93. package/src/urlytics-engine.ts +0 -97
  94. package/src/video-youtube-analyzer.ts +0 -81
  95. package/src/yoast-parity.ts +0 -161
  96. package/tsconfig.json +0 -15
@@ -1,1204 +0,0 @@
1
- /**
2
- * Global Multilingual Programmatic SEO Matrix Engine
3
- * Defaults to English with international localization support across 10+ languages (EN, FR, DE, ES, IT, PT, NL, etc.)
4
- *
5
- * Implements strict SEO golden rules:
6
- * - Clean canonical URL paths (no keyword stuttering, no stop words across 10+ languages)
7
- * - Anti-cannibalization target clustering
8
- * - Google Rich Result Schema.org Graphs (SoftwareApplication, LocalBusiness, HowTo, FAQ, Breadcrumbs)
9
- * - SeedRank legal compliance disclaimers & staleness checks
10
- * - Tiered Indexing (crawl budget protection) & Geodesic Mesh Linking
11
- */
12
-
13
- import { cleanSeoSlug } from "./slug-engine";
14
- import { LegalDisclaimerEngine } from "./legal-disclaimers";
15
- import { ExtendedSchemaGraphBuilder } from "./extended-schemas";
16
- import { resolveBuiltInLocations } from "./built-in-locations";
17
- import { OgImageGenerator } from "./og-image-generator";
18
- import { TokenQuotaManager, type TokenUsageRecord } from "./token-quota-manager";
19
-
20
- export type MatrixFamily =
21
- | "local-geo"
22
- | "vs-comparison"
23
- | "alternative"
24
- | "pricing"
25
- | "target"
26
- | "industry"
27
- | "persona"
28
- | "integration"
29
- | "use-case"
30
- | "template"
31
- | "glossary"
32
- | "calculator";
33
-
34
- export interface PseoService {
35
- slug: string;
36
- name: string;
37
- category: string;
38
- description: string;
39
- keyFeatures: string[];
40
- priceMonthly?: number;
41
- }
42
-
43
- export interface PseoLocation {
44
- slug: string;
45
- name: string;
46
- region: string;
47
- country: string;
48
- currency: string;
49
- currencySymbol: string;
50
- population?: number;
51
- latitude?: number;
52
- longitude?: number;
53
- neighborSlugs?: string[];
54
- }
55
-
56
- export interface PseoCompetitor {
57
- slug: string;
58
- name: string;
59
- category: string;
60
- drawbacks: string[];
61
- advantagesOver: string[];
62
- startingPrice?: number;
63
- pricingUrl?: string;
64
- lastVerifiedDate?: string;
65
- }
66
-
67
- export interface PseoTarget {
68
- slug: string;
69
- name: string;
70
- type: "industry" | "role";
71
- painPoints: string[];
72
- benefits: string[];
73
- workflowSteps?: string[];
74
- }
75
-
76
- export interface PseoIndustry {
77
- slug: string;
78
- name: string;
79
- category?: string;
80
- singular?: string;
81
- painPoints?: string[];
82
- benefits?: string[];
83
- }
84
-
85
- export interface PseoPersona {
86
- slug: string;
87
- role: string;
88
- department?: string;
89
- responsibilities?: string[];
90
- }
91
-
92
- export interface PseoIntegration {
93
- slug: string;
94
- name: string;
95
- category: string;
96
- syncFeatures: string[];
97
- }
98
-
99
- export interface PseoUseCase {
100
- slug: string;
101
- title: string;
102
- problem: string;
103
- solutionWorkflow: string[];
104
- expectedRoi: string;
105
- }
106
-
107
- export interface PseoTemplate {
108
- slug: string;
109
- title: string;
110
- topic: string;
111
- format: "excel" | "sheets" | "notion" | "word" | "pdf";
112
- downloadUrl?: string;
113
- benefits: string[];
114
- }
115
-
116
- export interface PseoGlossaryTerm {
117
- slug: string;
118
- term: string;
119
- shortDefinition: string;
120
- fullMarkdown?: string;
121
- relatedTermsSlugs?: string[];
122
- }
123
-
124
- export interface PseoCalculator {
125
- slug: string;
126
- title: string;
127
- formulaDescription: string;
128
- savingsMetric: string;
129
- inputs?: string[];
130
- }
131
-
132
- export interface SchemaOrgGraph {
133
- "@context": "https://schema.org";
134
- "@graph": Record<string, unknown>[];
135
- }
136
-
137
- export interface GeneratedPageMeta {
138
- matrixFamily: MatrixFamily;
139
- urlPath: string;
140
- canonicalUrl: string;
141
- title: string;
142
- description: string;
143
- h1: string;
144
- robots: "index, follow" | "noindex, follow";
145
- schemaGraph: SchemaOrgGraph;
146
- disclaimerText?: string;
147
- ogImageUrl?: string;
148
- neighboringLinks?: { name: string; url: string }[];
149
- service?: PseoService;
150
- location?: PseoLocation;
151
- competitor?: PseoCompetitor;
152
- target?: PseoTarget;
153
- integration?: PseoIntegration;
154
- useCase?: PseoUseCase;
155
- template?: PseoTemplate;
156
- glossary?: PseoGlossaryTerm;
157
- calculator?: PseoCalculator;
158
- }
159
-
160
- export interface MatrixOptions {
161
- brandName: string;
162
- language?: string; // Default: "en", supports "fr", "de", "es", "pt", "it", etc.
163
- languages?: string[]; // Array of supported site languages (e.g. ["fr", "en", "es"])
164
- countries?: string[] | string; // e.g. ["france", "spain"] or "europe" or "international"
165
- territories?: string[] | string; // Alias for countries
166
- cleanDirectRoutes?: boolean; // When true (default), eliminates parasite words (/solutions/, etc.) for direct /{service}/{city}
167
- enableFreeTools?: boolean; // When true (default), auto-generates 5 high-converting interactive tools like Ahrefs
168
- minPopulationToIndex?: number;
169
- defaultCurrency?: string;
170
- defaultCurrencySymbol?: string;
171
- organizationSameAs?: string[];
172
- correctionsEmail?: string;
173
- }
174
-
175
- export class PseoMatrixEngine {
176
- private legalEngine: LegalDisclaimerEngine;
177
-
178
- constructor(legalOptions?: { correctionsEmail?: string; companyName?: string; language?: string }) {
179
- this.legalEngine = new LegalDisclaimerEngine({
180
- companyName: legalOptions?.companyName || "Our Platform",
181
- correctionsEmail: legalOptions?.correctionsEmail || "compliance@platform.com",
182
- language: legalOptions?.language || "en",
183
- });
184
- }
185
-
186
- /**
187
- * Helper: Resolves route prefixes according to language (English default).
188
- */
189
- private getPrefix(family: string, lang: string = "en"): string {
190
- if (lang === "fr") {
191
- const frMap: Record<string, string> = {
192
- vs: "/comparatif",
193
- alternative: "/alternatives",
194
- pricing: "/tarifs",
195
- target: "/pour",
196
- integration: "/integrations",
197
- useCase: "/cas-usage",
198
- template: "/modeles",
199
- glossary: "/glossaire",
200
- calculator: "/outils",
201
- solutions: "/solutions",
202
- };
203
- return frMap[family] || `/${family}`;
204
- }
205
-
206
- if (lang === "de") {
207
- const deMap: Record<string, string> = {
208
- vs: "/vergleich",
209
- alternative: "/alternativen",
210
- pricing: "/preise",
211
- target: "/fuer",
212
- integration: "/integrationen",
213
- useCase: "/anwendungsfaelle",
214
- template: "/vorlagen",
215
- glossary: "/glossar",
216
- calculator: "/rechner",
217
- solutions: "/loesungen",
218
- };
219
- return deMap[family] || `/${family}`;
220
- }
221
-
222
- if (lang === "es") {
223
- const esMap: Record<string, string> = {
224
- vs: "/comparativa",
225
- alternative: "/alternativas",
226
- pricing: "/precios",
227
- target: "/para",
228
- integration: "/integraciones",
229
- useCase: "/casos-uso",
230
- template: "/plantillas",
231
- glossary: "/glosario",
232
- calculator: "/herramientas",
233
- solutions: "/soluciones",
234
- };
235
- return esMap[family] || `/${family}`;
236
- }
237
-
238
- // English Default
239
- const enMap: Record<string, string> = {
240
- vs: "/vs",
241
- alternative: "/alternatives",
242
- pricing: "/pricing",
243
- target: "/for",
244
- integration: "/integrations",
245
- useCase: "/use-cases",
246
- template: "/templates",
247
- glossary: "/glossary",
248
- calculator: "/tools",
249
- solutions: "/solutions",
250
- };
251
- return enMap[family] || `/${family}`;
252
- }
253
-
254
- /**
255
- * 1. Local & GEO Matrix (`/solutions/{service}/{country}/{city}`)
256
- */
257
- generateLocalGeoMatrix(
258
- domain: string,
259
- services: PseoService[],
260
- locations: PseoLocation[],
261
- options: MatrixOptions,
262
- ): GeneratedPageMeta[] {
263
- const cleanDomain = domain.replace(/\/+$/, "");
264
- const lang = options.language || "en";
265
- const minPop = options.minPopulationToIndex ?? 15_000;
266
- const pages: GeneratedPageMeta[] = [];
267
- const locMap = new Map(locations.map((l) => [l.slug, l]));
268
- const prefix = this.getPrefix("solutions", lang);
269
-
270
- for (const s of services) {
271
- for (const loc of locations) {
272
- const countryCode = cleanSeoSlug(loc.country, { language: lang });
273
- const citySlug = cleanSeoSlug(loc.slug, { language: lang });
274
- const serviceSlug = cleanSeoSlug(s.slug, { language: lang });
275
-
276
- // Zero parasite words: Direct /{service}/{city} or /{service}/{country}/{city} if specified
277
- const urlPath = options.cleanDirectRoutes !== false
278
- ? `/${serviceSlug}/${citySlug}`
279
- : `${prefix}/${serviceSlug}/${countryCode}/${citySlug}`;
280
- const fullUrl = `${cleanDomain}${urlPath}`;
281
-
282
- const isIndexed = (loc.population ?? 20_000) >= minPop;
283
- const robots: "index, follow" | "noindex, follow" = isIndexed
284
- ? "index, follow"
285
- : "noindex, follow";
286
-
287
- const title = `${s.name} in ${loc.name} (${loc.region}) — ${options.brandName}`;
288
- const description = `Discover ${s.name} software tailored for businesses in ${loc.name}, ${loc.country}. Fast setup, local support in ${loc.currencySymbol}.`;
289
- const h1 = `${s.name} for Professionals in ${loc.name}`;
290
-
291
- const neighborLinks = (loc.neighborSlugs || [])
292
- .map((slug) => locMap.get(slug))
293
- .filter((n): n is PseoLocation => Boolean(n))
294
- .map((n) => ({
295
- name: n.name,
296
- url: `${cleanDomain}${prefix}/${serviceSlug}/${cleanSeoSlug(n.country, { language: lang })}/${cleanSeoSlug(n.slug, { language: lang })}`,
297
- }));
298
-
299
- const schemaGraph: SchemaOrgGraph = {
300
- "@context": "https://schema.org",
301
- "@graph": [
302
- ExtendedSchemaGraphBuilder.buildSoftwareApplication({
303
- name: `${options.brandName} — ${s.name} ${loc.name}`,
304
- description,
305
- url: fullUrl,
306
- priceMonthly: s.priceMonthly,
307
- currency: loc.currency,
308
- }),
309
- ExtendedSchemaGraphBuilder.buildLocalBusiness({
310
- name: `${options.brandName} ${loc.name}`,
311
- url: fullUrl,
312
- city: loc.name,
313
- region: loc.region,
314
- country: loc.country,
315
- latitude: loc.latitude,
316
- longitude: loc.longitude,
317
- }),
318
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
319
- { name: "Home", url: cleanDomain },
320
- { name: "Solutions", url: `${cleanDomain}${prefix}` },
321
- { name: s.name, url: `${cleanDomain}${prefix}/${serviceSlug}` },
322
- { name: loc.name, url: fullUrl },
323
- ]),
324
- ],
325
- };
326
-
327
- pages.push({
328
- matrixFamily: "local-geo",
329
- urlPath,
330
- canonicalUrl: fullUrl,
331
- title,
332
- description,
333
- h1,
334
- robots,
335
- schemaGraph,
336
- neighboringLinks: neighborLinks,
337
- service: s,
338
- location: loc,
339
- });
340
- }
341
- }
342
- return pages;
343
- }
344
-
345
- /**
346
- * 2. VS Comparisons Matrix (`/vs/{competitor}` in English default)
347
- */
348
- generateVsMatrix(
349
- domain: string,
350
- competitors: PseoCompetitor[],
351
- options: MatrixOptions,
352
- ): GeneratedPageMeta[] {
353
- const cleanDomain = domain.replace(/\/+$/, "");
354
- const lang = options.language || "en";
355
- const prefix = this.getPrefix("vs", lang);
356
-
357
- return competitors.map((comp) => {
358
- const compSlug = cleanSeoSlug(comp.slug, { language: lang });
359
- const urlPath = `${prefix}/${compSlug}`;
360
- const fullUrl = `${cleanDomain}${urlPath}`;
361
- const title = `${options.brandName} vs ${comp.name} Comparison & Key Differences`;
362
- const description = `In-depth comparison between ${options.brandName} and ${comp.name}. Features, pricing transparency, and architectural differences.`;
363
- const h1 = `${options.brandName} vs ${comp.name} : The Complete Comparison`;
364
- const disclaimerText = this.legalEngine.getDisclaimer("comparison", comp.lastVerifiedDate, lang);
365
-
366
- const schemaGraph: SchemaOrgGraph = {
367
- "@context": "https://schema.org",
368
- "@graph": [
369
- ExtendedSchemaGraphBuilder.buildOrganization({
370
- name: options.brandName,
371
- url: cleanDomain,
372
- sameAs: options.organizationSameAs,
373
- }),
374
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
375
- { name: "Home", url: cleanDomain },
376
- { name: "Comparisons", url: `${cleanDomain}${prefix}` },
377
- { name: `vs ${comp.name}`, url: fullUrl },
378
- ]),
379
- ],
380
- };
381
-
382
- return {
383
- matrixFamily: "vs-comparison",
384
- urlPath,
385
- canonicalUrl: fullUrl,
386
- title,
387
- description,
388
- h1,
389
- robots: "index, follow",
390
- disclaimerText,
391
- schemaGraph,
392
- competitor: comp,
393
- };
394
- });
395
- }
396
-
397
- /**
398
- * 3. Alternatives Matrix (`/alternatives/{competitor}`)
399
- */
400
- generateAlternativesMatrix(
401
- domain: string,
402
- competitors: PseoCompetitor[],
403
- options: MatrixOptions,
404
- ): GeneratedPageMeta[] {
405
- const cleanDomain = domain.replace(/\/+$/, "");
406
- const lang = options.language || "en";
407
- const prefix = this.getPrefix("alternative", lang);
408
-
409
- return competitors.map((comp) => {
410
- const compSlug = cleanSeoSlug(comp.slug, { language: lang });
411
- const urlPath = `${prefix}/${compSlug}`;
412
- const fullUrl = `${cleanDomain}${urlPath}`;
413
- const title = `Best ${comp.name} Alternative — ${options.brandName}`;
414
- const description = `Looking for a modern alternative to ${comp.name}? Explore why teams migrate to ${options.brandName}.`;
415
- const h1 = `Why ${options.brandName} is the Best Alternative to ${comp.name}`;
416
- const disclaimerText = this.legalEngine.getDisclaimer("alternative", comp.lastVerifiedDate, lang);
417
-
418
- const schemaGraph: SchemaOrgGraph = {
419
- "@context": "https://schema.org",
420
- "@graph": [
421
- ExtendedSchemaGraphBuilder.buildSoftwareApplication({
422
- name: `${options.brandName} — Alternative to ${comp.name}`,
423
- description,
424
- url: fullUrl,
425
- }),
426
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
427
- { name: "Home", url: cleanDomain },
428
- { name: "Alternatives", url: `${cleanDomain}${prefix}` },
429
- { name: comp.name, url: fullUrl },
430
- ]),
431
- ],
432
- };
433
-
434
- return {
435
- matrixFamily: "alternative",
436
- urlPath,
437
- canonicalUrl: fullUrl,
438
- title,
439
- description,
440
- h1,
441
- robots: "index, follow",
442
- disclaimerText,
443
- schemaGraph,
444
- competitor: comp,
445
- };
446
- });
447
- }
448
-
449
- /**
450
- * 4. Pricing Matrix (`/pricing/{competitor}` in English default)
451
- */
452
- generatePricingMatrix(
453
- domain: string,
454
- competitors: PseoCompetitor[],
455
- options: MatrixOptions,
456
- ): GeneratedPageMeta[] {
457
- const cleanDomain = domain.replace(/\/+$/, "");
458
- const lang = options.language || "en";
459
- const prefix = this.getPrefix("pricing", lang);
460
-
461
- return competitors.map((comp) => {
462
- const compSlug = cleanSeoSlug(comp.slug, { language: lang });
463
- const urlPath = `${prefix}/${compSlug}`;
464
- const fullUrl = `${cleanDomain}${urlPath}`;
465
- const title = `${comp.name} Pricing & Cost Breakdown — ${options.brandName}`;
466
- const description = `Detailed ${comp.name} pricing guide. Tiers, hidden fees, add-on costs, and how it compares to ${options.brandName}.`;
467
- const h1 = `${comp.name} Pricing, Plans & Hidden Costs`;
468
- const disclaimerText = this.legalEngine.getDisclaimer("pricing", comp.lastVerifiedDate, lang);
469
-
470
- const schemaGraph: SchemaOrgGraph = {
471
- "@context": "https://schema.org",
472
- "@graph": [
473
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
474
- { name: "Home", url: cleanDomain },
475
- { name: "Pricing Guides", url: `${cleanDomain}${prefix}` },
476
- { name: `${comp.name} Pricing`, url: fullUrl },
477
- ]),
478
- ],
479
- };
480
-
481
- return {
482
- matrixFamily: "pricing",
483
- urlPath,
484
- canonicalUrl: fullUrl,
485
- title,
486
- description,
487
- h1,
488
- robots: "index, follow",
489
- disclaimerText,
490
- schemaGraph,
491
- competitor: comp,
492
- };
493
- });
494
- }
495
-
496
- /**
497
- * 5. Unified Target Audience Matrix (`/for/{target}` in English default)
498
- */
499
- generateTargetMatrix(
500
- domain: string,
501
- targets: PseoTarget[],
502
- options: MatrixOptions,
503
- ): GeneratedPageMeta[] {
504
- const cleanDomain = domain.replace(/\/+$/, "");
505
- const lang = options.language || "en";
506
- const prefix = this.getPrefix("target", lang);
507
-
508
- return targets.map((t) => {
509
- const targetSlug = cleanSeoSlug(t.slug, { language: lang });
510
- const urlPath = `${prefix}/${targetSlug}`;
511
- const fullUrl = `${cleanDomain}${urlPath}`;
512
- const title = `${options.brandName} for ${t.name} — Dedicated Solution`;
513
- const description = `Streamline operations and automate workflows designed specifically for ${t.name}.`;
514
- const h1 = `The Operating System Designed for ${t.name}`;
515
-
516
- const schemaGraph: SchemaOrgGraph = {
517
- "@context": "https://schema.org",
518
- "@graph": [
519
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
520
- { name: "Home", url: cleanDomain },
521
- { name: "Solutions", url: `${cleanDomain}${prefix}` },
522
- { name: t.name, url: fullUrl },
523
- ]),
524
- ],
525
- };
526
-
527
- return {
528
- matrixFamily: "target",
529
- urlPath,
530
- canonicalUrl: fullUrl,
531
- title,
532
- description,
533
- h1,
534
- robots: "index, follow",
535
- schemaGraph,
536
- target: t,
537
- };
538
- });
539
- }
540
-
541
- /**
542
- * 6. Integrations Matrix (`/integrations/{software}`)
543
- */
544
- generateIntegrationMatrix(
545
- domain: string,
546
- integrations: PseoIntegration[],
547
- options: MatrixOptions,
548
- ): GeneratedPageMeta[] {
549
- const cleanDomain = domain.replace(/\/+$/, "");
550
- const lang = options.language || "en";
551
- const prefix = this.getPrefix("integration", lang);
552
-
553
- return integrations.map((itg) => {
554
- const itgSlug = cleanSeoSlug(itg.slug, { language: lang });
555
- const urlPath = `${prefix}/${itgSlug}`;
556
- const fullUrl = `${cleanDomain}${urlPath}`;
557
- const title = `${options.brandName} & ${itg.name} Integration : 2-Way Sync`;
558
- const description = `Connect ${options.brandName} with ${itg.name} to automate workflows and sync data without code.`;
559
- const h1 = `${options.brandName} × ${itg.name} Native Integration`;
560
-
561
- const schemaGraph: SchemaOrgGraph = {
562
- "@context": "https://schema.org",
563
- "@graph": [
564
- ExtendedSchemaGraphBuilder.buildSoftwareApplication({
565
- name: `${options.brandName} ${itg.name} Connector`,
566
- description,
567
- url: fullUrl,
568
- category: "IntegrationApplication",
569
- }),
570
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
571
- { name: "Home", url: cleanDomain },
572
- { name: "Integrations", url: `${cleanDomain}${prefix}` },
573
- { name: itg.name, url: fullUrl },
574
- ]),
575
- ],
576
- };
577
-
578
- return {
579
- matrixFamily: "integration",
580
- urlPath,
581
- canonicalUrl: fullUrl,
582
- title,
583
- description,
584
- h1,
585
- robots: "index, follow",
586
- schemaGraph,
587
- integration: itg,
588
- };
589
- });
590
- }
591
-
592
- /**
593
- * 7. Use Cases Matrix (`/use-cases/{useCase}` in English default)
594
- */
595
- generateUseCaseMatrix(
596
- domain: string,
597
- useCases: PseoUseCase[],
598
- options: MatrixOptions,
599
- ): GeneratedPageMeta[] {
600
- const cleanDomain = domain.replace(/\/+$/, "");
601
- const lang = options.language || "en";
602
- const prefix = this.getPrefix("useCase", lang);
603
-
604
- return useCases.map((uc) => {
605
- const ucSlug = cleanSeoSlug(uc.slug, { language: lang });
606
- const urlPath = `${prefix}/${ucSlug}`;
607
- const fullUrl = `${cleanDomain}${urlPath}`;
608
- const title = `${uc.title} : Step-by-Step Guide with ${options.brandName}`;
609
- const description = `Operational playbook: ${uc.problem}. Discover how to solve and automate this with ${options.brandName}.`;
610
- const h1 = `${uc.title} — Automation Workflow`;
611
-
612
- const schemaGraph: SchemaOrgGraph = {
613
- "@context": "https://schema.org",
614
- "@graph": [
615
- ExtendedSchemaGraphBuilder.buildHowTo({
616
- name: uc.title,
617
- description: uc.problem,
618
- steps: uc.solutionWorkflow,
619
- }),
620
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
621
- { name: "Home", url: cleanDomain },
622
- { name: "Use Cases", url: `${cleanDomain}${prefix}` },
623
- { name: uc.title, url: fullUrl },
624
- ]),
625
- ],
626
- };
627
-
628
- return {
629
- matrixFamily: "use-case",
630
- urlPath,
631
- canonicalUrl: fullUrl,
632
- title,
633
- description,
634
- h1,
635
- robots: "index, follow",
636
- schemaGraph,
637
- useCase: uc,
638
- };
639
- });
640
- }
641
-
642
- /**
643
- * 8. Templates & Lead Magnets Matrix (`/templates/{slug}` in English default)
644
- */
645
- generateTemplateMatrix(
646
- domain: string,
647
- templates: PseoTemplate[],
648
- options: MatrixOptions,
649
- ): GeneratedPageMeta[] {
650
- const cleanDomain = domain.replace(/\/+$/, "");
651
- const lang = options.language || "en";
652
- const prefix = this.getPrefix("template", lang);
653
-
654
- return templates.map((tmpl) => {
655
- const tmplSlug = cleanSeoSlug(tmpl.slug, { language: lang });
656
- const urlPath = `${prefix}/${tmplSlug}`;
657
- const fullUrl = `${cleanDomain}${urlPath}`;
658
- const title = `Free ${tmpl.title} (${tmpl.format.toUpperCase()}) — ${options.brandName}`;
659
- const description = `Download our free ${tmpl.title} template for ${tmpl.format.toUpperCase()}. Save time and automate your workflow.`;
660
- const h1 = `Free ${tmpl.title} Template`;
661
-
662
- const schemaGraph: SchemaOrgGraph = {
663
- "@context": "https://schema.org",
664
- "@graph": [
665
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
666
- { name: "Home", url: cleanDomain },
667
- { name: "Templates", url: `${cleanDomain}${prefix}` },
668
- { name: tmpl.title, url: fullUrl },
669
- ]),
670
- ],
671
- };
672
-
673
- return {
674
- matrixFamily: "template",
675
- urlPath,
676
- canonicalUrl: fullUrl,
677
- title,
678
- description,
679
- h1,
680
- robots: "index, follow",
681
- schemaGraph,
682
- template: tmpl,
683
- };
684
- });
685
- }
686
-
687
- /**
688
- * 9. Glossary Matrix (`/glossary/{term}` in English default)
689
- */
690
- generateGlossaryMatrix(
691
- domain: string,
692
- terms: PseoGlossaryTerm[],
693
- options: MatrixOptions,
694
- ): GeneratedPageMeta[] {
695
- const cleanDomain = domain.replace(/\/+$/, "");
696
- const lang = options.language || "en";
697
- const prefix = this.getPrefix("glossary", lang);
698
-
699
- return terms.map((g) => {
700
- const termSlug = cleanSeoSlug(g.slug, { language: lang });
701
- const urlPath = `${prefix}/${termSlug}`;
702
- const fullUrl = `${cleanDomain}${urlPath}`;
703
- const title = `What is ${g.term}? Definition & Best Practices — ${options.brandName}`;
704
- const description = `${g.shortDefinition.substring(0, 150)}... Learn the core concepts and implementation.`;
705
- const h1 = `${g.term} : Definition & Strategy`;
706
-
707
- const schemaGraph: SchemaOrgGraph = {
708
- "@context": "https://schema.org",
709
- "@graph": [
710
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
711
- { name: "Home", url: cleanDomain },
712
- { name: "Glossary", url: `${cleanDomain}${prefix}` },
713
- { name: g.term, url: fullUrl },
714
- ]),
715
- ],
716
- };
717
-
718
- return {
719
- matrixFamily: "glossary",
720
- urlPath,
721
- canonicalUrl: fullUrl,
722
- title,
723
- description,
724
- h1,
725
- robots: "index, follow",
726
- schemaGraph,
727
- glossary: g,
728
- };
729
- });
730
- }
731
-
732
- /**
733
- * 10. Tools & Calculators Matrix (`/tools/{calculator}` in English default)
734
- */
735
- generateCalculatorMatrix(
736
- domain: string,
737
- calculators: PseoCalculator[],
738
- options: MatrixOptions,
739
- ): GeneratedPageMeta[] {
740
- const cleanDomain = domain.replace(/\/+$/, "");
741
- const lang = options.language || "en";
742
- const prefix = this.getPrefix("calculator", lang);
743
-
744
- return calculators.map((calc) => {
745
- const calcSlug = cleanSeoSlug(calc.slug, { language: lang });
746
- const urlPath = `${prefix}/${calcSlug}`;
747
- const fullUrl = `${cleanDomain}${urlPath}`;
748
- const title = `${calc.title} Online Calculator — ${options.brandName}`;
749
- const description = `Free calculator: ${calc.formulaDescription}. Estimate your ${calc.savingsMetric} instantly.`;
750
- const h1 = `${calc.title} — Free Interactive Estimator`;
751
-
752
- const schemaGraph: SchemaOrgGraph = {
753
- "@context": "https://schema.org",
754
- "@graph": [
755
- ExtendedSchemaGraphBuilder.buildSoftwareApplication({
756
- name: calc.title,
757
- description,
758
- url: fullUrl,
759
- }),
760
- ExtendedSchemaGraphBuilder.buildBreadcrumbs([
761
- { name: "Home", url: cleanDomain },
762
- { name: "Calculators", url: `${cleanDomain}${prefix}` },
763
- { name: calc.title, url: fullUrl },
764
- ]),
765
- ],
766
- };
767
-
768
- return {
769
- matrixFamily: "calculator",
770
- urlPath,
771
- canonicalUrl: fullUrl,
772
- title,
773
- description,
774
- h1,
775
- robots: "index, follow",
776
- schemaGraph,
777
- calculator: calc,
778
- };
779
- });
780
- }
781
-
782
- /**
783
- * Master Generator: Produces all programmatic families simultaneously.
784
- */
785
- generateAllMatrices(
786
- domain: string,
787
- data: {
788
- services?: PseoService[];
789
- locations?: PseoLocation[];
790
- competitors?: PseoCompetitor[];
791
- targets?: PseoTarget[];
792
- integrations?: PseoIntegration[];
793
- useCases?: PseoUseCase[];
794
- templates?: PseoTemplate[];
795
- glossaryTerms?: PseoGlossaryTerm[];
796
- calculators?: PseoCalculator[];
797
- },
798
- options: MatrixOptions,
799
- ): GeneratedPageMeta[] {
800
- const allPages: GeneratedPageMeta[] = [];
801
-
802
- if (data.services) {
803
- const locs = data.locations && data.locations.length > 0
804
- ? data.locations
805
- : resolveBuiltInLocations(options.countries || options.territories || options.language || "fr");
806
- allPages.push(...this.generateLocalGeoMatrix(domain, data.services, locs, options));
807
- }
808
- if (data.competitors) {
809
- allPages.push(...this.generateVsMatrix(domain, data.competitors, options));
810
- allPages.push(...this.generateAlternativesMatrix(domain, data.competitors, options));
811
- allPages.push(...this.generatePricingMatrix(domain, data.competitors, options));
812
- }
813
- if (data.targets) {
814
- allPages.push(...this.generateTargetMatrix(domain, data.targets, options));
815
- }
816
- if (data.integrations) {
817
- allPages.push(...this.generateIntegrationMatrix(domain, data.integrations, options));
818
- }
819
- if (data.useCases) {
820
- allPages.push(...this.generateUseCaseMatrix(domain, data.useCases, options));
821
- }
822
- if (data.templates) {
823
- allPages.push(...this.generateTemplateMatrix(domain, data.templates, options));
824
- }
825
- if (data.glossaryTerms) {
826
- allPages.push(...this.generateGlossaryMatrix(domain, data.glossaryTerms, options));
827
- }
828
- if (data.calculators) {
829
- allPages.push(...this.generateCalculatorMatrix(domain, data.calculators, options));
830
- } else if (options.enableFreeTools !== false) {
831
- const defaultCalculators: PseoCalculator[] = [
832
- {
833
- slug: "serp-preview-simulator",
834
- title: "Google SERP Snippet Preview & CTR Simulator",
835
- formulaDescription: "Simulate desktop and mobile Google search appearance and optimize CTR",
836
- savingsMetric: "Search Click-Through Rate",
837
- inputs: ["pageTitle", "metaDescription", "targetKeyword"],
838
- },
839
- {
840
- slug: "roi-calculator",
841
- title: "Automation ROI & Time-Saved Calculator",
842
- formulaDescription: "Calculate weekly operational hours recovered and monthly budget saved",
843
- savingsMetric: "Monthly Net Financial Savings",
844
- inputs: ["hoursSpentWeekly", "hourlyRate", "teamMembers"],
845
- },
846
- {
847
- slug: "seo-slug-generator",
848
- title: "SEO URL Slug Cleaner & Optimizer",
849
- formulaDescription: "Strip stop words, dates, and noise characters for high-CTR clean URLs",
850
- savingsMetric: "URL Cleanliness & Readability",
851
- inputs: ["rawTitle", "language"],
852
- },
853
- {
854
- slug: "keyword-density-checker",
855
- title: "Live Keyword Density & Readability Analyzer",
856
- formulaDescription: "Analyze n-gram frequency, reading time, and content depth",
857
- savingsMetric: "Content Optimization Score",
858
- inputs: ["articleText"],
859
- },
860
- ];
861
- allPages.push(...this.generateCalculatorMatrix(domain, defaultCalculators, options));
862
- }
863
-
864
- for (const p of allPages) {
865
- if (!p.ogImageUrl) {
866
- p.ogImageUrl = OgImageGenerator.generateOgImageUrl(domain, p, options.brandName);
867
- }
868
- }
869
-
870
- return allPages;
871
- }
872
-
873
- /**
874
- * Resolves a single page route in RAM in < 0.05ms.
875
- * Matches string path or Next.js slug array.
876
- */
877
- resolvePage(
878
- slugOrPath: string | string[],
879
- domain: string,
880
- data: {
881
- services?: PseoService[];
882
- locations?: PseoLocation[];
883
- competitors?: PseoCompetitor[];
884
- targets?: PseoTarget[];
885
- integrations?: PseoIntegration[];
886
- useCases?: PseoUseCase[];
887
- templates?: PseoTemplate[];
888
- glossaryTerms?: PseoGlossaryTerm[];
889
- calculators?: PseoCalculator[];
890
- },
891
- options: MatrixOptions,
892
- ): GeneratedPageMeta | undefined {
893
- const path = typeof slugOrPath === "string"
894
- ? (slugOrPath.startsWith("/") ? slugOrPath : `/${slugOrPath}`)
895
- : `/${slugOrPath.join("/")}`;
896
-
897
- const pages = this.generateAllMatrices(domain, data, options);
898
- return pages.find((p) => p.urlPath === path);
899
- }
900
-
901
- /**
902
- * Generates a fully formatted XML Sitemap string.
903
- */
904
- generateSitemapXml(
905
- domain: string,
906
- data: Parameters<PseoMatrixEngine["generateAllMatrices"]>[1],
907
- options: MatrixOptions,
908
- ): string {
909
- const pages = this.generateAllMatrices(domain, data, options).filter((p) => p.robots.includes("index"));
910
- const now = new Date().toISOString();
911
-
912
- const urls = pages
913
- .map(
914
- (p) => ` <url>
915
- <loc>${p.canonicalUrl}</loc>
916
- <lastmod>${now}</lastmod>
917
- <changefreq>weekly</changefreq>
918
- <priority>0.8</priority>
919
- </url>`,
920
- )
921
- .join("\n");
922
-
923
- return `<?xml version="1.0" encoding="UTF-8"?>
924
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
925
- ${urls}
926
- </urlset>`;
927
- }
928
-
929
- /**
930
- * Resolves a page for a specific module/service and city.
931
- * Useful when organizing code as app/[service]/[city]/page.tsx
932
- */
933
- resolveServicePage(
934
- serviceSlug: string,
935
- citySlug: string,
936
- domain: string,
937
- data: Parameters<PseoMatrixEngine["generateAllMatrices"]>[1],
938
- options: MatrixOptions,
939
- ): GeneratedPageMeta | undefined {
940
- const cleanService = cleanSeoSlug(serviceSlug, { language: options.language });
941
- const cleanCity = cleanSeoSlug(citySlug, { language: options.language });
942
- return this.resolvePage([cleanService, cleanCity], domain, data, options);
943
- }
944
-
945
- /**
946
- * Generates an official /llms.txt Markdown directory for AI search bots.
947
- */
948
- generateLlmsTxt(
949
- domain: string,
950
- data: Parameters<PseoMatrixEngine["generateAllMatrices"]>[1],
951
- options: MatrixOptions,
952
- ): string {
953
- const pages = this.generateAllMatrices(domain, data, options);
954
- const lines: string[] = [
955
- `# ${options.brandName} — AI Knowledge Graph & Page Hub`,
956
- `> Complete index of services, tools, integrations, and local solution hubs.`,
957
- "",
958
- `## Indexed Programmatic Hubs (${pages.length} Pages)`,
959
- ];
960
-
961
- for (const p of pages) {
962
- lines.push(`- [${p.h1}](${p.canonicalUrl}): ${p.description}`);
963
- }
964
-
965
- return lines.join("\n");
966
- }
967
-
968
- /**
969
- * Generates a modern robots.txt allowing search engines and AI agents with sitemap link.
970
- */
971
- generateRobotsTxt(
972
- domain: string,
973
- options?: { sitemapUrl?: string; allowAiBots?: boolean; disallowPaths?: string[] },
974
- ): string {
975
- const cleanDomain = domain.replace(/\/+$/, "");
976
- const sitemap = options?.sitemapUrl || `${cleanDomain}/sitemap.xml`;
977
- const disallows = options?.disallowPaths || ["/api/", "/admin/", "/private/"];
978
-
979
- const lines: string[] = [
980
- "User-agent: *",
981
- "Allow: /",
982
- ...disallows.map((d) => `Disallow: ${d}`),
983
- "",
984
- ];
985
-
986
- if (options?.allowAiBots !== false) {
987
- lines.push(
988
- "# AI Search Crawlers Optimization (AEO/GEO)",
989
- "User-agent: GPTBot",
990
- "Allow: /",
991
- "",
992
- "User-agent: ClaudeBot",
993
- "Allow: /",
994
- "",
995
- "User-agent: PerplexityBot",
996
- "Allow: /",
997
- "",
998
- "User-agent: Applebot",
999
- "Allow: /",
1000
- "",
1001
- );
1002
- }
1003
-
1004
- lines.push(`Sitemap: ${sitemap}`);
1005
- return lines.join("\n");
1006
- }
1007
-
1008
- /**
1009
- * 🏆 RENDER DEEP EDITORIAL MASTER PAGE (1,500+ WORDS ANTI-THIN-CONTENT)
1010
- * Assembles exhaustive, master-level editorial content combining direct answers,
1011
- * market context, architectural breakdowns, comparative matrices, step-by-step guides,
1012
- * localized economic statistics, and objection-handling FAQs.
1013
- */
1014
- renderDeepEditorialPage(params: {
1015
- serviceName: string;
1016
- locationName: string;
1017
- industryName?: string;
1018
- brandName?: string;
1019
- monthlyPrice?: number;
1020
- currencySymbol?: string;
1021
- sourceParagraphs?: string[];
1022
- enableAiSmartLinking?: boolean;
1023
- tier?: "starter" | "growth" | "enterprise";
1024
- }): {
1025
- title: string;
1026
- metaDescription: string;
1027
- markdown: string;
1028
- wordCount: number;
1029
- linksInjected: number;
1030
- tokensConsumed: number;
1031
- tokenUsage?: TokenUsageRecord;
1032
- } {
1033
- const brand = params.brandName || "LynxSEO Studio";
1034
- const service = params.serviceName;
1035
- const location = params.locationName;
1036
- const industry = params.industryName || "Professionnels & Entreprises";
1037
- const price = params.monthlyPrice || 49;
1038
- const currency = params.currencySymbol || "€";
1039
-
1040
- const serviceSlug = cleanSeoSlug(service);
1041
- const locationSlug = cleanSeoSlug(location);
1042
- const industrySlug = cleanSeoSlug(industry);
1043
-
1044
- const title = `${service} à ${location} : Guide Complet, Tarifs & Comparatif 2026`;
1045
- const metaDescription = `Découvrez la solution complète ${service} à ${location}. Économisez jusqu'à 15h/semaine avec notre système certifié. Tarifs dès ${price}${currency}/mois et comparatif complet.`;
1046
-
1047
- let linksInjected = 0;
1048
- let tokensConsumed = 0;
1049
- let tokenUsage: TokenUsageRecord | undefined;
1050
-
1051
- const extraParagraphs = (params.sourceParagraphs && params.sourceParagraphs.length > 0)
1052
- ? params.sourceParagraphs
1053
- : [
1054
- `L'adoption de solutions technologiques avancées à ${location} transforme en profondeur les opérations quotidiennes des ${industry}. En automatisant les processus répétitifs, les équipes se recentrent sur les missions à haute valeur ajoutée.`,
1055
- `Face à une concurrence accrue dans la région de ${location}, la rapidité d'exécution et la conformité aux normes réglementaires 2026 constituent désormais des facteurs décisifs de différenciation.`,
1056
- `Grâce à une infrastructure résiliente fonctionnant en mémoire vive, le déploiement s'effectue sans aucune rupture de service tout en garantissant une disponibilité permanente 24h/24 et 7j/7.`
1057
- ];
1058
-
1059
- let processedParagraph0 = extraParagraphs[0];
1060
- let processedParagraphs1to4 = extraParagraphs.slice(1, 4).join("\n\n");
1061
-
1062
- // 🔗 SMART CONTEXTUAL AI INTERNAL LINKING (Token Metered Option)
1063
- if (params.enableAiSmartLinking) {
1064
- linksInjected = 4;
1065
- tokensConsumed = 180; // Input & Output tokens consumed for contextual anchor resolution
1066
-
1067
- const tokenMeter = new TokenQuotaManager(params.tier || "enterprise");
1068
- tokenUsage = tokenMeter.consumeTokens(120, 60, "gpt-4o-mini", 0.0004);
1069
-
1070
- processedParagraph0 = `${processedParagraph0} Pour évaluer l'impact budgétaire exact, consultez notre [simulateur de rentabilité et calculateur de ROI](/outils/calculateur-roi) dédié aux ${industry}.`;
1071
- processedParagraphs1to4 = `${processedParagraphs1to4}\n\nRetrouvez également notre [matrice comparative complète](/comparatifs/${serviceSlug}-vs-alternatives) pour analyser les écarts de performance avec les outils traditionnels à [${location}](/villes/${locationSlug}).`;
1072
- }
1073
-
1074
- const markdown = `
1075
- # ${title}
1076
-
1077
- > **Résumé Exécutif (Direct Answer) :** La mise en place de **${service}** à **${location}** permet aux ${industry} d'automatiser 100% de leur flux opérationnel, de réduire leurs coûts de gestion de 35% et de garantir un temps de réponse inférieur à 3 secondes, dès ${price} ${currency} par mois.
1078
-
1079
- ---
1080
-
1081
- ## 1. 🛑 Contexte Économique & Défis Quotidiens à ${location}
1082
-
1083
- Dans un environnement économique de plus en plus exigeant à ${location}, les ${industry} doivent composer avec des contraintes multiples :
1084
-
1085
- * **Surcharge administrative récurrente :** La gestion manuelle des demandes et des dossiers mobilise jusqu'à 30% du temps de travail effectif.
1086
- * **Pertes d'opportunités commerciales :** À ${location}, 78% des prospects se tournent vers le concurrent qui répond le plus rapidement.
1087
- * **Exigences réglementaires 2026 :** La conformité légale, la sécurité des données et la traçabilité imposent des standards d'excellence rigoureux.
1088
-
1089
- ${processedParagraph0}
1090
-
1091
- ---
1092
-
1093
- ## 2. 🚀 L'Approche ${brand} : ${service} Nouvelle Génération
1094
-
1095
- ${brand} propose une architecture modulaire et sécurisée conçue spécifiquement pour répondre aux exigences des ${industry} à ${location} :
1096
-
1097
- ${processedParagraphs1to4}
1098
-
1099
- ### ✦ Les 4 Piliers Fondamentaux de la Solution :
1100
- 1. **Disponibilité Ininterrompue 24/7 :** Prise en charge immédiate des flux même en dehors des horaires de bureau.
1101
- 2. **Traitement en Mémoire Vive :** Vitesse de calcul et de réponse inférieure à 0.05 milliseconde pour une fluidité absolue.
1102
- 3. **Conformité & Sécurité Maximale :** Chiffrement intégral et respect rigoureux des standards de confidentialité.
1103
- 4. **Intégration Transparente :** Connexion directe avec vos outils métiers existants sans réapprentissage complexe.
1104
-
1105
- ---
1106
-
1107
- ## 3. ⚖️ Matrice Évaluative : ${service} vs Méthodes Traditionnelles
1108
-
1109
- | Critère d'Évaluation | Solution ${brand} | Gestion Manuelle / Outils Classiques |
1110
- | :--- | :--- | :--- |
1111
- | **Vitesse de Réponse** | ⚡ **< 3 secondes** (Instantané) | ⏳ 2 à 24 heures de délai moyen |
1112
- | **Disponibilité Opérationnelle** | 🌐 **24h/24 et 7j/7 en continu** | 🏢 Heures ouvrées uniquement |
1113
- | **Taux d'Erreur & Oublis** | 🛡️ **0% (Règles Déterministes)** | ⚠️ 12% d'erreurs constatées |
1114
- | **Rentabilité & ROI Annuel** | 📈 **Amorti dès le 1er mois** | 💸 Coûts fixes et salariaux élevés |
1115
- | **Évolutivité de Charge** | 🚀 **Jusqu'à 100 000 requêtes/sec** | 🛑 Saturation rapide des équipes |
1116
-
1117
- ---
1118
-
1119
- ## 4. 🛠️ Protocole de Déploiement en 3 Étapes à ${location}
1120
-
1121
- La mise en service de ${service} est conçue pour être immédiate et sans friction technique :
1122
-
1123
- 1. **Étape 1 — Activation & Connexion Instantanée (30s) :**
1124
- Initialisation de votre environnement dédié sans interruption de votre activité en cours.
1125
- 2. **Étape 2 — Paramétrage des Règles Métier pour ${industry} (2 min) :**
1126
- Sélection des modèles de workflows, des grilles tarifaires et des protocoles de communication propres à votre secteur.
1127
- 3. **Étape 3 — Mise en Production & Suivi des Performances :**
1128
- Vos clients et prospects à ${location} bénéficient instantanément du service, avec un tableau de bord analytique en temps réel.
1129
-
1130
- ---
1131
-
1132
- ## 5. 📊 Données Clés & Statistiques Sectorielles à ${location}
1133
-
1134
- * **+45%** de volume d'activité capté grâce à la réactivité immédiate.
1135
- * **15 heures** économisées chaque semaine par collaborateur sur les tâches répétitives.
1136
- * **98.4%** de taux de satisfaction client mesuré sur le secteur de ${location}.
1137
- * **ROI moyen constaté :** 1 420 ${currency} d'économies annuelles nettes pour une structure locale.
1138
-
1139
- ---
1140
-
1141
- ## 6. ❓ Foire Aux Questions & Réponses Officielles (FAQ)
1142
-
1143
- ### Quel est le coût exact de ${service} à ${location} ?
1144
- L'accès débute à partir de **${price} ${currency} par mois**, sans frais d'installation cachés ni engagement de durée contraignant.
1145
-
1146
- ### La solution est-elle compatible avec les spécificités de ${location} ?
1147
- Oui, toutes les règles géographiques, indicatifs locaux et particularités régionales de ${location} sont nativement intégrés.
1148
-
1149
- ### Combien de temps faut-il pour observer les premiers résultats ?
1150
- Les gains de productivité et la réactivité accrue sont mesurables dès les premières 24 heures suivant l'activation.
1151
-
1152
- ### Comment est assurée la sécurité et la confidentialité de nos données ?
1153
- Toutes les données sont traitées dans un environnement isolé conforme aux normes de sécurité les plus strictes avec chiffrement de bout en bout.
1154
-
1155
- ---
1156
-
1157
- ## 7. 📍 Rayonnement Géographique & Communes Voisines
1158
-
1159
- Notre couverture pour **${service}** s'étend à l'ensemble du bassin économique de **${location}** ainsi qu'aux communes limitrophes dans un rayon de 25 kilomètres.
1160
- `.trim();
1161
-
1162
- const wordCount = markdown.split(/\s+/).filter(Boolean).length;
1163
-
1164
- return {
1165
- title,
1166
- metaDescription,
1167
- markdown,
1168
- wordCount,
1169
- linksInjected,
1170
- tokensConsumed,
1171
- tokenUsage,
1172
- };
1173
- }
1174
-
1175
- /**
1176
- * Computes telemetry & page metering data for syncing with LynxSEO Studio dashboard.
1177
- */
1178
- getTelemetryPayload(
1179
- domain: string,
1180
- data: Parameters<PseoMatrixEngine["generateAllMatrices"]>[1],
1181
- options: MatrixOptions,
1182
- ) {
1183
- const pages = this.generateAllMatrices(domain, data, options);
1184
- const indexedPages = pages.filter((p) => p.robots.includes("index"));
1185
-
1186
- const matrixBreakdown: Record<string, number> = {};
1187
- for (const p of pages) {
1188
- matrixBreakdown[p.matrixFamily] = (matrixBreakdown[p.matrixFamily] || 0) + 1;
1189
- }
1190
-
1191
- return {
1192
- domain,
1193
- brandName: options.brandName,
1194
- language: options.language || "en",
1195
- languages: options.languages || [options.language || "en"],
1196
- totalPages: pages.length,
1197
- indexedPages: indexedPages.length,
1198
- servicesCount: data.services?.length ?? 0,
1199
- matrixBreakdown,
1200
- timestamp: new Date().toISOString(),
1201
- };
1202
- }
1203
- }
1204
-