@lynxflow/seo-engine 1.4.1 → 1.5.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 (85) hide show
  1. package/README.md +84 -339
  2. package/TUTORIEL_INTEGRATION_SITE.md +283 -0
  3. package/connectors/wordpress/lynxseo-connector.zip +0 -0
  4. package/dist/ad-intelligence-cro.d.ts +58 -0
  5. package/dist/ai-bots-log-analyzer.d.ts +36 -0
  6. package/dist/analytics-client.d.ts +48 -11
  7. package/dist/auth-key.d.ts +9 -0
  8. package/dist/brand-dna-calendar.d.ts +35 -0
  9. package/dist/copy-frameworks-master.d.ts +56 -0
  10. package/dist/cro-copywriting-engine.d.ts +46 -0
  11. package/dist/crosslink-scorer.d.ts +33 -0
  12. package/dist/embeddable-seo-widget.d.ts +12 -0
  13. package/dist/engine.d.ts +29 -1
  14. package/dist/engine.test.d.ts +1 -0
  15. package/dist/extended-schemas.d.ts +106 -0
  16. package/dist/geo-mesh-linking.d.ts +33 -0
  17. package/dist/index.d.ts +88 -0
  18. package/dist/index.js +4173 -128
  19. package/dist/index.mjs +4101 -98
  20. package/dist/instant-matrix-search.d.ts +19 -0
  21. package/dist/isr-cache-manager.d.ts +35 -0
  22. package/dist/knowledge-graph-linker.d.ts +29 -0
  23. package/dist/legal-disclaimers.d.ts +46 -0
  24. package/dist/llm-content-cleaner.d.ts +16 -0
  25. package/dist/llm-prompt.d.ts +13 -0
  26. package/dist/master-marketing-engine.d.ts +114 -0
  27. package/dist/matrix-engine.d.ts +201 -0
  28. package/dist/mcp-seo-server.d.ts +21 -0
  29. package/dist/ngram-density-analyzer.d.ts +35 -0
  30. package/dist/rank-math-parity.d.ts +58 -0
  31. package/dist/real-reviews-sync.d.ts +73 -0
  32. package/dist/rss-syndication-feed.d.ts +25 -0
  33. package/dist/schema-builder.d.ts +6 -0
  34. package/dist/seo-opportunities-decay.d.ts +54 -0
  35. package/dist/serp-history-alerts.d.ts +27 -0
  36. package/dist/slug-engine.d.ts +32 -0
  37. package/dist/social-ads-seo.d.ts +77 -0
  38. package/dist/social-growth-suite.d.ts +125 -0
  39. package/dist/social-trend-seo.d.ts +38 -0
  40. package/dist/social-video-seo.d.ts +62 -0
  41. package/dist/team-rbac.d.ts +17 -0
  42. package/dist/technical-rules-auditor.d.ts +50 -0
  43. package/dist/types.d.ts +4 -44
  44. package/dist/yoast-parity.d.ts +45 -0
  45. package/package.json +8 -5
  46. package/src/ad-intelligence-cro.ts +140 -0
  47. package/src/ai-bots-log-analyzer.ts +127 -0
  48. package/src/analytics-client.ts +222 -48
  49. package/src/auth-key.ts +59 -0
  50. package/src/brand-dna-calendar.ts +120 -0
  51. package/src/copy-frameworks-master.ts +89 -0
  52. package/src/cro-copywriting-engine.ts +105 -0
  53. package/src/crosslink-scorer.ts +101 -0
  54. package/src/embeddable-seo-widget.ts +57 -0
  55. package/src/engine.test.ts +136 -0
  56. package/src/engine.ts +218 -27
  57. package/src/extended-schemas.ts +279 -0
  58. package/src/geo-mesh-linking.ts +93 -0
  59. package/src/index.ts +89 -0
  60. package/src/instant-matrix-search.ts +48 -0
  61. package/src/isr-cache-manager.ts +78 -0
  62. package/src/knowledge-graph-linker.ts +81 -0
  63. package/src/legal-disclaimers.ts +407 -0
  64. package/src/llm-content-cleaner.ts +64 -0
  65. package/src/llm-prompt.ts +81 -0
  66. package/src/master-marketing-engine.ts +314 -0
  67. package/src/matrix-engine.ts +818 -0
  68. package/src/mcp-seo-server.ts +108 -0
  69. package/src/ngram-density-analyzer.ts +108 -0
  70. package/src/rank-math-parity.ts +235 -0
  71. package/src/real-reviews-sync.ts +207 -0
  72. package/src/rss-syndication-feed.ts +56 -0
  73. package/src/schema-builder.ts +71 -24
  74. package/src/seo-opportunities-decay.ts +154 -0
  75. package/src/serp-history-alerts.ts +75 -0
  76. package/src/slug-engine.ts +183 -0
  77. package/src/social-ads-seo.ts +211 -0
  78. package/src/social-growth-suite.ts +310 -0
  79. package/src/social-trend-seo.ts +103 -0
  80. package/src/social-video-seo.ts +100 -0
  81. package/src/team-rbac.ts +61 -0
  82. package/src/technical-rules-auditor.ts +171 -0
  83. package/src/types.ts +22 -47
  84. package/src/yoast-parity.ts +161 -0
  85. package/tsconfig.json +2 -1
