Compare commits

...

2 Commits

Author SHA1 Message Date
ae015986ca feat(web): llms.txt discoverability aliases, head link, footer link, robots
- next.config.js redirects(): /llm.txt, /llms, /.well-known/llms.txt ->
  /llms.txt (301) and /llm-full.txt, /.well-known/llms-full.txt ->
  /llms-full.txt (301). No case-only variant added: redirects() path
  matching is case-insensitive and would self-loop.
- <link rel="alternate" type="text/markdown" title="llms.txt"
  href="/llms.txt"> in <head> (the existing metadata.alternates.types entry
  has no field for title).
- Footer: new "llms.txt" link in the Company column (SiteFooter.tsx,
  rendered on the real marketing homepage via MarketingHome.tsx).
- New app/robots.ts: mail.scribase.com had no app-level robots.txt, so the
  zone's edge was serving Cloudflare's synthetic "content signals"
  placeholder (no real Allow/Disallow rules) instead of a real policy.
  Same explicit AI-crawler allow-list as scribase.com/docs.scribase.com.
2026-11-12 20:15:59 +03:00
981f9e6d6c feat(users): internal accounts never count as users
`User.isInternal` marks the operator's own accounts (owner, postmaster, QA);
the waitlist queue, its count and the per-domain active-user cap skip them.
Migration backfills the flag from the owner's test-address patterns and is
idempotent, so it may be applied by hand before it ships (owner decision
2026-11-12).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-12 04:19:13 +03:00
8 changed files with 74 additions and 1 deletions

View File

@ -22,6 +22,20 @@ const config = {
},
],
},
// llms.txt discoverability aliases: route every filename/path variant an
// agent might probe to the real files (app/llms.txt, app/llms-full.txt).
// Deliberately NOT adding a same-case-insensitive variant like
// '/LLMs.txt': Next's redirects() path matching is case-insensitive, so a
// rule from that path to '/llms.txt' would match itself and self-loop.
async redirects() {
return [
{ source: "/llm.txt", destination: "/llms.txt", permanent: true },
{ source: "/llms", destination: "/llms.txt", permanent: true },
{ source: "/.well-known/llms.txt", destination: "/llms.txt", permanent: true },
{ source: "/llm-full.txt", destination: "/llms-full.txt", permanent: true },
{ source: "/.well-known/llms-full.txt", destination: "/llms-full.txt", permanent: true },
];
},
};
export default config;

View File

@ -0,0 +1,15 @@
-- The operator's own accounts (owner, postmaster, QA) never count as users
-- in the waitlist queue, the per-domain caps or any signup number (owner
-- decision 2026-11-12). Idempotent: the column may already exist where it
-- was applied by hand before this migration shipped.
ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "isInternal" BOOLEAN NOT NULL DEFAULT false;
UPDATE "User"
SET "isInternal" = true
WHERE "isInternal" = false
AND (
lower(coalesce(email, '')) ~ '^(subasiarhan3|caelum0x|postmaster)'
OR lower(coalesce(email, '')) ~ '@(scribase\.com|ereboslab\.com|mailinator\.com)$'
OR lower(coalesce(email, '')) ~ '(\.|@)example\.com$'
OR lower(coalesce(email, '')) ~ '\.test$'
);

View File

@ -102,6 +102,8 @@ model User {
image String?
isBetaUser Boolean @default(false)
isWaitlisted Boolean @default(false)
/// The operator's own account (owner, postmaster, QA): never counted as a user.
isInternal Boolean @default(false)
createdAt DateTime @default(now())
accounts Account[]
sessions Session[]

View File

@ -46,6 +46,14 @@ export default async function RootLayout({
}) {
return (
<html lang="en" suppressHydrationWarning className="bg-sidebar-background">
<head>
{/* llms.txt discoverability (SP-AI1 convention, same as scribase.com /
docs.scribase.com): the metadata.alternates.types entry above already
points agents at index.md; this is the separate, spec-named llms.txt
link llmstxt.org consumers look for, with the title attribute that
API has no field for. */}
<link rel="alternate" type="text/markdown" title="llms.txt" href="/llms.txt" />
</head>
<body
className={`font-sans ${inter.variable} ${jetbrainsMono.variable} app bg-sidebar-background`}
>

View File

@ -0,0 +1,31 @@
import type { MetadataRoute } from "next";
/**
* mail.scribase.com had no app-level robots.txt, so the zone's edge was
* serving Cloudflare's default synthetic "content signals" placeholder (no
* actual Allow/Disallow rules) instead of a real policy. Same AI-crawler
* allow-list as scribase.com (apps/www/app/robots.ts) and
* docs.scribase.com (apps/docs/app/robots.ts): more AI visibility is the
* point for every scribase.com-family site.
*/
const AI_CRAWLERS = [
"OAI-SearchBot",
"Claude-SearchBot",
"PerplexityBot",
"ChatGPT-User",
"Claude-User",
"Perplexity-User",
"GPTBot",
"ClaudeBot",
"Applebot-Extended",
"Google-Extended",
];
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{ userAgent: "*", allow: "/" },
...AI_CRAWLERS.map((userAgent) => ({ userAgent, allow: "/" })),
],
};
}

View File

@ -25,6 +25,7 @@ const COLUMNS = [
{ label: "Contact", href: `mailto:${CONTACT_EMAIL}` },
{ label: "Privacy", href: "/privacy" },
{ label: "Terms", href: "/terms" },
{ label: "llms.txt", href: "/llms.txt" },
],
},
];

View File

@ -101,7 +101,8 @@ export const adminRouter = createTRPCRouter({
)
.query(async ({ input }) => {
const { page, limit } = input;
const where = { isWaitlisted: true };
// The operator's own accounts are not sign-ups.
const where = { isWaitlisted: true, isInternal: false };
const [users, total] = await Promise.all([
db.user.findMany({

View File

@ -156,6 +156,7 @@ function liveDeps(): AutoApproveDeps {
where: {
id: { not: excludeUserId },
isWaitlisted: false,
isInternal: false,
email: { endsWith: `@${domain}`, mode: "insensitive" },
},
}),