refactor(blog)!: delete blog demo feature

Veect retrofit (ADR-027): the template's demo content is being removed
to make room for the Veect package map. This slice deletes
packages/blog whole and prunes every composition edge in one commit:
core-api router mount, core-cms collections + regenerated Payload
types, web-next bindAll entry / home page / blog route / Tailwind
sources, blog e2e spec, tsconfig paths, fallow ignore entry,
anchor-guard + generator e2e feature lists, compliance artifacts,
and feature-list doc entries (CLAUDE.md, AGENTS.md, glossary).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
2026-07-12 15:56:22 +02:00
parent bb12cc2432
commit ea24c85424
92 changed files with 170 additions and 3318 deletions

View File

@@ -1,17 +0,0 @@
import { ArticleDetail } from "@repo/blog/ui";
import { bindAll } from "../../../server/bind-production";
type PageProps = {
params: Promise<{ slug: string }>;
};
export default async function BlogPostPage({ params }: PageProps) {
await bindAll();
const { slug } = await params;
return (
<main className="px-6 py-8">
<ArticleDetail slug={slug} />
</main>
);
}

View File

@@ -1,4 +1,3 @@
import { ArticleList } from "@repo/blog/ui";
import { bindAll } from "../server/bind-production";
export default async function Home() {
@@ -6,10 +5,7 @@ export default async function Home() {
return (
<main className="mx-auto max-w-5xl px-6 py-8">
<h2 className="mb-4 text-2xl font-bold text-foreground">
Latest articles
</h2>
<ArticleList />
<h1 className="mb-4 text-2xl font-bold text-foreground">Veect</h1>
</main>
);
}

View File

@@ -4,9 +4,6 @@ vi.mock("@repo/core-cms", () => ({ default: Promise.resolve({}) }));
vi.mock("payload", () => ({
getPayload: vi.fn(async () => ({ jobs: { queue: vi.fn() } })),
}));
vi.mock("@repo/blog/di/bind-production", () => ({
bindProductionBlog: vi.fn(),
}));
vi.mock("@repo/auth/di/bind-production", () => ({
bindProductionAuth: vi.fn(),
}));
@@ -19,7 +16,6 @@ vi.mock("@repo/navigation/di/bind-production", () => ({
vi.mock("@repo/media/di/bind-production", () => ({
bindProductionMedia: vi.fn(),
}));
vi.mock("@repo/blog/di/bind-dev-seed", () => ({ bindDevSeedBlog: vi.fn() }));
vi.mock("@repo/auth/di/bind-dev-seed", () => ({ bindDevSeedAuth: vi.fn() }));
vi.mock("@repo/marketing-pages/di/bind-dev-seed", () => ({
bindDevSeedMarketingPages: vi.fn(),
@@ -47,10 +43,8 @@ describe("bindAllProduction", () => {
vi.clearAllMocks();
});
it("binds all five feature production repos", async () => {
it("binds all four feature production repos", async () => {
const { bindAllProduction } = await import("./bind-production");
const { bindProductionBlog } =
await import("@repo/blog/di/bind-production");
const { bindProductionAuth } =
await import("@repo/auth/di/bind-production");
const { bindProductionMarketingPages } =
@@ -62,7 +56,6 @@ describe("bindAllProduction", () => {
await bindAllProduction();
expect(bindProductionBlog).toHaveBeenCalledOnce();
expect(bindProductionAuth).toHaveBeenCalledOnce();
expect(bindProductionMarketingPages).toHaveBeenCalledOnce();
expect(bindProductionNavigation).toHaveBeenCalledOnce();
@@ -72,11 +65,11 @@ describe("bindAllProduction", () => {
it("is idempotent via bindAll — second call does not re-bind", async () => {
vi.stubEnv("NODE_ENV", "production");
const { bindAll } = await import("./bind-production");
const { bindProductionBlog } =
await import("@repo/blog/di/bind-production");
const { bindProductionAuth } =
await import("@repo/auth/di/bind-production");
await bindAll();
await bindAll();
expect(bindProductionBlog).toHaveBeenCalledOnce();
expect(bindProductionAuth).toHaveBeenCalledOnce();
});
it("passes a Payload-backed queue to each per-feature binder", async () => {
@@ -127,54 +120,54 @@ describe("bindAll dispatcher", () => {
vi.stubEnv("USE_DEV_SEED", "true");
vi.stubEnv("NODE_ENV", "production"); // even in production, dev seed wins
const { bindAll } = await import("./bind-production");
const { bindDevSeedBlog } = await import("@repo/blog/di/bind-dev-seed");
const { bindProductionBlog } =
await import("@repo/blog/di/bind-production");
const { bindDevSeedAuth } = await import("@repo/auth/di/bind-dev-seed");
const { bindProductionAuth } =
await import("@repo/auth/di/bind-production");
await bindAll();
expect(bindDevSeedBlog).toHaveBeenCalledOnce();
expect(bindProductionBlog).not.toHaveBeenCalled();
expect(bindDevSeedAuth).toHaveBeenCalledOnce();
expect(bindProductionAuth).not.toHaveBeenCalled();
});
it("NODE_ENV='production' (no override) → dispatches to bindAllProduction", async () => {
vi.stubEnv("NODE_ENV", "production");
const { bindAll } = await import("./bind-production");
const { bindProductionBlog } =
await import("@repo/blog/di/bind-production");
const { bindDevSeedBlog } = await import("@repo/blog/di/bind-dev-seed");
const { bindProductionAuth } =
await import("@repo/auth/di/bind-production");
const { bindDevSeedAuth } = await import("@repo/auth/di/bind-dev-seed");
await bindAll();
expect(bindProductionBlog).toHaveBeenCalledOnce();
expect(bindDevSeedBlog).not.toHaveBeenCalled();
expect(bindProductionAuth).toHaveBeenCalledOnce();
expect(bindDevSeedAuth).not.toHaveBeenCalled();
});
it("NODE_ENV='development' → dispatches to bindAllDevSeed (developer default)", async () => {
vi.stubEnv("NODE_ENV", "development");
const { bindAll } = await import("./bind-production");
const { bindDevSeedBlog } = await import("@repo/blog/di/bind-dev-seed");
const { bindProductionBlog } =
await import("@repo/blog/di/bind-production");
const { bindDevSeedAuth } = await import("@repo/auth/di/bind-dev-seed");
const { bindProductionAuth } =
await import("@repo/auth/di/bind-production");
await bindAll();
expect(bindDevSeedBlog).toHaveBeenCalledOnce();
expect(bindProductionBlog).not.toHaveBeenCalled();
expect(bindDevSeedAuth).toHaveBeenCalledOnce();
expect(bindProductionAuth).not.toHaveBeenCalled();
});
it("USE_DEV_SEED='false' is treated as not-set (only 'true' triggers dev seed)", async () => {
vi.stubEnv("USE_DEV_SEED", "false");
vi.stubEnv("NODE_ENV", "production");
const { bindAll } = await import("./bind-production");
const { bindProductionBlog } =
await import("@repo/blog/di/bind-production");
const { bindDevSeedBlog } = await import("@repo/blog/di/bind-dev-seed");
const { bindProductionAuth } =
await import("@repo/auth/di/bind-production");
const { bindDevSeedAuth } = await import("@repo/auth/di/bind-dev-seed");
await bindAll();
expect(bindProductionBlog).toHaveBeenCalledOnce();
expect(bindDevSeedBlog).not.toHaveBeenCalled();
expect(bindProductionAuth).toHaveBeenCalledOnce();
expect(bindDevSeedAuth).not.toHaveBeenCalled();
});
});
@@ -225,12 +218,12 @@ describe("bindAll instrumentation orthogonality", () => {
const { bindAll } = await import("./bind-production");
const { bindOtelInstrumentation } =
await import("@repo/core-shared/instrumentation");
const { bindDevSeedBlog } = await import("@repo/blog/di/bind-dev-seed");
const { bindDevSeedAuth } = await import("@repo/auth/di/bind-dev-seed");
await bindAll();
expect(bindOtelInstrumentation).toHaveBeenCalledOnce();
expect(bindDevSeedBlog).toHaveBeenCalledOnce();
expect(bindDevSeedAuth).toHaveBeenCalledOnce();
});
it("Noop instrumentation works alongside production binding (DSN unset, NODE_ENV=production)", async () => {
@@ -239,12 +232,12 @@ describe("bindAll instrumentation orthogonality", () => {
const { bindAll } = await import("./bind-production");
const { bindNoopInstrumentation } =
await import("@repo/core-shared/instrumentation");
const { bindProductionBlog } =
await import("@repo/blog/di/bind-production");
const { bindProductionAuth } =
await import("@repo/auth/di/bind-production");
await bindAll();
expect(bindNoopInstrumentation).toHaveBeenCalledOnce();
expect(bindProductionBlog).toHaveBeenCalledOnce();
expect(bindProductionAuth).toHaveBeenCalledOnce();
});
});

View File

@@ -17,12 +17,10 @@ import {
type IJobQueue,
} from "@repo/core-shared/jobs";
import { NoopRateLimit } from "@repo/core-shared/rate-limit";
import { bindProductionBlog } from "@repo/blog/di/bind-production";
import { bindProductionAuth } from "@repo/auth/di/bind-production";
import { bindProductionMarketingPages } from "@repo/marketing-pages/di/bind-production";
import { bindProductionNavigation } from "@repo/navigation/di/bind-production";
import { bindProductionMedia } from "@repo/media/di/bind-production";
import { bindDevSeedBlog } from "@repo/blog/di/bind-dev-seed";
import { bindDevSeedAuth } from "@repo/auth/di/bind-dev-seed";
import { bindDevSeedMarketingPages } from "@repo/marketing-pages/di/bind-dev-seed";
import { bindDevSeedNavigation } from "@repo/navigation/di/bind-dev-seed";
@@ -100,7 +98,6 @@ export async function bindAllProduction(): Promise<void> {
};
bindProductionAuth(ctx);
bindProductionBlog(ctx);
bindProductionMarketingPages(ctx);
bindProductionNavigation(ctx);
bindProductionMedia(ctx);
@@ -123,7 +120,6 @@ export async function bindAllDevSeed(): Promise<void> {
};
await bindDevSeedAuth(ctx);
await bindDevSeedBlog(ctx);
await bindDevSeedMarketingPages(ctx);
await bindDevSeedNavigation(ctx);
await bindDevSeedMedia(ctx);

View File

@@ -1,7 +1,6 @@
@import "tailwindcss";
@source "../../../../packages/core-ui/src";
@source "../../../../packages/navigation/src";
@source "../../../../packages/blog/src";
@source "../../../../packages/marketing-pages/src";
@source "../../../../packages/media/src";
@source "../../../../packages/auth/src";