@eventcatalog/core 2.32.2 → 2.33.1

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 (41) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +8 -4
  4. package/dist/analytics/log-build.d.cts +3 -2
  5. package/dist/analytics/log-build.d.ts +3 -2
  6. package/dist/analytics/log-build.js +3 -3
  7. package/dist/{chunk-JJKQS722.js → chunk-IVIWGH2J.js} +1 -1
  8. package/dist/{chunk-IHJ2QDXX.js → chunk-R3X2SCY6.js} +8 -4
  9. package/dist/{chunk-DSBB2TAS.js → chunk-VDBGM3NV.js} +1 -1
  10. package/dist/{chunk-NJGR7XUU.js → chunk-ZIZUBYNO.js} +52 -9
  11. package/dist/constants.cjs +1 -1
  12. package/dist/constants.js +1 -1
  13. package/dist/eventcatalog.cjs +79 -23
  14. package/dist/eventcatalog.js +27 -16
  15. package/dist/features.cjs +54 -10
  16. package/dist/features.d.cts +3 -2
  17. package/dist/features.d.ts +3 -2
  18. package/dist/features.js +5 -3
  19. package/eventcatalog/public/images/eventcatalog-upgrade.png +0 -0
  20. package/eventcatalog/src/components/Lists/CustomSideBarSectionList.astro +1 -13
  21. package/eventcatalog/src/components/MDX/ResourceGroupTable/ResourceGroupTable.astro +1 -13
  22. package/eventcatalog/src/components/MDX/ResourceLink/ResourceLink.astro +1 -12
  23. package/eventcatalog/src/components/MDX/SchemaViewer/SchemaViewer.astro +3 -29
  24. package/eventcatalog/src/components/MDX/components.tsx +1 -1
  25. package/eventcatalog/src/enterprise/ai-assistant/components/ChatSidebar.tsx +59 -61
  26. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +26 -1
  27. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +72 -34
  28. package/eventcatalog/src/pages/chat/feature.astro +159 -0
  29. package/eventcatalog/src/pages/chat/index.astro +6 -2
  30. package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +3 -9
  31. package/eventcatalog/src/pages/docs/custom/[...path].mdx.ts +32 -0
  32. package/eventcatalog/src/pages/docs/custom/feature.astro +165 -0
  33. package/eventcatalog/src/pages/docs/custom/index.astro +6 -2
  34. package/eventcatalog/src/pages/docs/llm/llms-full.txt.ts +19 -2
  35. package/eventcatalog/src/pages/docs/llm/llms.txt.ts +10 -0
  36. package/eventcatalog/src/pages/plans/index.astro +292 -0
  37. package/eventcatalog/src/utils/collections/util.ts +12 -0
  38. package/eventcatalog/src/utils/feature.ts +21 -5
  39. package/eventcatalog/src/utils/markdown.ts +30 -0
  40. package/package.json +1 -1
  41. package/eventcatalog/src/pages/pro/index.astro +0 -272
