@lynxflow/seo-engine 1.5.8 → 1.5.9

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/README.md CHANGED
@@ -57,47 +57,101 @@ The SDK structures programmatic content across **10 canonical root pillars** exp
57
57
 
58
58
  ## Quickstart
59
59
 
60
- ### 1. Initialize Engine
60
+ ### 1. Initialize Engine & Configure Minimal Inputs
61
+
62
+ The SDK runs **in-memory inside the client application** (< 0.05ms) and automatically provisions verified cities, populations, GPS coordinates, and currencies from its built-in global demographic database.
61
63
 
62
64
  ```typescript
63
65
  import { PseoMatrixEngine } from "@lynxflow/seo-engine";
64
66
 
65
- export const matrixEngine = new PseoMatrixEngine({
66
- companyName: "Acme Cloud",
67
- language: "en", // "en" default, supports "fr", "de", "es", "it", "pt", etc.
68
- correctionsEmail: "compliance@acme.com",
69
- });
70
- ```
67
+ export const matrixEngine = new PseoMatrixEngine();
71
68
 
72
- ### 2. Resolve Programmatic Pages
69
+ export const SEO_CONFIG = {
70
+ brandName: "Acme Cloud",
71
+ languages: ["fr", "en", "es"], // Supported site languages
72
+ countries: ["france", "espagne", "belgique"], // Or "europe" / "international" — SDK auto-provisions verified cities!
73
+ cleanDirectRoutes: true, // Eliminates parasite words (/solutions/, etc.) for direct /{service}/{city}
74
+ };
73
75
 
74
- ```typescript
75
- const pages = matrixEngine.generateAllMatrices("https://example.com", {
76
+ export const PSEO_DATASET = {
76
77
  services: [
77
- { slug: "crm-pipeline", name: "Sales CRM", category: "Sales", keyFeatures: ["Kanban"], description: "CRM" }
78
+ {
79
+ slug: "autopost-facebook",
80
+ name: "Autopost Facebook & Instagram",
81
+ category: "Social Media",
82
+ keyFeatures: ["AI Scheduling", "Visual Calendar", "Auto-Hashtags"],
83
+ description: "Automated social media posting engine"
84
+ },
85
+ {
86
+ slug: "crm-pipeline",
87
+ name: "Visual CRM Pipeline",
88
+ category: "Sales",
89
+ keyFeatures: ["Kanban", "Lead scoring"],
90
+ description: "Visual deal tracking software"
91
+ },
78
92
  ],
79
93
  targets: [
80
- { slug: "law-firms", name: "Law Firms", type: "industry", painPoints: ["Billing"], benefits: ["Security"] }
94
+ { slug: "agences", name: "Marketing Agencies", type: "industry", painPoints: ["Manual Posting"], benefits: ["10x Output"] }
81
95
  ],
82
96
  integrations: [
83
- { slug: "slack", name: "Slack", category: "Communication", syncFeatures: ["Alerts"] }
97
+ { slug: "shopify", name: "Shopify", category: "E-Commerce", syncFeatures: ["Catalog sync"] }
84
98
  ],
85
99
  templates: [
86
- { slug: "pipeline-excel", title: "Sales Pipeline", topic: "Sales", format: "excel", benefits: ["Free"] }
100
+ { slug: "social-calendar-excel", title: "Social Media Calendar", topic: "Social Media", format: "excel", benefits: ["Free download"] }
87
101
  ],
88
102
  glossaryTerms: [
89
- { slug: "mrr", term: "MRR", shortDefinition: "Monthly Recurring Revenue" }
103
+ { slug: "engagement-rate", term: "Engagement Rate", shortDefinition: "Percentage of audience interacting with content" }
90
104
  ]
91
- }, { brandName: "Acme" });
105
+ };
106
+ ```
92
107
 
