Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 2s
Monorepo Pipeline / 🧪 Test (push) Failing after 51s
Monorepo Pipeline / 🧹 Lint (push) Failing after 2m25s
Monorepo Pipeline / 🏗️ Build (push) Successful in 2m28s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
import * as dotenv from "dotenv";
|
|
import { runSeoEngine, createGapDrafts, generateSeoReport } from "./index.js";
|
|
|
|
dotenv.config({ path: "../../.env" });
|
|
dotenv.config({ path: "../../apps/web/.env" });
|
|
|
|
async function testSeoEngine() {
|
|
console.log("Starting SEO Engine test run...\n");
|
|
const result = await runSeoEngine(
|
|
{
|
|
companyName: "KLZ Cables",
|
|
industry: "Mittelspannungskabel, Kabeltiefbau, Spezialkabel",
|
|
briefing:
|
|
"KLZ Cables is a B2B provider of specialized medium-voltage cables. We do NOT do low voltage or generic home cables.",
|
|
targetAudience: "B2B Einkäufer, Bauleiter, Netzbetreiber",
|
|
competitors: ["nkt.de", "faberkabel.de"],
|
|
seedKeywords: ["NA2XS2Y", "VPE-isoliert"],
|
|
existingPages: [
|
|
{ url: "/produkte", title: "Produkte" },
|
|
{ url: "/kontakt", title: "Kontakt" },
|
|
{ url: "/ueber-uns", title: "Über uns" },
|
|
],
|
|
locale: { gl: "de", hl: "de" },
|
|
},
|
|
{
|
|
serperApiKey: process.env.SERPER_API_KEY || "",
|
|
openRouterApiKey: process.env.OPENROUTER_API_KEY || "",
|
|
model: "google/gemini-2.5-pro",
|
|
maxKeywords: 20,
|
|
},
|
|
);
|
|
|
|
// Generate the SEO Strategy Report
|
|
console.log("\n=== GENERATING SEO STRATEGY REPORT ===");
|
|
const reportPath = await generateSeoReport(result, {
|
|
projectName: "KLZ Cables",
|
|
outputDir: ".seo-output",
|
|
});
|
|
console.log(`Report saved to: ${reportPath}`);
|
|
|
|
// Generate MDX drafts
|
|
console.log("\n=== GENERATING MDX DRAFTS ===");
|
|
const generatedFiles = await createGapDrafts(
|
|
result.contentGaps,
|
|
new Map(Object.entries(result.competitorBriefings)),
|
|
{ outputDir: ".seo-output/drafts", authorName: "KLZ Content Team" },
|
|
);
|
|
console.log(
|
|
`Generated ${generatedFiles.length} MDX files in .seo-output/drafts/`,
|
|
);
|
|
}
|
|
|
|
testSeoEngine().catch(console.error);
|