@@ -0,0 +1,159 @@
1
+ ---
2
+ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
+ import { isEventCatalogChatEnabled as hasEventCatlaogChatLicense } from '@utils/feature';
4
+ import { BotMessageSquare } from 'lucide-react';
5
+ const hasChatLicense = hasEventCatlaogChatLicense();
6
+
7
+ if (hasChatLicense) {
8
+ return Astro.redirect('/chat');
9
+ }
10
+ ---
11
+
12
+ <VerticalSideBarLayout title="AI Chat">
13
+ <div class="min-h-[calc(100vh-60px)] bg-white">
14
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
15
+ {/* Hero Section */}
16
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center mb-16">
17
+ <div>
18
+ <div class="inline-flex items-center px-4 py-2 rounded-full bg-purple-100 text-purple-700 font-medium text-sm mb-6">
19
+ <BotMessageSquare className="w-4 h-4 mr-2" />
20
+ New: Ask your catalog anything
21
+ </div>
22
+ <h1 class="text-4xl font-bold text-gray-900 tracking-tight mb-4">Ask. Understand. Ship faster.</h1>
23
+ <p class="text-xl text-gray-600 mb-8">
24
+ Get answers about your events, services, and domains — instantly. Runs entirely in your browser — your data never
25
+ leaves your machine.
26
+ </p>
27
+ <div class="flex flex-col sm:flex-row gap-4 mb-8">
28
+ <a
29
+ href="https://demo.eventcatalog.dev/chat"
30
+ target="_blank"
31
+ class="inline-flex items-center juNot ready for AI chat? You castify-center px-6 py-3 border border-transparent text-base font-medium rounded-lg text-white bg-purple-600 hover:bg-purple-700 transition-colors duration-150"
32
+ >
33
+ Try the demo
34
+ <svg class="ml-2 w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
35
+ <path
36
+ fill-rule="evenodd"
37
+ d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z"
38
+ clip-rule="evenodd"></path>
39
+ </svg>
40
+ </a>
41
+ <a
42
+ href="https://www.eventcatalog.cloud"
43
+ target="_blank"
44
+ class="inline-flex items-center justify-center px-6 py-3 border border-gray-300 text-base font-medium rounded-lg text-gray-700 bg-white hover:bg-gray-50 transition-colors duration-150"
45
+ >
46
+ Try for free
47
+ </a>
48
+ </div>
49
+ <p class="text-sm text-gray-500">
50
+ Available with EventCatalog Starter or Scale plans
51
+ <a href="https://www.eventcatalog.dev/pricing" class="text-purple-600 font-medium block"
52
+ >Try free for 14 days, no credit card required</a
53
+ >
54
+ </p>
55
+ </div>
56
+
57
+ <div class="relative">
58
+ <div class="absolute -inset-4">
59
+ <div
60
+ class="w-full h-full max-w-full mx-auto opacity-30 blur-lg filter"
61
+ style="background: linear-gradient(90deg, #C084FC 0%, #818CF8 100%);"
62
+ >
63
+ </div>
64
+ </div>
65
+ <div class="relative">
66
+ <div class="bg-white rounded-xl shadow-xl border border-gray-200 overflow-hidden">
67
+ <div class="bg-gray-50 px-4 py-3 border-b border-gray-200">
68
+ <div class="flex items-center space-x-2">
69
+ <div class="w-3 h-3 bg-red-400 rounded-full"></div>
70
+ <div class="w-3 h-3 bg-yellow-400 rounded-full"></div>
71
+ <div class="w-3 h-3 bg-green-400 rounded-full"></div>
72
+ </div>
73
+ </div>
74
+ <div class="p-4 space-y-4">
75
+ <div class="flex justify-end">
76
+ <div class="bg-purple-600 text-white rounded-2xl rounded-tr-sm px-4 py-2 max-w-md text-sm">
77
+ What services publish order.created?
78
+ </div>
79
+ </div>
80
+
81
+ <div class="flex justify-start">
82
+ <div class="bg-gray-50 rounded-2xl rounded-tl-sm px-4 py-3 max-w-md shadow-sm">
83
+ <p class="text-gray-700 text-sm">
84
+ The <span class="font-semibold">Order Service</span> publishes the order.created event.
85
+ </p>
86
+ <p class="text-gray-700 text-sm mt-2 mb-1">This event is consumed by:</p>
87
+ <ul class="space-y-1 text-gray-600 text-sm">
88
+ <li>• Payment Service - Initiates payment processing</li>
89
+ <li>• Inventory Service - Updates stock levels</li>
90
+ <li>• Notification Service - Sends order confirmations</li>
91
+ </ul>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ </div>
99
+
100
+ {/* Features Section */}
101
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
102
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
103
+ <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
104
+ <svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
105
+ <path
106
+ d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"
107
+ ></path>
108
+ </svg>
109
+ </div>
110
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">Instant Search</h3>
111
+ <p class="text-gray-600">
112
+ Search and understand complex service relationships in seconds with natural language queries.
113
+ </p>
114
+ </div>
115
+
116
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
117
+ <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
118
+ <svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
119
+ <path
120
+ d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"
121
+ ></path>
122
+ </svg>
123
+ </div>
124
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">Smart Insights</h3>
125
+ <p class="text-gray-600">Get intelligent suggestions and insights about your architecture automatically.</p>
126
+ </div>
127
+
128
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
129
+ <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
130
+ <svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
131
+ <path
132
+ d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"
133
+ ></path>
134
+ </svg>
135
+ </div>
136
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">Privacy First</h3>
137
+ <p class="text-gray-600">All processing happens locally in your browser. Your data never leaves your machine.</p>
138
+ </div>
139
+ </div>
140
+
141
+ {/* Bottom Link */}
142
+ <div class="mt-16 text-center">
143
+ <a
144
+ href="https://www.eventcatalog.dev/docs/development/guides/customize-sidebars/application-sidebar"
145
+ target="_blank"
146
+ class="text-sm text-gray-400 hover:text-gray-500 transition-colors duration-150"
147
+ >
148
+ Not ready for AI chat? You can hide this feature in settings
149
+ </a>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </VerticalSideBarLayout>
154
+
155
+ <style>
156
+ .scroll-smooth {
157
+ scroll-behavior: smooth;
158
+ }
159
+ </style>
@@ -4,9 +4,9 @@ import Chat from '@enterprise/ai-assistant/components/Chat';
4
4
  import config from '@config';
