feat(housekeeping): deliver content vertical

This commit is contained in:
Simo committed 2026-08-30 01:54:43 +02:00
1 parent bdab924bdf
commit fd68819d9b
67 files changed
+5742 -1916

No files matched your search

@@ -4,6 +4,7 @@ import { join, posix } from "node:path";
import { createElement, type ReactElement } from "react";
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { CONTENT_ROUTE_IDS } from "../domains/content/routes";
import { PEOPLE_ROUTE_IDS } from "../domains/people/routes";
import { SYSTEM_ROUTE_IDS } from "../domains/system/routes";
import { HOUSEKEEPING_MANIFESTS } from "../manifests";
@@ -208,6 +209,177 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
"src/features/housekeeping/domains/people/routes",
]),
],
[
"src/features/housekeeping/domains/content/commands/content-commands.ts",
new Set(["src/features/housekeeping/domains/content/services/mutations"]),
],
[
"src/features/housekeeping/domains/content/inbox-production.ts",
new Set([
"src/features/housekeeping/domains/content/queries/content-queries",
]),
],
[
"src/features/housekeeping/domains/content/inbox.ts",
new Set(["src/features/housekeeping/domains/content/inbox-production"]),
],
[
"src/features/housekeeping/domains/content/manifest.ts",
new Set([
"src/features/housekeeping/domains/content/inbox",
"src/features/housekeeping/domains/content/routes",
"src/features/housekeeping/domains/content/search",
"src/features/housekeeping/domains/content/widgets",
]),
],
[
"src/features/housekeeping/domains/content/pages/brand.tsx",
new Set([
"src/features/housekeeping/domains/content/pages/content-command-form",
"src/features/housekeeping/domains/content/pages/content-page-frame",
"src/features/housekeeping/domains/content/queries/content-queries",
]),
],
[
"src/features/housekeeping/domains/content/pages/content-command-form.tsx",
new Set(["src/actions/housekeeping-command"]),
],
[
"src/features/housekeeping/domains/content/pages/content-page-frame.tsx",
new Set([
"src/features/housekeeping/domains/content/queries/content-queries",
"src/features/housekeeping/domains/content/routes",
]),
],
[
"src/features/housekeeping/domains/content/pages/editorial.tsx",
new Set([
"src/features/housekeeping/domains/content/pages/content-command-form",
"src/features/housekeeping/domains/content/pages/content-page-frame",
"src/features/housekeeping/domains/content/queries/content-queries",
]),
],
[
"src/features/housekeeping/domains/content/pages/engagement.tsx",
new Set([
"src/features/housekeeping/domains/content/pages/content-command-form",
"src/features/housekeeping/domains/content/pages/content-page-frame",
"src/features/housekeeping/domains/content/queries/content-queries",
]),
],
[
"src/features/housekeeping/domains/content/pages/help.tsx",
new Set([
"src/features/housekeeping/domains/content/pages/content-command-form",
"src/features/housekeeping/domains/content/pages/content-page-frame",
"src/features/housekeeping/domains/content/queries/content-queries",
]),
],
[
"src/features/housekeeping/domains/content/pages/localization.tsx",
new Set([
"src/features/housekeeping/domains/content/pages/content-command-form",
"src/features/housekeeping/domains/content/pages/content-page-frame",
"src/features/housekeeping/domains/content/queries/content-queries",
]),
],
[
"src/features/housekeeping/domains/content/pages/media.tsx",
new Set([
"src/features/housekeeping/domains/content/pages/content-command-form",
"src/features/housekeeping/domains/content/pages/content-page-frame",
"src/features/housekeeping/domains/content/queries/content-queries",
]),
],
[
"src/features/housekeeping/domains/content/queries/content-queries-production.ts",
new Set([
"src/features/housekeeping/domains/content/queries/content-queries",
"src/features/housekeeping/domains/content/routes",
"src/lib/db",
"drizzle-orm",
]),
],
[
"src/features/housekeeping/domains/content/queries/content-queries.ts",
new Set([
"src/features/housekeeping/domains/content/queries/content-queries-production",
"src/features/housekeeping/domains/content/routes",
]),
],
[
"src/features/housekeeping/domains/content/route-handlers.ts",
new Set([
"src/features/housekeeping/domains/content/pages/brand",
"src/features/housekeeping/domains/content/pages/editorial",
"src/features/housekeeping/domains/content/pages/engagement",
"src/features/housekeeping/domains/content/pages/help",
"src/features/housekeeping/domains/content/pages/localization",
"src/features/housekeeping/domains/content/pages/media",
"src/features/housekeeping/domains/content/routes",
]),
],
[
"src/features/housekeeping/domains/content/search-production.ts",
new Set([
"src/features/housekeeping/domains/content/queries/content-queries",
"src/features/housekeeping/domains/content/search",
]),
],
[
"src/features/housekeeping/domains/content/search.ts",
new Set(["src/features/housekeeping/domains/content/search-production"]),
],
[
"src/features/housekeeping/domains/content/services/mutation-runtime-database.ts",
new Set([
"src/features/housekeeping/domains/content/services/mutations",
"src/lib/db",
"drizzle-orm",
"mysql2",
]),
],
[
"src/features/housekeeping/domains/content/services/mutation-runtime-external.ts",
new Set([
"src/features/housekeeping/domains/content/services/mutations",
"src/features/housekeeping/domains/content/services/mutations-production",
"src/lib/db",
"drizzle-orm",
]),
],
[
"src/features/housekeeping/domains/content/services/mutations-production.ts",
new Set([
"src/features/housekeeping/domains/content/services/mutations",
"src/features/housekeeping/domains/content/services/mutations-runtime",
"src/lib/db",
]),
],
[
"src/features/housekeeping/domains/content/services/mutations-runtime.ts",
new Set([
"src/features/housekeeping/domains/content/services/mutation-runtime-database",
"src/features/housekeeping/domains/content/services/mutation-runtime-external",
"src/features/housekeeping/domains/content/services/mutations",
]),
],
[
"src/features/housekeeping/domains/content/services/mutations.ts",
new Set([
"src/features/housekeeping/domains/content/services/mutations-production",
]),
],
[
"src/features/housekeeping/domains/content/widgets-production.ts",
new Set([
"src/features/housekeeping/domains/content/queries/content-queries",
]),
],
[
"src/features/housekeeping/domains/content/widgets.ts",
new Set(["src/features/housekeeping/domains/content/widgets-production"]),
],
[
"src/features/housekeeping/domains/system/commands/system-commands.ts",
new Set(["src/features/housekeeping/domains/system/services/mutations"]),
@@ -316,6 +488,7 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
[
"src/features/housekeeping/foundation/commands/bootstrap.ts",
new Set([
"src/features/housekeeping/domains/content/commands/content-commands",
"src/features/housekeeping/domains/people/commands/community-commands",
"src/features/housekeeping/domains/people/commands/moderation-commands",
"src/features/housekeeping/domains/people/commands/support-commands",
@@ -326,6 +499,7 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
[
"src/features/housekeeping/route-handlers.ts",
new Set([
"src/features/housekeeping/domains/content/route-handlers",
"src/features/housekeeping/domains/people/route-handlers",
"src/features/housekeeping/domains/system/route-handlers",
]),
@@ -725,6 +899,12 @@ describe("housekeeping runtime import boundary", () => {
});
it("allows only approved domain vertical runtime edges", () => {
expect(
findHousekeepingImportBoundaryViolations(
'import { contentMutationService } from "../services/mutations";',
"src/features/housekeeping/domains/content/commands/content-commands.ts",
),
).toEqual([]);
expect(
findHousekeepingImportBoundaryViolations(
'import { peopleMutationService } from "../services/mutations";',
@@ -920,7 +1100,7 @@ describe("housekeeping foundation completion contracts", () => {
}
});
it("creates the real six-domain registry with People primary and System routes enabled", () => {
it("creates the real six-domain registry with People, Content, and System routes enabled", () => {
const registry = createHousekeepingRegistry(HOUSEKEEPING_MANIFESTS);
expect(registry.domains.map((domain) => domain.id)).toEqual([
@@ -933,7 +1113,7 @@ describe("housekeeping foundation completion contracts", () => {
]);
expect(
registry.domains
.filter((domain) => !["people", "system"].includes(domain.id))
.filter((domain) => !["people", "content", "system"].includes(domain.id))
.every((domain) => domain.routes.length === 0),
).toBe(true);
expect(
@@ -941,6 +1121,11 @@ describe("housekeeping foundation completion contracts", () => {
.find((domain) => domain.id === "people")
?.routes.map((route) => route.id),
).toEqual(PEOPLE_ROUTE_IDS);
expect(
registry.domains
.find((domain) => domain.id === "content")
?.routes.map((route) => route.id),
).toEqual(CONTENT_ROUTE_IDS);
expect(
registry.domains
.find((domain) => domain.id === "system")