Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion website/lib/llms.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { BEST_APP_FAQS, BEST_APP_GUIDE } from "@/lib/bestApp";
import { RELEASES, newestRelease } from "@/lib/changelog";
import { AS_OF, COMPARE_FAQS, PRODUCTS, ROWS } from "@/lib/compare";
import { DOCS, docHref } from "@/lib/docs";
import { featureGroups, inBetaFeatures } from "@/lib/features";
import { PAGES } from "@/lib/metadata";
import { absoluteLinks, guideMarkdown, guideMdx } from "@/lib/guideMarkdown";
import type { Faq } from "@/lib/mixerFaqs";
import { X32_FAQS, XR18_FAQS, type Faq } from "@/lib/mixerFaqs";
import { GLOSSARY, HUB_COPY, HUB_FAQS, MIXER_GUIDES, MIXER_ROWS, TAP_POINT_FAQS, TAP_POINT_GUIDE, headlineOf, pickMixerLink } from "@/lib/mixerGuides";
import { PAGE_DATES } from "@/lib/pageDates";
import { inBeta, planned, worksNow } from "@/lib/mixers";
Expand Down Expand Up @@ -125,6 +126,50 @@ function mixerGuidesFull(): string[] {
];
}

// SoundcheckPlayer, the same maker's app that plays the Stems back into the mixer (Eric, 2026-12-03: the site may name
// and link it, as "in testing"). The line says only what soundcheckplayer.app says. The link is tagged, like every
// link from one site to the other, and the line ends after the link's closing bracket and a colon, never glued to it.
const SOUNDCHECKPLAYER_LINE =
"- [SoundcheckPlayer](https://soundcheckplayer.app/?utm_source=showrecorder&utm_campaign=llms): a separate app from the same maker, in testing. It plays the Stems back into the mixer over USB from an iPhone, iPad or Mac, for a virtual soundcheck. ShowRecorder records; SoundcheckPlayer plays.";

// The comparison page (/compare), from the lists the page renders (lib/compare.ts).
const COMPARE_PATH = "/compare";
const COMPARE_TITLE = "ShowRecorder compared with the other ways to record a mixer";
const comparedWith = PRODUCTS.filter((p) => p.id !== "showrecorder");
const compareNote = `ShowRecorder next to ${comparedWith.map((p) => p.name.replace(/^A /, "a ")).join(", ")}, as of ${AS_OF}, and when to pick each of the others.`;

// A product page's questions in llms-full.txt: the page's address, then each question and answer as the page shows
// them. These are the questions people ask an assistant about the app itself.
const pageQuestions = (title: string, path: string, faqs: readonly Faq[]) => [
`## ${title}`,
"",
`URL: ${abs(path)}`,
"",
...faqs.flatMap((f) => [`### ${f.q}`, "", f.a, ""]),
];

// The comparison in full: the table, when to pick each product, and the page's questions.
function compareFull(): string[] {
const cell = (s: string) => s.replace(/\|/g, "/");
return [
`## ${COMPARE_TITLE}`,
"",
`URL: ${abs(COMPARE_PATH)}`,
"",
`Four other ways to get every channel of a mixer onto a recording, side by side with ShowRecorder, as of ${AS_OF}. A row that says a listing does not mention something means we could not find it on the page we read, not that the product lacks it. Check the maker's page before you buy.`,
"",
`| | ${PRODUCTS.map((p) => p.name).join(" | ")} |`,
`| --- |${" --- |".repeat(PRODUCTS.length)}`,
...ROWS.map((row) => `| ${row.label} | ${PRODUCTS.map((p) => cell(row.cells[p.id])).join(" | ")} |`),
"",
"When to pick each:",
"",
...[...comparedWith, PRODUCTS[0]].map((p) => `- ${p.name}: ${p.pickIt}`),
"",
...COMPARE_FAQS.flatMap((f) => [`### ${f.q}`, "", f.a, ""]),
];
}

// A page's questions, as the page shows them at the end.
const faqSection = (faqs: readonly Faq[]) => ["#### Frequently asked questions", "", ...faqs.flatMap((f) => [`##### ${f.q}`, "", f.a, ""])];