5
5
  import path from 'node:path';
6
6
  import fs from 'node:fs';
7
-
7
+ import { isEventCatalogChatEnabled } from '@utils/feature';
8
8
  import { Code } from 'astro-expressive-code/components';
9
-
9
+ import { buildUrl } from '@utils/url-builder';
10
10
  const isEnabled = config.chat?.enabled || false;
11
11
  const chatConfig = config.chat || {};
12
12
 
@@ -25,6 +25,10 @@ const generatorConfig = `
25
25
  ],
26
26
  ],
27
27
  `;
28
+
29
+ if (!isEventCatalogChatEnabled()) {
30
+ return Astro.redirect(buildUrl('/chat/feature'));
31
+ }
28
32
  ---
29
33
 
30
34
  <VerticalSideBarLayout title="AI Chat">
@@ -3,13 +3,7 @@ import CustomDocumentationPage from '@enterprise/custom-documentation/pages/docs
3
3
  import { getCollection } from 'astro:content';
4
4
  import { buildUrl } from '@utils/url-builder';
5
5
  import type { GetStaticPaths } from 'astro';
6
- import { isEventCatalogProEnabled } from '@utils/feature';
7
- import path from 'node:path';
8
- import fs from 'node:fs';
9
-
10
- const PROJECT_DIR = path.resolve(process.env.PROJECT_DIR || process.cwd());
11
- const CUSTOM_DOCS_DIR = path.resolve(PROJECT_DIR, 'docs/');
12
- const directoryExists = fs.existsSync(CUSTOM_DOCS_DIR);
6
+ import { isCustomDocsEnabled } from '@utils/feature';
13
7
 
