@lynxflow/seo-engine
v2.8.0
Published
High-Performance Universal Programmatic SEO & AI Search Engine SDK
Maintainers
Readme
@lynxflow/seo-engine
High-Performance Universal Programmatic SEO & Structured Data Engine for Modern Web Applications.
Overview
@lynxflow/seo-engine is an enterprise developer SDK providing in-memory programmatic SEO matrix generation, Google-compliant Schema.org structured data, infinite geographic location synthesis, strict market boundaries, and real-time GeoIP Edge detection worldwide.
- 10 Canonical Root Pillars & 50+ Specialized Sub-Matrices: Scales across industries, regulatory frameworks, role KPIs, multi-format templates, integration ecosystems, and ROI tools.
- Strict Geographic & Linguistic Scoping: Easily lock your website to a single country (e.g. 100% US or 100% France) or expand globally across multiple languages and territories with
strictCountryBoundary. - In-Memory Dynamic Execution: Resolves millions of programmatic routes in RAM with zero database query overhead and zero MySQL/Postgres saturation.
- Infinite Geographic Resolution (
createDynamicLocation): Dynamically synthesizes any municipality, county, state, or postal code worldwide (e.g.austin,scottsdale,75015,90210,ec1a-1bb,shinjuku) on the fly without 404 errors. - Edge GeoIP Location Detection (
resolveLocationFromHeaders): Reads Cloudflare (cf-ipcity,cf-postal-code), Vercel, AWS CloudFront, and Nginx edge headers to adapt pages to the visitor's real-time location. - Universal Multi-Locale Support: Works with any ISO-639-1 / BCP-47 locale code (
en,de,es,fr,ja,pt-BR,ar,zh-CN, etc.). - 50+ Schema.org Rich Structured Data Types: Google-compliant JSON-LD generation for
LocalBusiness,Product,SoftwareApplication,HowTo,FAQPage,BreadcrumbList, andOrganization. - Multi-Framework Support: Seamless operation on Next.js 15/16 (App & Pages Router), TanStack Start, Astro 5, Cloudflare Workers/Pages, Bun, Remix, and Node.js.
Installation
npm install @lynxflow/seo-engine
# or
pnpm add @lynxflow/seo-engine
# or
bun add @lynxflow/seo-engineMarket Scoping: Single Country vs. Global Multi-Country
Option 1: 100% US-Only or Local Single-Country Website
Prevent crawl waste on out-of-scope foreign locations by enabling strictCountryBoundary:
export const SEO_CONFIG = {
brandName: "LoneStar HVAC Pro",
languages: ["en"],
countries: ["united-states"],
strictCountryBoundary: true, // 🛡️ Rejects non-US locations
defaultCurrency: "USD",
defaultCurrencySymbol: "$",
};Option 2: Worldwide Multi-Country / Multi-Lingual SaaS
export const SEO_CONFIG = {
brandName: "Apex Global Cloud",
languages: ["en", "de", "es", "fr", "ja", "pt-BR"],
countries: ["united-states", "united-kingdom", "germany", "france", "japan"],
strictCountryBoundary: false, // Allows worldwide expansion
};Quickstart & Contrasting Examples
1. Initialize Engine & Dataset
import { PseoMatrixEngine } from "@lynxflow/seo-engine";
export const matrixEngine = new PseoMatrixEngine();
export const PSEO_DATASET = {
services: [
{
slug: "commercial-hvac",
name: "Commercial HVAC Maintenance",
category: "Facility Management",
keyFeatures: ["24/7 Emergency Dispatch", "Certified Technicians", "Predictive Monitoring"],
description: "Enterprise climate control and ventilation services"
},
{
slug: "cloud-backup",
name: "Automated Cloud Backup",
category: "Data Security",
keyFeatures: ["End-to-End Encryption", "Instant Recovery", "SOC2 Compliant"],
description: "Continuous enterprise backup and disaster recovery"
},
],
};2. Standard vs. Arbitrary Custom Resolution (Side-by-Side)
// Case 1: Standard Pre-Indexed City in English
const pageStandard = matrixEngine.resolvePage(["commercial-hvac", "new-york"], "https://example.com", PSEO_DATASET, SEO_CONFIG);
// Case 2: Contrasting Case — Arbitrary Postal Code / Custom District
const pageCustom = matrixEngine.resolvePage(["commercial-hvac", "90210"], "https://example.com", PSEO_DATASET, SEO_CONFIG);3. Edge GeoIP Resolution Example
import { resolveLocationFromHeaders, PseoMatrixEngine } from "@lynxflow/seo-engine";
export function handleIncomingRequest(request: Request) {
const geo = resolveLocationFromHeaders(request.headers);
const userCity = geo.city || "new-york";
return matrixEngine.resolvePage(["commercial-hvac", userCity], "https://example.com", PSEO_DATASET, SEO_CONFIG);
}TypeScript API Reference
PseoMatrixEngine: Core programmatic matrix compiler with geographic boundaries and crawl budget protection.createDynamicLocation(slugOrInput, fallbackCountry, options): Dynamic synthesis of any city, postal code or district worldwide.resolveLocationFromHeaders(headers): Edge header GeoIP extractor for Cloudflare, Vercel, CloudFront, and Nginx.cleanSeoSlug(text, options): Multilingual slug normalizer with stop-word removal for 10+ languages.ExtendedSchemaGraphBuilder: 50+ Google Rich Result Schema.org JSON-LD generator.LegalDisclaimerEngine: Verified compliance notice manager with staleness guards (>90 days).getSeoAgentPrompt(context): Built-in LLM operational prompt for AI coding agents.
License
Proprietary — LynxFlow Technologies. All rights reserved.