93
- console.log(pages[0].urlPath); // "/for/law-firms"
94
- console.log(pages[0].schemaGraph); // Injected Schema.org JSON-LD graph
108
+ ### 2. Next.js Universal Dynamic Catch-All (`app/[...slug]/page.tsx`)
109
+
110
+ ```tsx
111
+ import { notFound } from "next/navigation";
112
+ import { matrixEngine, SEO_CONFIG, PSEO_DATASET } from "@/lib/seo";
113
+
114
+ export async function generateMetadata({ params }: { params: { slug: string[] } }) {
115
+ const domain = process.env.NEXT_PUBLIC_SITE_URL || "https://example.com";
116
+ const page = matrixEngine.resolvePage(params.slug, domain, PSEO_DATASET, SEO_CONFIG);
117
+ if (!page) return {};
118
+ return { title: page.title, description: page.description, alternates: { canonical: page.canonicalUrl }, robots: page.robots };
119
+ }
120
+
121
+ export default async function ProgrammaticPage({ params }: { params: { slug: string[] } }) {
122
+ const domain = process.env.NEXT_PUBLIC_SITE_URL || "https://example.com";
123
+ // ⚡ Resolved mathematically in local RAM in < 0.05ms
124
+ const page = matrixEngine.resolvePage(params.slug, domain, PSEO_DATASET, SEO_CONFIG);
125
+ if (!page) notFound();
126
+
127
+ return (
128
+ <article className="min-h-screen bg-background text-foreground py-12 px-6 max-w-5xl mx-auto space-y-8">
129
+ <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(page.schemaGraph) }} />
130
+ <h1 className="text-4xl font-extrabold">{page.h1}</h1>
131
+ <p className="text-lg text-muted-foreground">{page.description}</p>
132
+ {page.neighboringLinks && (
133
+ <nav className="flex flex-wrap gap-2 pt-6">
134
+ {page.neighboringLinks.map((l) => (
135
+ <a key={l.url} href={l.url} className="px-3 py-1 bg-secondary rounded text-xs">{l.name}</a>
136
+ ))}
137
+ </nav>
138
+ )}
139
+ </article>
140
+ );
141
+ }
95
142
  ```
96
143
 
97
- ### 3. URL Slug Cleansing (6 Golden Rules)
144
+ ### 3. XML Sitemap & `/llms.txt` Feeds (1 Line of Code)
98
145
 
99
146
  ```typescript
100
- import { cleanSeoSlug, validateSeoSlug } from "@lynxflow/seo-engine";
147
+ // app/sitemap.ts
148
+ export default function sitemap() {
149
+ const domain = process.env.NEXT_PUBLIC_SITE_URL || "https://example.com";
150
+ return matrixEngine.generateAllMatrices(domain, PSEO_DATASET, SEO_CONFIG)
151
+ .filter(p => p.robots.includes("index"))
152
+ .map(p => ({ url: p.canonicalUrl, lastModified: new Date() }));
153
+ }
154
+ ```
101
155
 
102
156
  const slug = cleanSeoSlug("The best software for managing client invoices in 2026", { language: "en" });
103
157
  console.log(slug); // "best-software-managing-client-invoices"
@@ -127,6 +127,7 @@ export interface GeneratedPageMeta {
127
127
  export interface MatrixOptions {
128
128
  brandName: string;
129
129
  language?: string;
130
+ languages?: string[];
130
131
  countries?: string[] | string;
131
132
  territories?: string[] | string;
132
133
  cleanDirectRoutes?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynxflow/seo-engine",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "High-Performance Multilingual Programmatic SEO & AI Search Engine SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -156,6 +156,7 @@ export interface GeneratedPageMeta {
156
156
  export interface MatrixOptions {
157
157
  brandName: string;
158
158
  language?: string; // Default: "en", supports "fr", "de", "es", "pt", "it", etc.
159
+ languages?: string[]; // Array of supported site languages (e.g. ["fr", "en", "es"])
159
160
  countries?: string[] | string; // e.g. ["france", "spain"] or "europe" or "international"
160
161
  territories?: string[] | string; // Alias for countries
161
162
  cleanDirectRoutes?: boolean; // When true (default), eliminates parasite words (/solutions/, etc.) for direct /{service}/{city}