14
8
  export const getStaticPaths = (async () => {
15
9
  const docs = await getCollection('customPages');
@@ -22,8 +16,8 @@ export const getStaticPaths = (async () => {
22
16
 
23
17
  const props = Astro.props;
24
18
 
25
- if (!isEventCatalogProEnabled()) {
26
- return Astro.redirect('/docs/custom');
19
+ if (!isCustomDocsEnabled()) {
20
+ return Astro.redirect(buildUrl('/docs/custom/feature'));
27
21
  }
28
22
  ---
29
23
 
@@ -0,0 +1,32 @@
1
+ // This file exposes the markdown for EventCatalog in the Url
2
+ // For example http://localhost:3000/docs/events/OrderAmended/0.0.1 loads the Page and http://localhost:3000/docs/events/OrderAmended/0.0.1.md loads the markdown
3
+ // This is used for the LLMs to load the markdown for the given item (llms.txt);
4
+
5
+ import type { APIRoute, GetStaticPaths } from 'astro';
6
+ import { getCollection } from 'astro:content';
7
+ import config from '@config';
8
+ import fs from 'fs';
9
+
10
+ export const getStaticPaths = (async () => {
11
+ const docs = await getCollection('customPages');
12
+ const paths = docs.map((doc) => ({
13
+ params: { path: doc.id.replace('docs/', '') },
14
+ props: doc,
15
+ type: 'custom',
16
+ }));
17
+ return paths;
18
+ }) satisfies GetStaticPaths;
19
+
20
+ export const GET: APIRoute = async ({ params, props }) => {
21
+ // Just return empty array if LLMs are not enabled
22
+ if (!config.llmsTxt?.enabled) {
23
+ return new Response('llms.txt is not enabled for this Catalog.', { status: 404 });
24
+ }
25
+
26
+ if (props.filePath) {
27
+ const file = fs.readFileSync(props.filePath, 'utf8');
28
+ return new Response(file, { status: 200 });
29
+ }
30
+
31
+ return new Response('Not found', { status: 404 });
32
+ };
@@ -0,0 +1,165 @@
1
+ ---
2
+ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
+ import { BookOpenIcon, FileText } from 'lucide-react';
4
+ ---
5
+
6
+ <VerticalSideBarLayout title="Custom Documentation">
7
+ <div class="min-h-[calc(100vh-60px)] bg-white">
8
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
9
+ {/* Hero Section */}
10
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center mb-16">
11
+ <div>
12
+ <div class="inline-flex items-center px-4 py-2 rounded-full bg-blue-100 text-blue-700 font-medium text-sm mb-6">
13
+ <FileText className="w-4 h-4 mr-2" />
14
+ New: Bring your documentation into EventCatalog
15
+ </div>
16
+ <h1 class="text-4xl font-bold text-gray-900 tracking-tight mb-4">
17
+ Document Everything. Share Knowledge. Build Better.
18
+ </h1>
19
+ <p class="text-xl text-gray-600 mb-8">
20
+ Add your own documentation to EventCatalog — from ADRs and system guides to runbooks and onboarding material. Connect
21
+ your knowledge to your architecture.
22
+ </p>
23
+ <div class="flex flex-col sm:flex-row gap-4 mb-8">
24
+ <a
25
+ href="https://demo.eventcatalog.dev/docs/custom/guides/creating-new-microservices/01-index"
26
+ target="_blank"
27
+ class="inline-flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors duration-150"
28
+ >
29
+ View the demo
30
+ <svg class="ml-2 w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
31
+ <path
32
+ fill-rule="evenodd"
33
+ d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z"
34
+ clip-rule="evenodd"></path>
35
+ </svg>
36
+ </a>
37
+ <a
38
+ href="https://www.eventcatalog.cloud"
39
+ target="_blank"
40
+ class="inline-flex items-center justify-center px-6 py-3 border border-gray-300 text-base font-medium rounded-lg text-gray-700 bg-white hover:bg-gray-50 transition-colors duration-150"
41
+ >
42
+ Try for free
43
+ </a>
44
+ </div>
45
+ <p class="text-sm text-gray-500">
46
+ Available with EventCatalog Starter or Scale plans
47
+ <a href="https://www.eventcatalog.dev/pricing" class="text-blue-600 font-medium block"
48
+ >Try free for 14 days, no credit card required</a
49
+ >
50
+ </p>
51
+ </div>
52
+
53
+ <div class="relative">
54
+ <div class="absolute -inset-4">
55
+ <div
56
+ class="w-full h-full max-w-full mx-auto opacity-30 blur-lg filter"
57
+ style="background: linear-gradient(90deg, #60A5FA 0%, #3B82F6 100%);"
58
+ >
59
+ </div>
60
+ </div>
61
+ <div class="relative">
62
+ <img
63
+ src="/images/custom-docs-placeholder.png"
64
+ alt="Custom Documentation Preview"
65
+ class="rounded-xl shadow-xl border border-gray-200"
66
+ />
67
+ </div>
68
+ </div>
69
+ </div>
70
+
71
+ {/* Features Section */}
72
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
73
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
74
+ <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
75
+ <svg class="w-6 h-6 text-blue-600" viewBox="0 0 24 24" fill="currentColor">
76
+ <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"></path>
77
+ </svg>
78
+ </div>
79
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">Centralized Knowledge</h3>
80
+ <p class="text-gray-600">
81
+ Keep architecture decisions, system guides, and runbooks in one place — easy to access, easy to trust.
82
+ </p>
83
+ </div>
84
+
85
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
86
+ <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
87
+ <svg class="w-6 h-6 text-blue-600" viewBox="0 0 24 24" fill="currentColor">
88
+ <path
89
+ d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"
90
+ ></path>
91
+ </svg>
92
+ </div>
93
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">Rich Formatting</h3>
94
+ <p class="text-gray-600">
95
+ Use Markdown, diagrams, code blocks, and EventCatalog components to create structured, useful documentation.
96
+ </p>
97
+ </div>
98
+
99
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
100
+ <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
101
+ <svg class="w-6 h-6 text-blue-600" viewBox="0 0 24 24" fill="currentColor">
102
+ <path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"
103
+ ></path>
104
+ </svg>
105
+ </div>
106
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">Version Control</h3>
107
+ <p class="text-gray-600">Track changes and ensure your documentation grows alongside your system.</p>
108
+ </div>
109
+
110
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
111
+ <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
112
+ <svg class="w-6 h-6 text-blue-600" viewBox="0 0 24 24" fill="currentColor">
113
+ <path
114
+ d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
115
+ ></path>
116
+ </svg>
117
+ </div>
118
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">Documentation Ownership</h3>
119
+ <p class="text-gray-600">Assign and track document owners, making it easy to find the right person in seconds.</p>
120
+ </div>
121
+
122
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
123
+ <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
124
+ <svg class="w-6 h-6 text-blue-600" viewBox="0 0 24 24" fill="currentColor">
125
+ <path d="M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"></path>
126
+ </svg>
127
+ </div>
128
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">Customizable Sidebars</h3>
129
+ <p class="text-gray-600">
130
+ Auto-generated and fully customizable navigation sidebars to organize your documentation perfectly.
131
+ </p>
132
+ </div>
133
+
134
+ <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
135
+ <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
136
+ <svg class="w-6 h-6 text-blue-600" viewBox="0 0 24 24" fill="currentColor">
137
+ <path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"></path>
138
+ </svg>
139
+ </div>
140
+ <h3 class="text-lg font-semibold text-gray-900 mb-2">EventCatalog Chat</h3>
141
+ <p class="text-gray-600">
142
+ Interact with your documentation using AI-powered chat to find answers quickly and efficiently.
143
+ </p>
144
+ </div>
145
+ </div>
146
+
147
+ {/* Bottom Link */}
148
+ <div class="mt-16 text-center">
149
+ <a
150
+ href="https://www.eventcatalog.dev/docs/development/guides/customize-sidebars/application-sidebar"
151
+ target="_blank"
152
+ class="text-sm text-gray-400 hover:text-gray-500 transition-colors duration-150"
153
+ >
154
+ Not ready for custom documentation? You can hide this feature in settings
155
+ </a>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </VerticalSideBarLayout>
160
+
161
+ <style>
162
+ .scroll-smooth {
163
+ scroll-behavior: smooth;
164
+ }
165
+ </style>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
3
  import { Code } from 'astro-expressive-code/components';
4
- import { isEventCatalogProEnabled } from '@utils/feature';
4
+ import { isCustomDocsEnabled } from '@utils/feature';
5
5
 
6
6
  // Example for folder structure
7
7
  const folderStructureExample = `my-catalog/
@@ -92,6 +92,10 @@ module.exports = {
92
92
  ]
93
93
  }
94
94
  }`;
95
+
96
+ if (!isCustomDocsEnabled()) {
97
+ return Astro.redirect('/docs/custom/feature');
98
+ }
95
99
  ---
96
100
 
97
101
  <VerticalSideBarLayout title="Custom Documentation">
@@ -121,7 +125,7 @@ module.exports = {
121
125
  Read documentation &rarr;
122
126
  </a>
123
127
  {
124
- !isEventCatalogProEnabled() && (
128
+ !isCustomDocsEnabled() && (
125
129
  <a
126
130
  href="https://www.eventcatalog.dev/pro/trial"
127
131
  class="inline-flex items-center justify-center px-5 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-gradient-to-r from-purple-500 to-purple-700 hover:from-purple-600 hover:to-purple-800 shadow-sm"
@@ -1,7 +1,10 @@
1
- import { getCollection } from 'astro:content';
1
+ import { getCollection, type CollectionEntry } from 'astro:content';
2
2
  import config from '@config';
3
3
  import type { APIRoute } from 'astro';
4
4
  import fs from 'fs';
5
+ import { isCustomDocsEnabled } from '@utils/feature';
6
+
7
+ type AllowedCollections = 'events' | 'commands' | 'queries' | 'services' | 'domains' | 'teams' | 'users' | 'customPages';
5
8
 
6
9
  const events = await getCollection('events');
7
10
  const commands = await getCollection('commands');
@@ -11,12 +14,26 @@ const domains = await getCollection('domains');
11
14
  const teams = await getCollection('teams');
12
15
  const users = await getCollection('users');
13
16
 
17
+ const customDocs = await getCollection('customPages');
18
+
14
19
  export const GET: APIRoute = async ({ params, request }) => {
15
20
  if (!config.llmsTxt?.enabled) {
16
21
  return new Response('llms.txt is not enabled for this Catalog.', { status: 404 });
17
22
  }
18
23
 
19
- const resources = [...events, ...commands, ...queries, ...services, ...domains, ...teams, ...users];
24
+ const resources: CollectionEntry<AllowedCollections>[] = [
25
+ ...events,
26
+ ...commands,
27
+ ...queries,
28
+ ...services,
29
+ ...domains,
30
+ ...teams,
31
+ ...users,
32
+ ];
33
+
34
+ if (isCustomDocsEnabled()) {
35
+ resources.push(...(customDocs as CollectionEntry<AllowedCollections>[]));
36
+ }
20
37
 
21
38
  const content = resources
22
39
  .map((item) => {
@@ -2,6 +2,8 @@ import { getCollection } from 'astro:content';
2
2
  import config from '@config';
3
3
  import type { APIRoute } from 'astro';
4
4
 
5
+ import { isCustomDocsEnabled } from '@utils/feature';
6
+
5
7
  const events = await getCollection('events');
6
8
  const commands = await getCollection('commands');
7
9
  const queries = await getCollection('queries');
@@ -12,6 +14,8 @@ const domains = await getCollection('domains');
12
14
  const teams = await getCollection('teams');
13
15
  const users = await getCollection('users');
14
16
 
17
+ const customDocs = await getCollection('customPages');
18
+
15
19
  export const GET: APIRoute = async ({ params, request }) => {
16
20
  const url = new URL(request.url);
17
21
  const baseUrl = `${url.protocol}//${url.host}`;
@@ -22,6 +26,9 @@ export const GET: APIRoute = async ({ params, request }) => {
22
26
  const formatSimpleItem = (item: any, type: string) =>
23
27
  `- [${item.id.replace('.mdx', '')}](${baseUrl}/docs/${type}/${item.data.id}.mdx) - ${item.data.name}`;
24
28
 
29
+ const formatCustomDoc = (item: any, route: string) =>
30
+ `- [${item.data.title}](${baseUrl}/${route}/${item.id.replace('docs\/', '')}.mdx) - ${item.data.summary || ''}`;
31
+
25
32
  const content = [
26
33
  `# ${config.organizationName} EventCatalog Documentation\n`,
27
34
  `> ${config.tagline}`,
@@ -39,6 +46,9 @@ export const GET: APIRoute = async ({ params, request }) => {
39
46
  teams.map((item) => formatSimpleItem(item, 'teams')).join('\n'),
40
47
  '\n## Users',
41
48
  users.map((item) => formatSimpleItem(item, 'users')).join('\n'),
49
+ ...(isCustomDocsEnabled()
50
+ ? ['\n## Custom Docs', customDocs.map((item) => formatCustomDoc(item, 'docs/custom')).join('\n')]
51
+ : []),
42
52
  ].join('\n');
43
53
 
44
54
  return new Response(content, {