@@ -0,0 +1,314 @@
1
+ /**
2
+ * 👑 Master Marketing Engine (LynxSEO × marketingskills)
3
+ *
4
+ * Implements the complete 50-Skill Marketing & Growth Architecture:
5
+ * 1. Directory Submissions Engine (ProductHunt, G2, AlternativeTo, Futurepedia, SaaSHub...)
6
+ * 2. Grand Slam Offer & Value Stack Builder (Alex Hormozi framework)
7
+ * 3. Viral Referral & Affiliate Growth Loops
8
+ * 4. Multi-Touch Attribution Engine (First, Last, Linear, W-Shaped)
9
+ * 5. Competitor Battlecards & Displacement Generator
10
+ * 6. Churn Prevention & Retention Engine
11
+ * 7. Onboarding & Lifecycle Drip Sequencer
12
+ */
13
+
14
+ export interface DirectorySubmissionProfile {
15
+ directoryName: string;
16
+ category: "tier1_launch" | "saas_directories" | "ai_directories" | "review_platforms";
17
+ submissionUrl: string;
18
+ domainRating: number;
19
+ dofollow: boolean;
20
+ requiredFields: {
21
+ title60Chars: string;
22
+ tagline: string;
23
+ shortDescription: string;
24
+ fullDescription: string;
25
+ tags: string[];
26
+ suggestedLandingPagePath: string;
27
+ };
28
+ }
29
+
30
+ export interface GrandSlamOffer {
31
+ productName: string;
32
+ dreamOutcome: string;
33
+ perceivedLikelihoodScore: number; // 1-10
34
+ timeDelayMinutes: number;
35
+ effortScore: number; // 1-10 (lower is better)
36
+ valueScore: number; // calculated
37
+ corePrice: number;
38
+ bonusStack: { title: string; perceivedValueEur: number; description: string }[];
39
+ totalPerceivedValueEur: number;
40
+ guaranteeText: string;
41
+ scarcityText: string;
42
+ }
43
+
44
+ export interface CompetitorBattlecard {
45
+ competitorName: string;
46
+ competitorPriceMonthly: number;
47
+ lynxSeoPriceMonthly: number;
48
+ annualSavingsEur: number;
49
+ keyWeaknessesToExploit: string[];
50
+ ourUnfairAdvantages: string[];
51
+ killerSwitchingArgument: string;
52
+ objectionHandlers: { objection: string; winningResponse: string }[];
53
+ }
54
+
55
+ export class MasterMarketingEngine {
56
+ /**
57
+ * 1. Generates 40+ customized directory submissions formatted for ProductHunt, G2, SaaSHub, Futurepedia...
58
+ */
59
+ static generateDirectoryListings(domain = "lynxintel.io", brandName = "LynxSEO"): DirectorySubmissionProfile[] {
60
+ return [
61
+ {
62
+ directoryName: "Product Hunt",
63
+ category: "tier1_launch",
64
+ submissionUrl: "https://www.producthunt.com/posts/new",
65
+ domainRating: 91,
66
+ dofollow: true,
67
+ requiredFields: {
68
+ title60Chars: `${brandName} — AI & Programmatic SEO in < 0.05ms`,
69
+ tagline: "Generate 500k landing pages & get cited by ChatGPT & Perplexity",
70
+ shortDescription: "Zero-database programmatic SEO engine that deploys 8 rich matrices with real-time AI bot tracking.",
71
+ fullDescription: `${brandName} is the all-in-one programmatic SEO and AI Search (GEO) platform. It solves the 8 programmatic matrices in-memory, injects Google Schema.org and .geo-direct-answer blocks, and tracks rankings and AI crawlers at zero extra tool cost.`,
72
+ tags: ["SEO", "Artificial Intelligence", "Marketing", "SaaS", "Developer Tools"],
73
+ suggestedLandingPagePath: `https://${domain}/?ref=producthunt`,
74
+ },
75
+ },
76
+ {
77
+ directoryName: "AlternativeTo",
78
+ category: "saas_directories",
79
+ submissionUrl: "https://alternativeto.net/software/submit/",
80
+ domainRating: 84,
81
+ dofollow: true,
82
+ requiredFields: {
83
+ title60Chars: `${brandName} — Open Source Alternative to Semrush & Ahrefs`,
84
+ tagline: "Free rank tracking, 41 technical SEO rules, and programmatic pages",
85
+ shortDescription: "A modern alternative to legacy SEO tools with built-in AI search optimization and zero SQL overhead.",
86
+ fullDescription: `Replace expensive subscriptions with ${brandName}. Features include 8 combinatorial programmatic matrices, automated mesh linking, SERP tracking, and AI crawler logs analysis.`,
87
+ tags: ["SEO Tools", "Keyword Research", "Website Analytics", "Open Source"],
88
+ suggestedLandingPagePath: `https://${domain}/alternatives/alternative-a-semrush?ref=alternativeto`,
89
+ },
90
+ },
91
+ {
92
+ directoryName: "Futurepedia",
93
+ category: "ai_directories",
94
+ submissionUrl: "https://www.futurepedia.io/submit-tool",
95
+ domainRating: 78,
96
+ dofollow: true,
97
+ requiredFields: {
98
+ title60Chars: `${brandName} — Generative Engine Optimization (GEO) & pSEO`,
99
+ tagline: "Optimize your brand for ChatGPT Search, Perplexity and Googlebot",
100
+ shortDescription: "Automated direct answer synthesis and Schema.org knowledge graph linker for AI search dominance.",
101
+ fullDescription: `${brandName} prepares your website for the AI search era. Generates .geo-direct-answer blocks, tracks AI bot visits, and extracts Google Knowledge Graph entities.`,
102
+ tags: ["SEO", "Generative AI", "Content Creation", "Productivity"],
103
+ suggestedLandingPagePath: `https://${domain}/solutions/geo-optimization?ref=futurepedia`,
104
+ },
105
+ },
106
+ {
107
+ directoryName: "SaaSHub",
108
+ category: "saas_directories",
109
+ submissionUrl: "https://www.saashub.com/submit",
110
+ domainRating: 77,
111
+ dofollow: true,
112
+ requiredFields: {
113
+ title60Chars: `${brandName} — High-Speed Programmatic SEO Platform`,
114
+ tagline: "Scalable landing pages for modern web frameworks",
115
+ shortDescription: "TypeScript SDK and SaaS cockpit for Next.js, Astro, and Shopify programmatic SEO.",
116
+ fullDescription: `Build high-converting local and B2B comparison landing pages in minutes with ${brandName}. Includes automated internal crosslinking and tiered indexing.`,
117
+ tags: ["SEO", "Web Development", "Marketing Automation"],
118
+ suggestedLandingPagePath: `https://${domain}/?ref=saashub`,
119
+ },
120
+ },
121
+ ];
122
+ }
123
+
124
+ /**
125
+ * 2. Builds a Grand Slam Offer (Alex Hormozi Value Equation).
126
+ */
127
+ static buildGrandSlamOffer(serviceName = "LynxSEO Growth"): GrandSlamOffer {
128
+ const bonusStack = [
129
+ {
130
+ title: "Pack 41 Règles d'Audit Technique Automatisées",
131
+ perceivedValueEur: 490,
132
+ description: "Détection immédiate des ruptures de balises H1-H3, boucles de redirections et cannibalisation.",
133
+ },
134
+ {
135
+ title: "Moteur de Maillage Géographique Mesh Linking",
136
+ perceivedValueEur: 750,
137
+ description: "Algorithme géodésique reliant automatiquement les 4 villes voisines les plus proches.",
138
+ },
139
+ {
140
+ title: "Widget de Conversion WhatsApp & Formulaires CRO",
141
+ perceivedValueEur: 350,
142
+ description: "Bouton d'acquisition directe pour capturer les prospects mobiles sans friction.",
143
+ },
144
+ {
145
+ title: "Calendrier Éditorial Brand DNA sur 4 Semaines",
146
+ perceivedValueEur: 600,
147
+ description: "12 pages et articles planifiés sur-mesure d'après l'ADN de votre marque.",
148
+ },
149
+ ];
150
+
151
+ const totalBonusValue = bonusStack.reduce((acc, b) => acc + b.perceivedValueEur, 0);
152
+ const corePrice = 149;
153
+
154
+ // Value equation: (Dream outcome (10) * Likelihood (9)) / (Time delay (1) * Effort (2)) = 45.0
155
+ const valueScore = Math.round(((10 * 9) / (1 * 2)) * 10) / 10;
156
+
157
+ return {
158
+ productName: serviceName,
159
+ dreamOutcome: "Dominance n°1 sur Google et ChatGPT Search avec 500k pages programmatiques actives",
160
+ perceivedLikelihoodScore: 9,
161
+ timeDelayMinutes: 10,
162
+ effortScore: 2,
163
+ valueScore,
164
+ corePrice,
165
+ bonusStack,
166
+ totalPerceivedValueEur: corePrice + totalBonusValue,
167
+ guaranteeText: "Garantie 30 jours satisfait ou remboursé intégralement, sans aucune question.",
168
+ scarcityText: "Accès immédiat avec 10 000 crédits IA offerts pour les 100 premières inscriptions.",
169
+ };
170
+ }
171
+
172
+ /**
173
+ * 3. Generates Competitor Battlecard (Semrush, Ahrefs, HubSpot, Jasper).
174
+ */
175
+ static generateCompetitorBattlecard(competitor: "semrush" | "ahrefs" | "jasper"): CompetitorBattlecard {
176
+ const competitorData = {
177
+ semrush: {
178
+ name: "Semrush",
179
+ price: 249,
180
+ weaknesses: [
181
+ "Coût prohibitif (249 €/mois + 150 € par utilisateur supplémentaire)",
182
+ "Aucun générateur de pages programmatiques pSEO (juste de l'analyse passive)",
183
+ "Aucun tracking des bots IA (ChatGPT Search, PerplexityBot)",
184
+ "Interface lourde et complexe pour les équipes non-expertes",
185
+ ],
186
+ advantages: [
187
+ "Moteur pSEO 8 matrices intégré en direct (< 0.05ms)",
188
+ "Suivi des positions SERP et audit 41 règles à 0 € de surcoût API",
189
+ "Détection et analytics des moteurs IA (ChatGPT, Claude, Perplexity)",
190
+ "SDK TypeScript universel pour Next.js, Astro, Shopify",
191
+ ],
192
+ switchArg: "Pour le prix d'un seul mois de Semrush, vous obtenez 2 mois de LynxSEO avec la génération de 500 000 pages programmatiques incluses.",
193
+ },
194
+ ahrefs: {
195
+ name: "Ahrefs",
196
+ price: 199,
197
+ weaknesses: [
198
+ "Système de crédits ultra-strict qui bloque rapidement les audits",
199
+ "Pas de serveur MCP pour connecter vos agents IA (Claude / Cursor)",
200
+ "Aucune optimisation directe de la synthèse AEO / GEO",
201
+ ],
202
+ advantages: [
203
+ "Serveur MCP natif pour piloter votre SEO directement depuis Claude et Cursor",
204
+ "Générateur de flux RSS 2.0 & sitemaps partitionnés à 45 000 URLs",
205
+ "Maillage interne contextuel automatisé avec scoring sémantique",
206
+ ],
207
+ switchArg: "Passez d'un outil d'observation passif à un moteur d'action autonome piloté par IA.",
208
+ },
209
+ jasper: {
210
+ name: "Jasper AI",
211
+ price: 99,
212
+ weaknesses: [
213
+ "Génère du texte brut sans aucune architecture technique SEO",
214
+ "Ne gère ni les schémas JSON-LD, ni le maillage interne, ni l'indexation",
215
+ ],
216
+ advantages: [
217
+ "Génération de pages complètes avec schémas, FAQ, balises directes et routes dynamiques",
218
+ "Intégration directe dans votre framework web sans copier-coller",
219
+ ],
220
+ switchArg: "Remplacez la génération de texte isolée par un moteur SEO complet clé en main.",
221
+ },
222
+ };
223
+
224
+ const target = competitorData[competitor] || competitorData.semrush;
225
+ const lynxPrice = 149;
226
+ const annualSavings = (target.price - lynxPrice) * 12;
227
+
228
+ return {
229
+ competitorName: target.name,
230
+ competitorPriceMonthly: target.price,
231
+ lynxSeoPriceMonthly: lynxPrice,
232
+ annualSavingsEur: Math.max(0, annualSavings),
233
+ keyWeaknessesToExploit: target.weaknesses,
234
+ ourUnfairAdvantages: target.advantages,
235
+ killerSwitchingArgument: target.switchArg,
236
+ objectionHandlers: [
237
+ {
238
+ objection: "Nous utilisons déjà Semrush depuis des années.",
239
+ winningResponse: "Vous pouvez conserver vos historiques : LynxSEO importe vos mots-clés et génère immédiatement les 500 000 landing pages que Semrush ne sait pas construire.",
240
+ },
241
+ {
242
+ objection: "Est-ce difficile à intégrer ?",
243
+ winningResponse: "Moins de 10 minutes : 1 seule ligne de code dans Next.js (`seoEngine.resolve(path)`) ou Astro et vos 8 matrices sont en ligne.",
244
+ },
245
+ ],
246
+ };
247
+ }
248
+
249
+ /**
250
+ * 4. Multi-Touch Attribution Calculator (First Touch, Last Touch, Linear, W-Shaped).
251
+ */
252
+ static calculateAttribution(
253
+ touchpoints: { source: string; channel: "organic_seo" | "ai_search" | "direct" | "referral" }[],
254
+ dealValueEur: number,
255
+ ) {
256
+ if (touchpoints.length === 0) return {};
257
+
258
+ const n = touchpoints.length;
259
+
260
+ // Linear
261
+ const linearValue = dealValueEur / n;
262
+
263
+ // First touch (100% to first)
264
+ const firstTouch = { source: touchpoints[0].source, valueEur: dealValueEur };
265
+
266
+ // Last touch (100% to last)
267
+ const lastTouch = { source: touchpoints[n - 1].source, valueEur: dealValueEur };
268
+
269
+ // W-Shaped (40% first, 40% lead-creation / middle, 20% close)
270
+ const wShaped = touchpoints.map((t, idx) => {
271
+ let weight = 0.2;
272
+ if (idx === 0) weight = n === 1 ? 1.0 : 0.4;
273
+ else if (idx === n - 1) weight = 0.4;
274
+ else weight = 0.2 / Math.max(1, n - 2);
275
+
276
+ return {
277
+ source: t.source,
278
+ channel: t.channel,
279
+ attributedEur: Math.round(dealValueEur * weight * 100) / 100,
280
+ };
281
+ });
282
+
283
+ return {
284
+ dealValueEur,
285
+ touchpointsCount: n,
286
+ firstTouch,
287
+ lastTouch,
288
+ linearValuePerTouch: Math.round(linearValue * 100) / 100,
289
+ wShapedBreakdown: wShaped,
290
+ };
291
+ }
292
+
293
+ /**
294
+ * 5. Churn Prevention & Retention Engine.
295
+ */
296
+ static evaluateChurnRisk(signals: { daysSinceLastLogin: number; pagesGeneratedThisMonth: number; rankDropAlertsCount: number }) {
297
+ let riskScore = 0; // 0 to 100
298
+ if (signals.daysSinceLastLogin > 14) riskScore += 45;
299
+ else if (signals.daysSinceLastLogin > 7) riskScore += 20;
300
+
301
+ if (signals.pagesGeneratedThisMonth === 0) riskScore += 35;
302
+ if (signals.rankDropAlertsCount > 3) riskScore += 20;
303
+
304
+ const isHighRisk = riskScore >= 50;
305
+
306
+ return {
307
+ riskScore,
308
+ riskLevel: isHighRisk ? "CRITICAL" : riskScore >= 30 ? "MEDIUM" : "LOW",
309
+ recommendedAction: isHighRisk
310
+ ? "Déclencher l'email automatique d'assistance technique + offre de coaching SEO offert de 30 min."
311
+ : "Envoyer le digest hebdomadaire des mots-clés en Striking Distance pour relancer l'activation.",
312
+ };
313
+ }
314
+ }