Expand All @@ -146,6 +191,7 @@ export function llmsTxt(): string {
link("Home", PAGES.home.path, "What ShowRecorder does, what you need, pricing and the FAQ."),
link("Features", PAGES.features.path, PAGES.features.description),
...MIXER_PAGES.map((m) => link(m.title, m.page.path, m.page.description)),
link("Compare", COMPARE_PATH, compareNote),
link("What's new", PAGES.changelog.path, PAGES.changelog.description),
link("Support", PAGES.support.path, PAGES.support.description),
link("Privacy policy", PAGES.privacy.path, PAGES.privacy.description),
Expand All @@ -160,6 +206,7 @@ export function llmsTxt(): string {
"",
`- [Everything on one page](${abs("/llms-full.txt")})`,
`- [Source and issues](${REPO_URL})`,
SOUNDCHECKPLAYER_LINE,
"",
TRADEMARK_LINE,
"",
Expand All @@ -178,6 +225,9 @@ export function llmsFullTxt(): string {
...worksNow.map((m) => `- ${m.name}${m.href ? ` (${abs(m.href)})` : ""}: ${m.body}`),
...inBeta.map((m) => `- ${m.name}${m.href ? ` (${abs(m.href)})` : ""}, public beta: ${m.body}`),
"",
...pageQuestions("XR18 and MR18: questions and answers", PAGES.mixersXR18.path, XR18_FAQS),
...pageQuestions("X32 and M32: questions and answers", PAGES.mixersX32.path, X32_FAQS),
...compareFull(),
"## Features",
"",
"Each feature is marked Free or Pro.",
Expand Down
95 changes: 95 additions & 0 deletions website/tests/llmsProductPages.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import { AS_OF, COMPARE_FAQS, PRODUCTS, ROWS } from "@/lib/compare";
import { llmsFullTxt, llmsTxt } from "@/lib/llms";
import { X32_FAQS, XR18_FAQS } from "@/lib/mixerFaqs";

// The questions people ask an AI assistant about the app itself ("can I record an X32 to an iPad?", "which app
// should I use?") are answered on the two mixer pages and the comparison page. llms.txt must list the comparison
// page, and llms-full.txt must carry those pages' questions and the comparison, word for word from the same lists
// the pages render, so the AI files can't say anything the pages don't.

const short = llmsTxt();
const full = llmsFullTxt();
// One "## <title>" section of llms-full.txt, up to the next "## " heading.
const section = (title: string) => {
const start = full.indexOf(`## ${title}\n`);
if (start < 0) return "";
const rest = full.slice(start + 3);
const next = rest.search(/^## /m);
return next < 0 ? rest : rest.slice(0, next);
};

describe("llms.txt lists the comparison page", () => {
it("links /compare with the products it compares", () => {
const line = short.split("\n").find((l) => l.includes("](https://showrecorder.app/compare)")) ?? "";
expect(line).not.toBe("");
for (const p of PRODUCTS.filter((p) => p.id !== "showrecorder")) expect(line.toLowerCase()).toContain(p.name.toLowerCase());
expect(line).not.toMatch(/, A laptop/);
expect(line).toContain(AS_OF);
});
});

describe("llms-full.txt carries the mixer pages' questions", () => {
it("has every XR18 and MR18 page question and answer, with the page's address", () => {
const s = section("XR18 and MR18: questions and answers");
expect(s).toContain("URL: https://showrecorder.app/mixers/xr18");
for (const f of XR18_FAQS) {
expect(s).toContain(`### ${f.q}`);
expect(s).toContain(f.a);
}
});

it("has every X32 and M32 page question and answer, with the page's address", () => {
const s = section("X32 and M32: questions and answers");
expect(s).toContain("URL: https://showrecorder.app/mixers/x32");
for (const f of X32_FAQS) {
expect(s).toContain(`### ${f.q}`);
expect(s).toContain(f.a);
}
});
});

describe("llms-full.txt carries the comparison", () => {
const s = section("ShowRecorder compared with the other ways to record a mixer");

it("gives the page's address, its date and its caveat", () => {
expect(s).toContain("URL: https://showrecorder.app/compare");
expect(s).toContain(`as of ${AS_OF}`);
expect(s).toMatch(/could not find it on the page we read, not that the product lacks it/);
});

it("has every row and cell of the table, and when to pick each product", () => {
for (const row of ROWS) {
expect(s).toContain(`| ${row.label} |`);
for (const p of PRODUCTS) expect(s).toContain(row.cells[p.id].replace(/\|/g, "/"));
}
for (const p of PRODUCTS) expect(s).toContain(p.pickIt);
});

it("has the page's questions and answers", () => {
for (const f of COMPARE_FAQS) {
expect(s).toContain(`### ${f.q}`);
expect(s).toContain(f.a);
}
});
});

describe("llms.txt names SoundcheckPlayer", () => {
const line = short.split("\n").find((l) => l.includes("soundcheckplayer.app")) ?? "";

it("links it with source tags, as in testing, and says which app records and which plays", () => {
expect(line).toContain("](https://soundcheckplayer.app/?utm_source=showrecorder&utm_campaign=llms): ");
expect(line).toMatch(/in testing/);
expect(line).toMatch(/ShowRecorder records; SoundcheckPlayer plays\./);
});

it("states no price and no App Store, and uses virtual soundcheck only as a description", () => {
expect(line).not.toMatch(/\$\d|price|free|App Store/i);
expect(line).not.toMatch(/Virtual Soundcheck/);
});

it("has no untagged link to soundcheckplayer.app in either file", () => {
for (const body of [short, full]) {
for (const m of body.matchAll(/https:\/\/soundcheckplayer\.app[^\s)]*/g)) expect(m[0]).toMatch(/\?utm_source=showrecorder&utm_campaign=[a-z0-9-]+$/);
}
});
});
Loading