create-cogenta 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/bin.d.ts +3 -0
  2. package/dist/bin.d.ts.map +1 -0
  3. package/dist/bin.js +17 -0
  4. package/dist/bin.js.map +1 -0
  5. package/dist/blueprints/association.d.ts +73 -0
  6. package/dist/blueprints/association.d.ts.map +1 -0
  7. package/dist/blueprints/association.js +176 -0
  8. package/dist/blueprints/association.js.map +1 -0
  9. package/dist/blueprints/blog.d.ts +211 -0
  10. package/dist/blueprints/blog.d.ts.map +1 -0
  11. package/dist/blueprints/blog.js +297 -0
  12. package/dist/blueprints/blog.js.map +1 -0
  13. package/dist/blueprints/content-pack.d.ts +54 -0
  14. package/dist/blueprints/content-pack.d.ts.map +1 -0
  15. package/dist/blueprints/content-pack.js +40 -0
  16. package/dist/blueprints/content-pack.js.map +1 -0
  17. package/dist/blueprints/content-packs.d.ts +10 -0
  18. package/dist/blueprints/content-packs.d.ts.map +1 -0
  19. package/dist/blueprints/content-packs.js +26 -0
  20. package/dist/blueprints/content-packs.js.map +1 -0
  21. package/dist/blueprints/documentation.d.ts +71 -0
  22. package/dist/blueprints/documentation.d.ts.map +1 -0
  23. package/dist/blueprints/documentation.js +153 -0
  24. package/dist/blueprints/documentation.js.map +1 -0
  25. package/dist/blueprints/magazine.d.ts +79 -0
  26. package/dist/blueprints/magazine.d.ts.map +1 -0
  27. package/dist/blueprints/magazine.js +163 -0
  28. package/dist/blueprints/magazine.js.map +1 -0
  29. package/dist/blueprints/portfolio.d.ts +73 -0
  30. package/dist/blueprints/portfolio.d.ts.map +1 -0
  31. package/dist/blueprints/portfolio.js +171 -0
  32. package/dist/blueprints/portfolio.js.map +1 -0
  33. package/dist/blueprints/registry.d.ts +23 -0
  34. package/dist/blueprints/registry.d.ts.map +1 -0
  35. package/dist/blueprints/registry.js +42 -0
  36. package/dist/blueprints/registry.js.map +1 -0
  37. package/dist/blueprints/restaurant.d.ts +79 -0
  38. package/dist/blueprints/restaurant.d.ts.map +1 -0
  39. package/dist/blueprints/restaurant.js +175 -0
  40. package/dist/blueprints/restaurant.js.map +1 -0
  41. package/dist/blueprints/saas.d.ts +66 -0
  42. package/dist/blueprints/saas.d.ts.map +1 -0
  43. package/dist/blueprints/saas.js +165 -0
  44. package/dist/blueprints/saas.js.map +1 -0
  45. package/dist/blueprints/vitrine.d.ts +100 -0
  46. package/dist/blueprints/vitrine.d.ts.map +1 -0
  47. package/dist/blueprints/vitrine.js +214 -0
  48. package/dist/blueprints/vitrine.js.map +1 -0
  49. package/dist/config-file.d.ts +13 -0
  50. package/dist/config-file.d.ts.map +1 -0
  51. package/dist/config-file.js +93 -0
  52. package/dist/config-file.js.map +1 -0
  53. package/dist/environment.d.ts +27 -0
  54. package/dist/environment.d.ts.map +1 -0
  55. package/dist/environment.js +91 -0
  56. package/dist/environment.js.map +1 -0
  57. package/dist/index.d.ts +37 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +79 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/llm-setup.d.ts +39 -0
  62. package/dist/llm-setup.d.ts.map +1 -0
  63. package/dist/llm-setup.js +47 -0
  64. package/dist/llm-setup.js.map +1 -0
  65. package/dist/playground-reset.d.ts +27 -0
  66. package/dist/playground-reset.d.ts.map +1 -0
  67. package/dist/playground-reset.js +40 -0
  68. package/dist/playground-reset.js.map +1 -0
  69. package/dist/prompts.d.ts +30 -0
  70. package/dist/prompts.d.ts.map +1 -0
  71. package/dist/prompts.js +63 -0
  72. package/dist/prompts.js.map +1 -0
  73. package/dist/recap.d.ts +19 -0
  74. package/dist/recap.d.ts.map +1 -0
  75. package/dist/recap.js +74 -0
  76. package/dist/recap.js.map +1 -0
  77. package/dist/scaffold.d.ts +49 -0
  78. package/dist/scaffold.d.ts.map +1 -0
  79. package/dist/scaffold.js +170 -0
  80. package/dist/scaffold.js.map +1 -0
  81. package/dist/skin-flow.d.ts +35 -0
  82. package/dist/skin-flow.d.ts.map +1 -0
  83. package/dist/skin-flow.js +56 -0
  84. package/dist/skin-flow.js.map +1 -0
  85. package/dist/skin-preview.d.ts +8 -0
  86. package/dist/skin-preview.d.ts.map +1 -0
  87. package/dist/skin-preview.js +130 -0
  88. package/dist/skin-preview.js.map +1 -0
  89. package/dist/types.d.ts +19 -0
  90. package/dist/types.d.ts.map +1 -0
  91. package/dist/types.js +13 -0
  92. package/dist/types.js.map +1 -0
  93. package/dist/wizard.d.ts +17 -0
  94. package/dist/wizard.d.ts.map +1 -0
  95. package/dist/wizard.js +157 -0
  96. package/dist/wizard.js.map +1 -0
  97. package/package.json +45 -6
  98. package/README.md +0 -39
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portfolio.js","sourceRoot":"","sources":["../../src/blueprints/portfolio.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,kBAAkB,EAClB,gBAAgB,EAChB,CAAC,EACD,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAEL,oBAAoB,EAEpB,gBAAgB,GACjB,MAAM,mBAAmB,CAAA;AAE1B;;;;GAIG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC;IACtC,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE;IACnD,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;IACnC,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;QAC3C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC7C,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EA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E,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;YAC9C,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;SACtD,CAAC,CAAA;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAyB;IACxD,WAAW,EAAE,qBAAqB;IAClC,iBAAiB,EAAE,4BAA4B;IAC/C,eAAe,EAAE,wBAAwB;CAC1C,CAAA"}
@@ -0,0 +1,23 @@
1
+ export interface Blueprint {
2
+ readonly id: string;
3
+ readonly label: string;
4
+ /** `false` for every entry this session did not build (L9 task 8) — visible in the menu, not hidden, but selecting one falls back to `blank` with a note. */
5
+ readonly available: boolean;
6
+ }
7
+ /**
8
+ * "Type de site → sélection d'un blueprint." Every blueprint the lot
9
+ * commits to (`docs/lots/L9-ecosysteme.md`, "## Blueprints") is real as of
10
+ * L9 task 8, batch B: `blank` (empty schema, no demo content), `blog` (L9
11
+ * task 3), `vitrine`/`portfolio`/`documentation` (batch A) and
12
+ * `magazine`/`association`/`restaurant`/`saas` (batch B). Each beyond
13
+ * `blank` has a real `BlueprintContentPack` (`./content-packs.js`).
14
+ */
15
+ export declare const BLUEPRINTS: readonly Blueprint[];
16
+ export declare const DEFAULT_BLUEPRINT_ID = "blank";
17
+ export interface ResolvedBlueprint {
18
+ readonly blueprint: Blueprint;
19
+ /** `true` when the requested id was unknown or not yet available, and `blank` was substituted — the caller must say so, never substitute silently. */
20
+ readonly fellBackToBlank: boolean;
21
+ }
22
+ export declare function resolveBlueprint(id: string): ResolvedBlueprint;
23
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/blueprints/registry.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,6JAA6J;IAC7J,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EAc1C,CAAA;AAED,eAAO,MAAM,oBAAoB,UAAU,CAAA;AAE3C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,sJAAsJ;IACtJ,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;CAClC;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,CAe9D"}
@@ -0,0 +1,42 @@
1
+ import { CogentaError } from '@cogenta/core';
2
+ /**
3
+ * "Type de site → sélection d'un blueprint." Every blueprint the lot
4
+ * commits to (`docs/lots/L9-ecosysteme.md`, "## Blueprints") is real as of
5
+ * L9 task 8, batch B: `blank` (empty schema, no demo content), `blog` (L9
6
+ * task 3), `vitrine`/`portfolio`/`documentation` (batch A) and
7
+ * `magazine`/`association`/`restaurant`/`saas` (batch B). Each beyond
8
+ * `blank` has a real `BlueprintContentPack` (`./content-packs.js`).
9
+ */
10
+ export const BLUEPRINTS = [
11
+ { id: 'blank', label: 'Blank — empty schema, nothing pre-configured', available: true },
12
+ { id: 'vitrine', label: 'Showcase site — services, testimonials, demo content', available: true },
13
+ { id: 'blog', label: 'Blog — posts, categories, demo content', available: true },
14
+ { id: 'magazine', label: 'Magazine — articles by section, demo content', available: true },
15
+ { id: 'portfolio', label: 'Portfolio — projects, demo content', available: true },
16
+ {
17
+ id: 'documentation',
18
+ label: 'Documentation site — ordered doc pages, demo content',
19
+ available: true,
20
+ },
21
+ { id: 'association', label: 'Nonprofit / association — events, demo content', available: true },
22
+ { id: 'restaurant', label: 'Restaurant — menu, demo content', available: true },
23
+ { id: 'saas', label: 'SaaS — features, demo content', available: true },
24
+ ];
25
+ export const DEFAULT_BLUEPRINT_ID = 'blank';
26
+ export function resolveBlueprint(id) {
27
+ const requested = BLUEPRINTS.find((entry) => entry.id === id);
28
+ if (requested?.available) {
29
+ return { blueprint: requested, fellBackToBlank: false };
30
+ }
31
+ const blank = BLUEPRINTS.find((entry) => entry.id === DEFAULT_BLUEPRINT_ID);
32
+ if (blank === undefined) {
33
+ throw new CogentaError({
34
+ code: 'BLUEPRINT_REGISTRY_CORRUPT',
35
+ message: 'The "blank" blueprint is missing from the registry.',
36
+ hint: 'BLUEPRINTS must always include an entry whose id is DEFAULT_BLUEPRINT_ID — this is a bug in the registry, not a user-facing condition.',
37
+ details: { defaultBlueprintId: DEFAULT_BLUEPRINT_ID },
38
+ });
39
+ }
40
+ return { blueprint: blank, fellBackToBlank: true };
41
+ }
42
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/blueprints/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAS5C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAyB;IAC9C,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,8CAA8C,EAAE,SAAS,EAAE,IAAI,EAAE;IACvF,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,sDAAsD,EAAE,SAAS,EAAE,IAAI,EAAE;IACjG,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,wCAAwC,EAAE,SAAS,EAAE,IAAI,EAAE;IAChF,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,8CAA8C,EAAE,SAAS,EAAE,IAAI,EAAE;IAC1F,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,oCAAoC,EAAE,SAAS,EAAE,IAAI,EAAE;IACjF;QACE,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,sDAAsD;QAC7D,SAAS,EAAE,IAAI;KAChB;IACD,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,gDAAgD,EAAE,SAAS,EAAE,IAAI,EAAE;IAC/F,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,iCAAiC,EAAE,SAAS,EAAE,IAAI,EAAE;IAC/E,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,+BAA+B,EAAE,SAAS,EAAE,IAAI,EAAE;CACxE,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAA;AAQ3C,MAAM,UAAU,gBAAgB,CAAC,EAAU;IACzC,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAC7D,IAAI,SAAS,EAAE,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,CAAA;IACzD,CAAC;IACD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,oBAAoB,CAAC,CAAA;IAC3E,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,YAAY,CAAC;YACrB,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,qDAAqD;YAC9D,IAAI,EAAE,wIAAwI;YAC9I,OAAO,EAAE,EAAE,kBAAkB,EAAE,oBAAoB,EAAE;SACtD,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,CAAA;AACpD,CAAC"}
@@ -0,0 +1,79 @@
1
+ import type { VocabularyBlock } from '@cogenta/blocks';
2
+ import { type CollectionDefinition } from '@cogenta/schema';
3
+ import { type BlueprintContentPack, type RecommendedAgentHint } from './content-pack.js';
4
+ /**
5
+ * The `restaurant` blueprint's content model (L9 task 8, batch B): a
6
+ * `menuItem` collection, grouped by `category` rather than a separate
7
+ * category collection (the same restraint `magazine`'s `section` field
8
+ * uses — one grouping mechanism, not two). Routed even though nothing
9
+ * deep-links to an individual item today, so the home page's live menu
10
+ * list (`collectionList`) can build a real link for each entry, exactly
11
+ * like every other blueprint's routed, listed collection.
12
+ */
13
+ export declare const menuItem: {
14
+ readonly name: "menu_item";
15
+ readonly labels: {
16
+ readonly singular: "Menu item";
17
+ readonly plural: "Menu items";
18
+ };
19
+ readonly routing: {
20
+ readonly pattern: "/menu/:slug";
21
+ };
22
+ readonly fields: {
23
+ name: import("@cogenta/schema").FieldDefinition & {
24
+ readonly kind: "text";
25
+ readonly options: Readonly<Record<string, unknown>>;
26
+ };
27
+ slug: import("@cogenta/schema").FieldDefinition & {
28
+ readonly kind: "slug";
29
+ readonly options: Readonly<Record<string, unknown>>;
30
+ };
31
+ description: import("@cogenta/schema").FieldDefinition & {
32
+ readonly kind: "text";
33
+ readonly options: Readonly<Record<string, unknown>>;
34
+ };
35
+ price: import("@cogenta/schema").FieldDefinition & {
36
+ readonly kind: "number";
37
+ readonly options: Readonly<Record<string, unknown>>;
38
+ };
39
+ category: import("@cogenta/schema").FieldDefinition & {
40
+ readonly kind: "select";
41
+ readonly options: {
42
+ options: readonly import("@cogenta/schema").SelectChoice[];
43
+ many: boolean;
44
+ };
45
+ };
46
+ };
47
+ readonly indexes: readonly [readonly ["slug"], readonly ["category"]];
48
+ readonly permissions: {
49
+ readonly read: readonly ["public"];
50
+ readonly create: readonly ["editor", "admin"];
51
+ readonly update: readonly ["editor", "admin"];
52
+ readonly delete: readonly ["admin"];
53
+ };
54
+ };
55
+ export declare const page: CollectionDefinition;
56
+ export declare const RESTAURANT_COLLECTIONS: readonly CollectionDefinition[];
57
+ export interface RestaurantDemoMenuItem {
58
+ readonly name: string;
59
+ readonly slug: string;
60
+ readonly description: string;
61
+ readonly price: number;
62
+ readonly category: 'Starters' | 'Mains' | 'Desserts';
63
+ }
64
+ export declare const RESTAURANT_DEMO_MENU_ITEMS: readonly RestaurantDemoMenuItem[];
65
+ export interface RestaurantDemoPage {
66
+ readonly title: string;
67
+ readonly slug: string;
68
+ readonly blocks: readonly VocabularyBlock[];
69
+ }
70
+ /**
71
+ * `home` (hero + a live list of menu highlights + a cta to reserve) and
72
+ * `contact` (prose with hours and location — plain text fields, contract A
73
+ * has no dedicated "opening hours" field kind and none is warranted for
74
+ * two lines of text).
75
+ */
76
+ export declare const RESTAURANT_DEMO_PAGES: readonly RestaurantDemoPage[];
77
+ export declare const RESTAURANT_RECOMMENDED_AGENTS: readonly RecommendedAgentHint[];
78
+ export declare const restaurantContentPack: BlueprintContentPack;
79
+ //# sourceMappingURL=restaurant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restaurant.d.ts","sourceRoot":"","sources":["../../src/blueprints/restaurant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EACL,KAAK,oBAAoB,EAK1B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EAE1B,MAAM,mBAAmB,CAAA;AAE1B;;;;;;;;GAQG;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;QAKjB,IAAI;;;;QACJ,IAAI;;;;QACJ,WAAW;;;;QACX,KAAK;;;;QACL,QAAQ;;;;;;;;;;;;;;;CASV,CAAA;AAEF,eAAO,MAAM,IAAI,sBAAiC,CAAA;AAElD,eAAO,MAAM,sBAAsB,EAAE,SAAS,oBAAoB,EAAqB,CAAA;AAIvF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,CAAA;CACrD;AAED,eAAO,MAAM,0BAA0B,EAAE,SAAS,sBAAsB,EAoCvE,CAAA;AAqBD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;CAC5C;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAyC9D,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,SAAS,oBAAoB,EAWxE,CAAA;AAsCD,eAAO,MAAM,qBAAqB,EAAE,oBAInC,CAAA"}
@@ -0,0 +1,175 @@
1
+ import { createContentStore, defineCollection, f, validateCollectionSet, } from '@cogenta/schema';
2
+ import { definePageCollection, toBlockZoneEntry, } from './content-pack.js';
3
+ /**
4
+ * The `restaurant` blueprint's content model (L9 task 8, batch B): a
5
+ * `menuItem` collection, grouped by `category` rather than a separate
6
+ * category collection (the same restraint `magazine`'s `section` field
7
+ * uses — one grouping mechanism, not two). Routed even though nothing
8
+ * deep-links to an individual item today, so the home page's live menu
9
+ * list (`collectionList`) can build a real link for each entry, exactly
10
+ * like every other blueprint's routed, listed collection.
11
+ */
12
+ export const menuItem = defineCollection({
13
+ name: 'menu_item',
14
+ labels: { singular: 'Menu item', plural: 'Menu items' },
15
+ routing: { pattern: '/menu/:slug' },
16
+ fields: {
17
+ name: f.text({ required: true, max: 120 }),
18
+ slug: f.slug({ from: 'name', unique: true }),
19
+ description: f.text({ max: 300, multiline: true }),
20
+ price: f.number({ required: true, min: 0 }),
21
+ category: f.select({ options: ['Starters', 'Mains', 'Desserts'], required: true }),
22
+ },
23
+ indexes: [['slug'], ['category']],
24
+ permissions: {
25
+ read: ['public'],
26
+ create: ['editor', 'admin'],
27
+ update: ['editor', 'admin'],
28
+ delete: ['admin'],
29
+ },
30
+ });
31
+ export const page = definePageCollection('/:slug');
32
+ export const RESTAURANT_COLLECTIONS = [menuItem, page];
33
+ validateCollectionSet(RESTAURANT_COLLECTIONS);
34
+ export const RESTAURANT_DEMO_MENU_ITEMS = [
35
+ {
36
+ name: 'Roasted beet salad',
37
+ slug: 'roasted-beet-salad',
38
+ description: 'Beets, goat cheese, walnuts, a light citrus dressing.',
39
+ price: 9.5,
40
+ category: 'Starters',
41
+ },
42
+ {
43
+ name: 'Soup of the day',
44
+ slug: 'soup-of-the-day',
45
+ description: 'Changes with the season, always made from scratch.',
46
+ price: 7,
47
+ category: 'Starters',
48
+ },
49
+ {
50
+ name: 'Pan-seared trout',
51
+ slug: 'pan-seared-trout',
52
+ description: 'Local trout, brown butter, seasonal vegetables.',
53
+ price: 22,
54
+ category: 'Mains',
55
+ },
56
+ {
57
+ name: 'Wild mushroom risotto',
58
+ slug: 'wild-mushroom-risotto',
59
+ description: 'Arborio rice, a mix of wild mushrooms, parmesan.',
60
+ price: 18,
61
+ category: 'Mains',
62
+ },
63
+ {
64
+ name: 'Chocolate tart',
65
+ slug: 'chocolate-tart',
66
+ description: 'Dark chocolate, sea salt, a short pastry crust.',
67
+ price: 8,
68
+ category: 'Desserts',
69
+ },
70
+ ];
71
+ const BLOCK_VERSION = '1.0.0';
72
+ function proseParagraph(key, text) {
73
+ return {
74
+ _key: key,
75
+ _type: 'prose',
76
+ _version: BLOCK_VERSION,
77
+ body: [
78
+ {
79
+ _key: `${key}-block`,
80
+ _type: 'block',
81
+ style: 'normal',
82
+ children: [{ _key: `${key}-span`, _type: 'span', text, marks: [] }],
83
+ markDefs: [],
84
+ },
85
+ ],
86
+ };
87
+ }
88
+ /**
89
+ * `home` (hero + a live list of menu highlights + a cta to reserve) and
90
+ * `contact` (prose with hours and location — plain text fields, contract A
91
+ * has no dedicated "opening hours" field kind and none is warranted for
92
+ * two lines of text).
93
+ */
94
+ export const RESTAURANT_DEMO_PAGES = [
95
+ {
96
+ title: 'Home',
97
+ slug: 'home',
98
+ blocks: [
99
+ {
100
+ _key: 'demo-home-hero',
101
+ _type: 'hero',
102
+ _version: BLOCK_VERSION,
103
+ eyebrow: 'Restaurant',
104
+ title: 'Seasonal, simple, close to home',
105
+ subtitle: 'Scaffolded by create-cogenta from the "restaurant" blueprint, with a real demo menu already in place.',
106
+ actions: [{ label: 'Reserve a table', target: { href: '/contact' }, emphasis: 'primary' }],
107
+ },
108
+ {
109
+ _key: 'demo-home-menu',
110
+ _type: 'collectionList',
111
+ _version: BLOCK_VERSION,
112
+ title: 'From the menu',
113
+ collection: 'menu_item',
114
+ sort: { field: 'createdAt', direction: 'asc' },
115
+ limit: 10,
116
+ layout: 'grid',
117
+ },
118
+ ],
119
+ },
120
+ {
121
+ title: 'Contact',
122
+ slug: 'contact',
123
+ blocks: [
124
+ proseParagraph('demo-contact-prose', 'This is a demo restaurant site, scaffolded by create-cogenta from the "restaurant" blueprint. Its menu and this page were seeded by the installer so there is real content to look at from the first run.'),
125
+ proseParagraph('demo-contact-hours', 'Open Tuesday to Sunday, 18:00 to 23:00. 12 Market Street. Reservations recommended on weekends.'),
126
+ ],
127
+ },
128
+ ];
129
+ export const RESTAURANT_RECOMMENDED_AGENTS = [
130
+ {
131
+ name: 'seoAgent',
132
+ package: '@cogenta/agents-builtin',
133
+ reason: 'Audits the menu and contact pages so the restaurant is findable by name and cuisine.',
134
+ },
135
+ {
136
+ name: 'performanceAgent',
137
+ package: '@cogenta/agents-builtin',
138
+ reason: 'Catches oversized food photography before it slows the menu page down.',
139
+ },
140
+ ];
141
+ /**
142
+ * Inserts the `restaurant` blueprint's demo content through the real
143
+ * `ContentStore` — never mocked (house rule).
144
+ */
145
+ async function seedRestaurantDemoContent(db, defaultLocale, adminId) {
146
+ const menuItemStore = createContentStore({ db, collection: menuItem, defaultLocale });
147
+ const pageStore = createContentStore({ db, collection: page, defaultLocale });
148
+ for (const demo of RESTAURANT_DEMO_MENU_ITEMS) {
149
+ await menuItemStore.create({
150
+ status: 'published',
151
+ createdBy: adminId,
152
+ values: {
153
+ name: demo.name,
154
+ slug: demo.slug,
155
+ description: demo.description,
156
+ price: demo.price,
157
+ category: demo.category,
158
+ },
159
+ });
160
+ }
161
+ for (const demo of RESTAURANT_DEMO_PAGES) {
162
+ await pageStore.create({
163
+ status: 'published',
164
+ createdBy: adminId,
165
+ values: { title: demo.title, slug: demo.slug },
166
+ blocks: { blocks: demo.blocks.map(toBlockZoneEntry) },
167
+ });
168
+ }
169
+ }
170
+ export const restaurantContentPack = {
171
+ collections: RESTAURANT_COLLECTIONS,
172
+ recommendedAgents: RESTAURANT_RECOMMENDED_AGENTS,
173
+ seedDemoContent: seedRestaurantDemoContent,
174
+ };
175
+ //# sourceMappingURL=restaurant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restaurant.js","sourceRoot":"","sources":["../../src/blueprints/restaurant.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,kBAAkB,EAClB,gBAAgB,EAChB,CAAC,EACD,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAEL,oBAAoB,EAEpB,gBAAgB,GACjB,MAAM,mBAAmB,CAAA;AAE1B;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAgB,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE;IACvD,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;IACnC,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;QAC1C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC5C,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAClD,KAAK,EAAE,CAAC,CAAC,MAAM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AK,MAAM,IAAI,IAAI,qBAAqB,EAAE,CAAC;QACzC,MAAM,SAAS,CAAC,MAAM,CAAC;YACrB,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE,OAAO;YAClB,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;YAC9C,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;SACtD,CAAC,CAAA;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAyB;IACzD,WAAW,EAAE,sBAAsB;IACnC,iBAAiB,EAAE,6BAA6B;IAChD,eAAe,EAAE,yBAAyB;CAC3C,CAAA"}
@@ -0,0 +1,66 @@
1
+ import type { VocabularyBlock } from '@cogenta/blocks';
2
+ import { type CollectionDefinition } from '@cogenta/schema';
3
+ import { type BlueprintContentPack, type RecommendedAgentHint } from './content-pack.js';
4
+ /**
5
+ * The `saas` blueprint's content model (L9 task 8, batch B): a marketing
6
+ * site for a software product — a `feature` collection routed so it can be
7
+ * listed live on the home page, exactly like `vitrine`'s `service`.
8
+ * Deliberately no `pricingPlan` collection or billing model: pricing tiers
9
+ * on a real SaaS site are usually a handful of numbers with no independent
10
+ * lifecycle (no author, no publish date, no individual page), so they are
11
+ * page-authored content on the `pricing` page below rather than a second
12
+ * collection invented to hold three rows.
13
+ */
14
+ export declare const feature: {
15
+ readonly name: "feature";
16
+ readonly labels: {
17
+ readonly singular: "Feature";
18
+ readonly plural: "Features";
19
+ };
20
+ readonly routing: {
21
+ readonly pattern: "/features/:slug";
22
+ };
23
+ readonly fields: {
24
+ name: import("@cogenta/schema").FieldDefinition & {
25
+ readonly kind: "text";
26
+ readonly options: Readonly<Record<string, unknown>>;
27
+ };
28
+ slug: import("@cogenta/schema").FieldDefinition & {
29
+ readonly kind: "slug";
30
+ readonly options: Readonly<Record<string, unknown>>;
31
+ };
32
+ description: import("@cogenta/schema").FieldDefinition & {
33
+ readonly kind: "text";
34
+ readonly options: Readonly<Record<string, unknown>>;
35
+ };
36
+ };
37
+ readonly indexes: readonly [readonly ["slug"]];
38
+ readonly permissions: {
39
+ readonly read: readonly ["public"];
40
+ readonly create: readonly ["editor", "admin"];
41
+ readonly update: readonly ["editor", "admin"];
42
+ readonly delete: readonly ["admin"];
43
+ };
44
+ };
45
+ export declare const page: CollectionDefinition;
46
+ export declare const SAAS_COLLECTIONS: readonly CollectionDefinition[];
47
+ export interface SaasDemoFeature {
48
+ readonly name: string;
49
+ readonly slug: string;
50
+ readonly description: string;
51
+ }
52
+ export declare const SAAS_DEMO_FEATURES: readonly SaasDemoFeature[];
53
+ export interface SaasDemoPage {
54
+ readonly title: string;
55
+ readonly slug: string;
56
+ readonly blocks: readonly VocabularyBlock[];
57
+ }
58
+ /**
59
+ * `home` (hero + a live list of features + a cta to sign up) and `pricing`
60
+ * (a short prose intro plus a static `stats` row — the page-authored
61
+ * numbers a pricing page usually leads with, not a full billing model).
62
+ */
63
+ export declare const SAAS_DEMO_PAGES: readonly SaasDemoPage[];
64
+ export declare const SAAS_RECOMMENDED_AGENTS: readonly RecommendedAgentHint[];
65
+ export declare const saasContentPack: BlueprintContentPack;
66
+ //# sourceMappingURL=saas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"saas.d.ts","sourceRoot":"","sources":["../../src/blueprints/saas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EACL,KAAK,oBAAoB,EAK1B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EAE1B,MAAM,mBAAmB,CAAA;AAE1B;;;;;;;;;GASG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;QAKhB,IAAI;;;;QACJ,IAAI;;;;QACJ,WAAW;;;;;;;;;;;;CASb,CAAA;AAEF,eAAO,MAAM,IAAI,sBAAiC,CAAA;AAElD,eAAO,MAAM,gBAAgB,EAAE,SAAS,oBAAoB,EAAoB,CAAA;AAIhF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAgBxD,CAAA;AAqBD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;CAC5C;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAwDlD,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,SAAS,oBAAoB,EAWlE,CAAA;AAgCD,eAAO,MAAM,eAAe,EAAE,oBAI7B,CAAA"}
@@ -0,0 +1,165 @@
1
+ import { createContentStore, defineCollection, f, validateCollectionSet, } from '@cogenta/schema';
2
+ import { definePageCollection, toBlockZoneEntry, } from './content-pack.js';
3
+ /**
4
+ * The `saas` blueprint's content model (L9 task 8, batch B): a marketing
5
+ * site for a software product — a `feature` collection routed so it can be
6
+ * listed live on the home page, exactly like `vitrine`'s `service`.
7
+ * Deliberately no `pricingPlan` collection or billing model: pricing tiers
8
+ * on a real SaaS site are usually a handful of numbers with no independent
9
+ * lifecycle (no author, no publish date, no individual page), so they are
10
+ * page-authored content on the `pricing` page below rather than a second
11
+ * collection invented to hold three rows.
12
+ */
13
+ export const feature = defineCollection({
14
+ name: 'feature',
15
+ labels: { singular: 'Feature', plural: 'Features' },
16
+ routing: { pattern: '/features/:slug' },
17
+ fields: {
18
+ name: f.text({ required: true, max: 120 }),
19
+ slug: f.slug({ from: 'name', unique: true }),
20
+ description: f.text({ max: 300, multiline: true }),
21
+ },
22
+ indexes: [['slug']],
23
+ permissions: {
24
+ read: ['public'],
25
+ create: ['editor', 'admin'],
26
+ update: ['editor', 'admin'],
27
+ delete: ['admin'],
28
+ },
29
+ });
30
+ export const page = definePageCollection('/:slug');
31
+ export const SAAS_COLLECTIONS = [feature, page];
32
+ validateCollectionSet(SAAS_COLLECTIONS);
33
+ export const SAAS_DEMO_FEATURES = [
34
+ {
35
+ name: 'Real-time collaboration',
36
+ slug: 'real-time-collaboration',
37
+ description: 'Everyone on the team sees the same state, updated the instant it changes.',
38
+ },
39
+ {
40
+ name: 'One-click integrations',
41
+ slug: 'one-click-integrations',
42
+ description: 'Connect the tools already in use without a single line of code.',
43
+ },
44
+ {
45
+ name: 'Audit trail built in',
46
+ slug: 'audit-trail-built-in',
47
+ description: 'Every change is logged, diffed and reversible — nothing happens silently.',
48
+ },
49
+ ];
50
+ const BLOCK_VERSION = '1.0.0';
51
+ function proseParagraph(key, text) {
52
+ return {
53
+ _key: key,
54
+ _type: 'prose',
55
+ _version: BLOCK_VERSION,
56
+ body: [
57
+ {
58
+ _key: `${key}-block`,
59
+ _type: 'block',
60
+ style: 'normal',
61
+ children: [{ _key: `${key}-span`, _type: 'span', text, marks: [] }],
62
+ markDefs: [],
63
+ },
64
+ ],
65
+ };
66
+ }
67
+ /**
68
+ * `home` (hero + a live list of features + a cta to sign up) and `pricing`
69
+ * (a short prose intro plus a static `stats` row — the page-authored
70
+ * numbers a pricing page usually leads with, not a full billing model).
71
+ */
72
+ export const SAAS_DEMO_PAGES = [
73
+ {
74
+ title: 'Home',
75
+ slug: 'home',
76
+ blocks: [
77
+ {
78
+ _key: 'demo-home-hero',
79
+ _type: 'hero',
80
+ _version: BLOCK_VERSION,
81
+ eyebrow: 'SaaS',
82
+ title: 'Ship faster, with less friction',
83
+ subtitle: 'Scaffolded by create-cogenta from the "saas" blueprint, with real demo features already in place.',
84
+ actions: [{ label: 'Start free trial', target: { href: '/pricing' }, emphasis: 'primary' }],
85
+ },
86
+ {
87
+ _key: 'demo-home-features',
88
+ _type: 'collectionList',
89
+ _version: BLOCK_VERSION,
90
+ title: 'Features',
91
+ collection: 'feature',
92
+ sort: { field: 'createdAt', direction: 'asc' },
93
+ limit: 10,
94
+ layout: 'grid',
95
+ },
96
+ {
97
+ _key: 'demo-home-cta',
98
+ _type: 'cta',
99
+ _version: BLOCK_VERSION,
100
+ title: 'Ready to try it?',
101
+ text: 'No credit card required for the trial. Every feature above is normal editable content.',
102
+ actions: [{ label: 'See pricing', target: { href: '/pricing' }, emphasis: 'primary' }],
103
+ },
104
+ ],
105
+ },
106
+ {
107
+ title: 'Pricing',
108
+ slug: 'pricing',
109
+ blocks: [
110
+ proseParagraph('demo-pricing-prose', 'This is a demo SaaS site, scaffolded by create-cogenta from the "saas" blueprint. Its features and this page were seeded by the installer so there is real content to look at from the first run.'),
111
+ {
112
+ _key: 'demo-pricing-stats',
113
+ _type: 'stats',
114
+ _version: BLOCK_VERSION,
115
+ title: 'Trusted at scale',
116
+ items: [
117
+ { _key: 'demo-stat-1', value: '4.8', unit: '/5', label: 'average rating' },
118
+ { _key: 'demo-stat-2', value: '99.9', unit: '%', label: 'uptime' },
119
+ { _key: 'demo-stat-3', value: '2,400+', label: 'teams onboarded' },
120
+ ],
121
+ },
122
+ ],
123
+ },
124
+ ];
125
+ export const SAAS_RECOMMENDED_AGENTS = [
126
+ {
127
+ name: 'performanceAgent',
128
+ package: '@cogenta/agents-builtin',
129
+ reason: 'Catches regressions on the marketing pages that most directly drive sign-ups.',
130
+ },
131
+ {
132
+ name: 'securityAgent',
133
+ package: '@cogenta/agents-builtin',
134
+ reason: 'Tracks dependency vulnerabilities — the kind of thing a SaaS buyer asks about first.',
135
+ },
136
+ ];
137
+ /**
138
+ * Inserts the `saas` blueprint's demo content through the real
139
+ * `ContentStore` — never mocked (house rule).
140
+ */
141
+ async function seedSaasDemoContent(db, defaultLocale, adminId) {
142
+ const featureStore = createContentStore({ db, collection: feature, defaultLocale });
143
+ const pageStore = createContentStore({ db, collection: page, defaultLocale });
144
+ for (const demo of SAAS_DEMO_FEATURES) {
145
+ await featureStore.create({
146
+ status: 'published',
147
+ createdBy: adminId,
148
+ values: { name: demo.name, slug: demo.slug, description: demo.description },
149
+ });
150
+ }
151
+ for (const demo of SAAS_DEMO_PAGES) {
152
+ await pageStore.create({
153
+ status: 'published',
154
+ createdBy: adminId,
155
+ values: { title: demo.title, slug: demo.slug },
156
+ blocks: { blocks: demo.blocks.map(toBlockZoneEntry) },
157
+ });
158
+ }
159
+ }
160
+ export const saasContentPack = {
161
+ collections: SAAS_COLLECTIONS,
162
+ recommendedAgents: SAAS_RECOMMENDED_AGENTS,
163
+ seedDemoContent: seedSaasDemoContent,
164
+ };
165
+ //# sourceMappingURL=saas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"saas.js","sourceRoot":"","sources":["../../src/blueprints/saas.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,kBAAkB,EAClB,gBAAgB,EAChB,CAAC,EACD,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAEL,oBAAoB,EAEpB,gBAAgB,GACjB,MAAM,mBAAmB,CAAA;AAE1B;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC;IACtC,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE;IACnD,OAAO,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE;IACvC,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;QAC1C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC5C,WAAW,EAAE,CAAC,CAAC,IAAI,C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