@eventcatalog/core 2.36.1 → 2.37.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.
package/README.md CHANGED
@@ -278,4 +278,4 @@ This project follows the [all-contributors](https://github.com/all-contributors/
278
278
 
279
279
  # License
280
280
 
281
- MIT
281
+ MIT.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.36.1";
40
+ var version = "2.37.1";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-TBBPXKB3.js";
4
- import "../chunk-MLYXGJNO.js";
3
+ } from "../chunk-2TAZVC65.js";
4
+ import "../chunk-V5DKJ3VX.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.36.1";
109
+ var version = "2.37.1";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-WT5JS7WG.js";
4
- import "../chunk-TBBPXKB3.js";
5
- import "../chunk-MLYXGJNO.js";
3
+ } from "../chunk-ENZA5AV5.js";
4
+ import "../chunk-2TAZVC65.js";
5
+ import "../chunk-V5DKJ3VX.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-MLYXGJNO.js";
3
+ } from "./chunk-V5DKJ3VX.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-TBBPXKB3.js";
3
+ } from "./chunk-2TAZVC65.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.36.1";
2
+ var version = "2.37.1";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.36.1";
28
+ var version = "2.37.1";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-MLYXGJNO.js";
3
+ } from "./chunk-V5DKJ3VX.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -157,7 +157,7 @@ var import_axios = __toESM(require("axios"), 1);
157
157
  var import_os = __toESM(require("os"), 1);
158
158
 
159
159
  // package.json
160
- var version = "2.36.1";
160
+ var version = "2.37.1";
161
161
 
162
162
  // src/constants.ts
163
163
  var VERSION = version;
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-DCLTVJDP.js";
7
7
  import {
8
8
  log_build_default
9
- } from "./chunk-WT5JS7WG.js";
10
- import "./chunk-TBBPXKB3.js";
9
+ } from "./chunk-ENZA5AV5.js";
10
+ import "./chunk-2TAZVC65.js";
11
11
  import {
12
12
  catalogToAstro,
13
13
  checkAndConvertMdToMdx
14
14
  } from "./chunk-SLEMYHTU.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-MLYXGJNO.js";
17
+ } from "./chunk-V5DKJ3VX.js";
18
18
  import {
19
19
  isBackstagePluginEnabled,
20
20
  isEventCatalogScaleEnabled,
@@ -35,7 +35,9 @@ const params = {
35
35
  moveToWidget: moveToWidget || undefined,
36
36
  };
37
37
 
38
- const backUrl = buildUrl(`/docs/${resource.collection}/${resource.data.id}/${resource.data.version}#${title}-miro-title`);
38
+ const backUrl = resource.collection
39
+ ? buildUrl(`/docs/${resource.collection}/${resource.data.id}/${resource.data.version}#${title}-miro-title`)
40
+ : undefined;
39
41
 
40
42
  const fullScreenParams = {
41
43
  ...params,
@@ -0,0 +1,278 @@
1
+ ---
2
+ import { buildUrl } from '@utils/url-builder';
3
+ import { ChatBubbleLeftIcon, RectangleGroupIcon, ServerIcon } from '@heroicons/react/24/outline';
4
+ import config from '@config';
5
+
6
+ import { getMessages } from '@utils/messages';
7
+ import { getDomains } from '@utils/collections/domains';
8
+ import { getServices } from '@utils/collections/services';
9
+ import { getFlows } from '@utils/collections/flows';
10
+ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
11
+ import { BookOpenText, Workflow, TableProperties, House, BookUser, MessageSquare, BotMessageSquare, Users } from 'lucide-react';
12
+
13
+ const { commands = [], events = [], queries = [] } = await getMessages({ getAllVersions: false });
14
+ const messages = [...events, ...queries, ...commands];
15
+ const domains = await getDomains({ getAllVersions: false });
16
+ const services = await getServices({ getAllVersions: false });
17
+ const flows = await getFlows({ getAllVersions: false });
18
+
19
+ const gettingStartedItems = [
20
+ {
21
+ title: 'Add a New Message',
22
+ icon: ChatBubbleLeftIcon,
23
+ iconBg: 'blue',
24
+ description: 'Document a new message in your system with schemas, examples, and relationships.',
25
+ links: [
26
+ {
27
+ text: 'How to add a message',
28
+ href: 'https://www.eventcatalog.dev/docs/messages',
29
+ },
30
+ {
31
+ text: 'Versioning guide',
32
+ href: 'https://www.eventcatalog.dev/docs/development/guides/messages/events/versioning',
33
+ },
34
+ {
35
+ text: 'Adding schemas',
36
+ href: 'https://www.eventcatalog.dev/docs/development/guides/messages/events/adding-schemas',
37
+ },
38
+ ],
39
+ },
40
+ {
41
+ title: 'Document a Service',
42
+ icon: ServerIcon,
43
+ iconBg: 'green',
44
+ description: 'Add details about a service, including its events, APIs, and dependencies.',
45
+ links: [
46
+ {
47
+ text: 'How to add a service',
48
+ href: 'https://www.eventcatalog.dev/docs/services',
49
+ },
50
+ {
51
+ text: 'Service ownership',
52
+ href: 'https://www.eventcatalog.dev/docs/development/guides/services/owners',
53
+ },
54
+ {
55
+ text: 'Assign specifications to services',
56
+ href: 'https://www.eventcatalog.dev/docs/development/guides/services/adding-spec-files-to-services',
57
+ },
58
+ ],
59
+ },
60
+ {
61
+ title: 'Create a Domain',
62
+ icon: RectangleGroupIcon,
63
+ iconBg: 'purple',
64
+ description: 'Organize your services and events into logical business domains.',
65
+ links: [
66
+ {
67
+ text: 'How to add a domain',
68
+ href: 'https://www.eventcatalog.dev/docs/domains',
69
+ },
70
+ {
71
+ text: 'Adding services to domains',
72
+ href: 'https://www.eventcatalog.dev/docs/development/guides/domains/adding-services-to-domains',
73
+ },
74
+ {
75
+ text: 'Creating a ubiquitous language',
76
+ href: 'https://www.eventcatalog.dev/docs/development/guides/domains/adding-ubiquitous-language',
77
+ },
78
+ ],
79
+ },
80
+ ];
81
+
82
+ const getDefaultUrl = (route: string, defaultValue: string) => {
83
+ if (domains.length > 0) return buildUrl(`/${route}/domains/${domains[0].data.id}/${domains[0].data.latestVersion}`);
84
+ if (services.length > 0) return buildUrl(`/${route}/services/${services[0].data.id}/${services[0].data.latestVersion}`);
85
+ if (flows.length > 0) return buildUrl(`/${route}/flows/${flows[0].data.id}/${flows[0].data.latestVersion}`);
86
+ return buildUrl(defaultValue);
87
+ };
88
+
89
+ const topTiles = [
90
+ {
91
+ title: 'Domains',
92
+ count: domains.length,
93
+ description: 'Business domains defined',
94
+ href: buildUrl('/architecture/domains'),
95
+ icon: RectangleGroupIcon,
96
+ bgColor: 'bg-yellow-100',
97
+ textColor: 'text-yellow-600',
98
+ arrowColor: 'text-yellow-600',
99
+ },
100
+ {
101
+ title: 'Services',
102
+ count: services.length,
103
+ description: 'Services documented in the catalog',
104
+ href: buildUrl('/architecture/services'),
105
+ icon: ServerIcon,
106
+ bgColor: 'bg-pink-100',
107
+ textColor: 'text-pink-600',
108
+ arrowColor: 'text-pink-600',
109
+ },
110
+ {
111
+ title: 'Messages',
112
+ count: messages.length,
113
+ description: 'Messages documented in the catalog',
114
+ href: buildUrl('/architecture/messages'),
115
+ icon: ChatBubbleLeftIcon,
116
+ bgColor: 'bg-blue-100',
117
+ textColor: 'text-blue-600',
118
+ arrowColor: 'text-blue-600',
119
+ },
120
+ ];
121
+ ---
122
+
123
+ <VerticalSideBarLayout title="EventCatalog">
124
+ <body class="min-h-screen bg-gray-50 font-inter">
125
+ <main class="container px-8 lg:px-8 mx-auto py-8 max-w-[80em]">
126
+ <div class="mb-12">
127
+ <h1 class="text-4xl font-semibold mb-4 text-gray-900 font-inter">
128
+ {config?.organizationName || 'EventCatalog'}
129
+ </h1>
130
+ <p class="text-base mb-0 text-gray-600 max-w-3xl">
131
+ {config.tagline || 'Comprehensive event-driven architecture documentation covering events, services, domains.'}
132
+ </p>
133
+ </div>
134
+
135
+ <h2 class="text-2xl font-semibold mb-8 text-gray-900">Architecture overview</h2>
136
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-12">
137
+ {
138
+ topTiles.map((tile) => (
139
+ <a
140
+ href={tile.href}
141
+ class="bg-white p-5 rounded-lg shadow-sm border border-gray-200 hover:shadow-md transition-all duration-200"
142
+ >
143
+ <div class="flex items-center justify-between mb-2">
144
+ <div class="flex items-center gap-3">
145
+ <div class={`p-1.5 ${tile.bgColor} rounded-lg`}>
146
+ <tile.icon className={`w-4 h-4 ${tile.textColor}`} />
147
+ </div>
148
+ <h3 class="text-lg font-semibold text-gray-900">
149
+ {tile.count} {tile.title}
150
+ </h3>
151
+ </div>
152
+ <span class={`text-sm font-medium ${tile.arrowColor}`}>View all →</span>
153
+ </div>
154
+ <p class="text-sm text-gray-600">{tile.description}</p>
155
+ </a>
156
+ ))
157
+ }
158
+ </div>
159
+
160
+ <div class="mb-12">
161
+ <h2 class="text-2xl font-semibold mb-8 text-gray-900">Explore EventCatalog</h2>
162
+ <div class="grid grid-cols-12 gap-4">
163
+ <a
164
+ href={getDefaultUrl('docs', 'domains')}
165
+ class="col-span-6 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
166
+ >
167
+ <div class="h-24 bg-gradient-to-br from-blue-50 to-blue-100 border-b border-gray-200"></div>
168
+ <div class="p-4">
169
+ <div class="flex items-center gap-3 mb-3">
170
+ <div class="p-2 bg-blue-100 rounded-lg group-hover:scale-105 transition-transform">
171
+ <BookOpenText className="w-5 h-5 text-blue-600" />
172
+ </div>
173
+ <h3 class="text-lg font-semibold text-gray-900 group-hover:text-blue-600">Documentation</h3>
174
+ </div>
175
+ <p class="text-sm text-gray-600">
176
+ Read documentation for {config.organizationName || 'EventCatalog'} messages, services and domains.
177
+ </p>
178
+ </div>
179
+ </a>
180
+
181
+ <a
182
+ href={getDefaultUrl('visualiser', 'domains')}
183
+ class="col-span-6 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
184
+ >
185
+ <div class="h-24 bg-gradient-to-br from-purple-50 to-purple-100 border-b border-gray-200"></div>
186
+ <div class="p-4">
187
+ <div class="flex items-center gap-3 mb-3">
188
+ <div class="p-2 bg-purple-100 rounded-lg group-hover:scale-105 transition-transform">
189
+ <Workflow className="w-5 h-5 text-purple-600" />
190
+ </div>
191
+ <h3 class="text-base font-semibold text-gray-900 group-hover:text-purple-600">Visualizer</h3>
192
+ </div>
193
+ <p class="text-sm text-gray-600">Explore interactive visualizations of your architecture.</p>
194
+ </div>
195
+ </a>
196
+
197
+ <a
198
+ href={buildUrl('/discover/events')}
199
+ class="col-span-4 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
200
+ >
201
+ <div class="h-24 bg-gradient-to-br from-teal-50 to-teal-100 border-b border-gray-200"></div>
202
+ <div class="p-4">
203
+ <div class="flex items-center gap-3 mb-3">
204
+ <div class="p-2 bg-teal-100 rounded-lg group-hover:scale-105 transition-transform">
205
+ <TableProperties className="w-5 h-5 text-teal-600" />
206
+ </div>
207
+ <h3 class="text-base font-semibold text-gray-900 group-hover:text-teal-600">Explore</h3>
208
+ </div>
209
+ <p class="text-sm text-gray-600">Navigate through your events and services</p>
210
+ </div>
211
+ </a>
212
+
213
+ <a
214
+ href={buildUrl('/chat')}
215
+ class="col-span-4 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
216
+ >
217
+ <div class="h-24 bg-gradient-to-br from-green-50 to-green-100 border-b border-gray-200"></div>
218
+ <div class="p-4">
219
+ <div class="flex items-center gap-3 mb-3">
220
+ <div class="p-2 bg-green-100 rounded-lg group-hover:scale-105 transition-transform">
221
+ <BotMessageSquare className="w-5 h-5 text-green-600" />
222
+ </div>
223
+ <h3 class="text-base font-semibold text-gray-900 group-hover:text-green-600">Chat</h3>
224
+ </div>
225
+ <p class="text-sm text-gray-600">Ask questions about your architecture</p>
226
+ </div>
227
+ </a>
228
+
229
+ <a
230
+ href={buildUrl('/directory/users')}
231
+ class="col-span-4 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
232
+ >
233
+ <div class="h-24 bg-gradient-to-br from-orange-50 to-orange-100 border-b border-gray-200"></div>
234
+ <div class="p-4">
235
+ <div class="flex items-center gap-3 mb-3">
236
+ <div class="p-2 bg-orange-100 rounded-lg group-hover:scale-105 transition-transform">
237
+ <BookUser className="w-5 h-5 text-orange-600" />
238
+ </div>
239
+ <h3 class="text-base font-semibold text-gray-900 group-hover:text-orange-600">Users & Teams</h3>
240
+ </div>
241
+ <p class="text-sm text-gray-600">Discover service and message ownership</p>
242
+ </div>
243
+ </a>
244
+ </div>
245
+ </div>
246
+
247
+ <section class="mb-12">
248
+ <h2 class="text-2xl font-semibold mb-8 text-gray-900">Getting Started</h2>
249
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
250
+ {
251
+ gettingStartedItems.map((item) => (
252
+ <div class="bg-white rounded-xl shadow-sm border border-gray-200 p-6">
253
+ <div class="flex items-center gap-3 mb-4">
254
+ <div class={`p-2 bg-${item.iconBg}-100 rounded-lg`}>
255
+ <item.icon className={`w-6 h-6 text-${item.iconBg}-600`} />
256
+ </div>
257
+ <h3 class="text-lg font-semibold text-gray-900">{item.title}</h3>
258
+ </div>
259
+ <p class="text-gray-600 text-sm mb-4">{item.description}</p>
260
+ <div class="space-y-2">
261
+ {item.links.map((link) => (
262
+ <a
263
+ href={link.href}
264
+ target="_blank"
265
+ class={`block text-sm text-${item.iconBg}-600 hover:text-${item.iconBg}-700`}
266
+ >
267
+ → {link.text}
268
+ </a>
269
+ ))}
270
+ </div>
271
+ </div>
272
+ ))
273
+ }
274
+ </div>
275
+ </section>
276
+ </main>
277
+ </body>
278
+ </VerticalSideBarLayout>
@@ -1,286 +1,68 @@
1
1
  ---
2
- import { buildUrl } from '@utils/url-builder';
3
- import {
4
- BoltIcon,
5
- ChatBubbleLeftIcon,
6
- QueueListIcon,
7
- RectangleGroupIcon,
8
- ServerIcon,
9
- MagnifyingGlassIcon,
10
- } from '@heroicons/react/24/outline';
11
- import config from '@config';
12
-
13
- import { getMessages } from '@utils/messages';
14
- import { getDomains } from '@utils/collections/domains';
15
- import { getServices } from '@utils/collections/services';
16
- import { getFlows } from '@utils/collections/flows';
17
- import DiscoverInsight from '@components/DiscoverInsight.astro';
2
+ import Footer from '@layouts/Footer.astro';
18
3
  import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
19
- import { BookOpenText, Workflow, TableProperties, House, BookUser, MessageSquare, BotMessageSquare, Users } from 'lucide-react';
20
-
21
- const { commands = [], events = [], queries = [] } = await getMessages({ getAllVersions: false });
22
- const messages = [...events, ...queries, ...commands];
23
- const domains = await getDomains({ getAllVersions: false });
24
- const services = await getServices({ getAllVersions: false });
25
- const flows = await getFlows({ getAllVersions: false });
26
-
27
- const gettingStartedItems = [
28
- {
29
- title: 'Add a New Message',
30
- icon: ChatBubbleLeftIcon,
31
- iconBg: 'blue',
32
- description: 'Document a new message in your system with schemas, examples, and relationships.',
33
- links: [
34
- {
35
- text: 'How to add a message',
36
- href: 'https://www.eventcatalog.dev/docs/messages',
37
- },
38
- {
39
- text: 'Versioning guide',
40
- href: 'https://www.eventcatalog.dev/docs/development/guides/messages/events/versioning',
41
- },
42
- {
43
- text: 'Adding schemas',
44
- href: 'https://www.eventcatalog.dev/docs/development/guides/messages/events/adding-schemas',
45
- },
46
- ],
47
- },
48
- {
49
- title: 'Document a Service',
50
- icon: ServerIcon,
51
- iconBg: 'green',
52
- description: 'Add details about a service, including its events, APIs, and dependencies.',
53
- links: [
54
- {
55
- text: 'How to add a service',
56
- href: 'https://www.eventcatalog.dev/docs/services',
57
- },
58
- {
59
- text: 'Service ownership',
60
- href: 'https://www.eventcatalog.dev/docs/development/guides/services/owners',
61
- },
62
- {
63
- text: 'Assign specifications to services',
64
- href: 'https://www.eventcatalog.dev/docs/development/guides/services/adding-spec-files-to-services',
65
- },
66
- ],
67
- },
68
- {
69
- title: 'Create a Domain',
70
- icon: RectangleGroupIcon,
71
- iconBg: 'purple',
72
- description: 'Organize your services and events into logical business domains.',
73
- links: [
74
- {
75
- text: 'How to add a domain',
76
- href: 'https://www.eventcatalog.dev/docs/domains',
77
- },
78
- {
79
- text: 'Adding services to domains',
80
- href: 'https://www.eventcatalog.dev/docs/development/guides/domains/adding-services-to-domains',
81
- },
82
- {
83
- text: 'Creating a ubiquitous language',
84
- href: 'https://www.eventcatalog.dev/docs/development/guides/domains/adding-ubiquitous-language',
85
- },
86
- ],
87
- },
88
- ];
4
+ import components from '@components/MDX/page-components';
5
+ import mdxComponents from '@components/MDX/components';
6
+ import NodeGraph from '@components/MDX/NodeGraph/NodeGraph.astro';
7
+ import { getMDXComponentsByName } from '@utils/markdown';
8
+ import { resourceToCollectionMap } from '@utils/collections/util';
9
+ import { buildUrl } from '@utils/url-builder';
10
+ import { isCustomLandingPageEnabled } from '@utils/feature';
11
+ import DefaultAstroLandingPage from './_index.astro';
89
12
 
90
- const getDefaultUrl = (route: string, defaultValue: string) => {
91
- if (domains.length > 0) return buildUrl(`/${route}/domains/${domains[0].data.id}/${domains[0].data.latestVersion}`);
92
- if (services.length > 0) return buildUrl(`/${route}/services/${services[0].data.id}/${services[0].data.latestVersion}`);
93
- if (flows.length > 0) return buildUrl(`/${route}/flows/${flows[0].data.id}/${flows[0].data.latestVersion}`);
94
- return buildUrl(defaultValue);
95
- };
13
+ let nodeGraphs: any[] = [];
14
+ let CustomContent = null;
96
15
 
97
- const topTiles = [
98
- {
99
- title: 'Domains',
100
- count: domains.length,
101
- description: 'Business domains defined',
102
- href: buildUrl('/architecture/domains'),
103
- icon: RectangleGroupIcon,
104
- bgColor: 'bg-yellow-100',
105
- textColor: 'text-yellow-600',
106
- arrowColor: 'text-yellow-600',
107
- },
108
- {
109
- title: 'Services',
110
- count: services.length,
111
- description: 'Services documented in the catalog',
112
- href: buildUrl('/architecture/services'),
113
- icon: ServerIcon,
114
- bgColor: 'bg-pink-100',
115
- textColor: 'text-pink-600',
116
- arrowColor: 'text-pink-600',
117
- },
118
- {
119
- title: 'Messages',
120
- count: messages.length,
121
- description: 'Messages documented in the catalog',
122
- href: buildUrl('/architecture/messages'),
123
- icon: ChatBubbleLeftIcon,
124
- bgColor: 'bg-blue-100',
125
- textColor: 'text-blue-600',
126
- arrowColor: 'text-blue-600',
127
- },
128
- ];
129
- ---
16
+ import path from 'path';
17
+ import { existsSync, readFileSync } from 'fs';
130
18
 
131
- <VerticalSideBarLayout title="EventCatalog">
132
- <body class="min-h-screen bg-gray-50 font-inter">
133
- <main class="container px-8 lg:px-8 mx-auto py-8 max-w-[80em]">
134
- <div class="mb-12">
135
- <h1 class="text-4xl font-semibold mb-4 text-gray-900 font-inter">
136
- {config?.organizationName || 'EventCatalog'}
137
- </h1>
138
- <p class="text-base mb-0 text-gray-600 max-w-3xl">
139
- {config.tagline || 'Comprehensive event-driven architecture documentation covering events, services, domains.'}
140
- </p>
141
- </div>
19
+ const props = Astro.props;
142
20
 
143
- <h2 class="text-2xl font-semibold mb-8 text-gray-900">Architecture overview</h2>
144
- <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-12">
145
- {
146
- topTiles.map((tile) => (
147
- <a
148
- href={tile.href}
149
- class="bg-white p-5 rounded-lg shadow-sm border border-gray-200 hover:shadow-md transition-all duration-200"
150
- >
151
- <div class="flex items-center justify-between mb-2">
152
- <div class="flex items-center gap-3">
153
- <div class={`p-1.5 ${tile.bgColor} rounded-lg`}>
154
- <tile.icon className={`w-4 h-4 ${tile.textColor}`} />
155
- </div>
156
- <h3 class="text-lg font-semibold text-gray-900">
157
- {tile.count} {tile.title}
158
- </h3>
159
- </div>
160
- <span class={`text-sm font-medium ${tile.arrowColor}`}>View all →</span>
161
- </div>
162
- <p class="text-sm text-gray-600">{tile.description}</p>
163
- </a>
164
- ))
165
- }
166
- </div>
21
+ const pathToUserDefinedLandingPage = path.join(process.env.PROJECT_DIR || '', 'pages/homepage.astro');
167
22
 
168
- <div class="mb-12">
169
- <h2 class="text-2xl font-semibold mb-8 text-gray-900">Explore EventCatalog</h2>
170
- <div class="grid grid-cols-12 gap-4">
171
- <a
172
- href={getDefaultUrl('docs', 'domains')}
173
- class="col-span-6 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
174
- >
175
- <div class="h-24 bg-gradient-to-br from-blue-50 to-blue-100 border-b border-gray-200"></div>
176
- <div class="p-4">
177
- <div class="flex items-center gap-3 mb-3">
178
- <div class="p-2 bg-blue-100 rounded-lg group-hover:scale-105 transition-transform">
179
- <BookOpenText className="w-5 h-5 text-blue-600" />
180
- </div>
181
- <h3 class="text-lg font-semibold text-gray-900 group-hover:text-blue-600">Documentation</h3>
182
- </div>
183
- <p class="text-sm text-gray-600">
184
- Read documentation for {config.organizationName || 'EventCatalog'} messages, services and domains.
185
- </p>
186
- </div>
187
- </a>
23
+ if (existsSync(pathToUserDefinedLandingPage) && isCustomLandingPageEnabled()) {
24
+ const customPages = import.meta.glob('/**/homepage.astro', { eager: true });
25
+ // @ts-ignore
26
+ CustomContent = Object.values(customPages)[0]?.default || null;
188
27
 
189
- <a
190
- href={getDefaultUrl('visualiser', 'domains')}
191
- class="col-span-6 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
192
- >
193
- <div class="h-24 bg-gradient-to-br from-purple-50 to-purple-100 border-b border-gray-200"></div>
194
- <div class="p-4">
195
- <div class="flex items-center gap-3 mb-3">
196
- <div class="p-2 bg-purple-100 rounded-lg group-hover:scale-105 transition-transform">
197
- <Workflow className="w-5 h-5 text-purple-600" />
198
- </div>
199
- <h3 class="text-base font-semibold text-gray-900 group-hover:text-purple-600">Visualizer</h3>
200
- </div>
201
- <p class="text-sm text-gray-600">Explore interactive visualizations of your architecture.</p>
202
- </div>
203
- </a>
204
-
205
- <a
206
- href={buildUrl('/discover/events')}
207
- class="col-span-4 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
208
- >
209
- <div class="h-24 bg-gradient-to-br from-teal-50 to-teal-100 border-b border-gray-200"></div>
210
- <div class="p-4">
211
- <div class="flex items-center gap-3 mb-3">
212
- <div class="p-2 bg-teal-100 rounded-lg group-hover:scale-105 transition-transform">
213
- <TableProperties className="w-5 h-5 text-teal-600" />
214
- </div>
215
- <h3 class="text-base font-semibold text-gray-900 group-hover:text-teal-600">Explore</h3>
216
- </div>
217
- <p class="text-sm text-gray-600">Navigate through your events and services</p>
218
- </div>
219
- </a>
220
-
221
- <a
222
- href={buildUrl('/chat')}
223
- class="col-span-4 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
224
- >
225
- <div class="h-24 bg-gradient-to-br from-green-50 to-green-100 border-b border-gray-200"></div>
226
- <div class="p-4">
227
- <div class="flex items-center gap-3 mb-3">
228
- <div class="p-2 bg-green-100 rounded-lg group-hover:scale-105 transition-transform">
229
- <BotMessageSquare className="w-5 h-5 text-green-600" />
230
- </div>
231
- <h3 class="text-base font-semibold text-gray-900 group-hover:text-green-600">Chat</h3>
232
- </div>
233
- <p class="text-sm text-gray-600">Ask questions about your architecture</p>
234
- </div>
235
- </a>
28
+ const rawContent = readFileSync(pathToUserDefinedLandingPage, 'utf-8');
29
+ nodeGraphs = getMDXComponentsByName(rawContent, 'NodeGraph') || [];
30
+ }
31
+ ---
236
32
 
237
- <a
238
- href={buildUrl('/directory/users')}
239
- class="col-span-4 row-span-2 group bg-white rounded-lg shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 overflow-hidden"
240
- >
241
- <div class="h-24 bg-gradient-to-br from-orange-50 to-orange-100 border-b border-gray-200"></div>
242
- <div class="p-4">
243
- <div class="flex items-center gap-3 mb-3">
244
- <div class="p-2 bg-orange-100 rounded-lg group-hover:scale-105 transition-transform">
245
- <BookUser className="w-5 h-5 text-orange-600" />
246
- </div>
247
- <h3 class="text-base font-semibold text-gray-900 group-hover:text-orange-600">Users & Teams</h3>
248
- </div>
249
- <p class="text-sm text-gray-600">Discover service and message ownership</p>
33
+ {
34
+ CustomContent ? (
35
+ <VerticalSideBarLayout title="EventCatalog">
36
+ <main class="flex sm:px-8 docs-layout h-full">
37
+ <div class="flex docs-layout w-full">
38
+ <div class="w-full lg:mr-2 pr-8 overflow-y-auto py-8">
39
+ <div class="w-full !max-w-none">
40
+ <CustomContent components={{ ...components, ...mdxComponents(props) }} />
250
41
  </div>
251
- </a>
252
- </div>
253
- </div>
254
-
255
- <section class="mb-12">
256
- <h2 class="text-2xl font-semibold mb-8 text-gray-900">Getting Started</h2>
257
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
258
- {
259
- gettingStartedItems.map((item) => (
260
- <div class="bg-white rounded-xl shadow-sm border border-gray-200 p-6">
261
- <div class="flex items-center gap-3 mb-4">
262
- <div class={`p-2 bg-${item.iconBg}-100 rounded-lg`}>
263
- <item.icon className={`w-6 h-6 text-${item.iconBg}-600`} />
264
- </div>
265
- <h3 class="text-lg font-semibold text-gray-900">{item.title}</h3>
266
- </div>
267
- <p class="text-gray-600 text-sm mb-4">{item.description}</p>
268
- <div class="space-y-2">
269
- {item.links.map((link) => (
270
- <a
271
- href={link.href}
272
- target="_blank"
273
- class={`block text-sm text-${item.iconBg}-600 hover:text-${item.iconBg}-700`}
274
- >
275
- → {link.text}
276
- </a>
277
- ))}
278
- </div>
279
- </div>
280
- ))
281
- }
42
+ <Footer />
43
+ </div>
282
44
  </div>
283
- </section>
284
- </main>
285
- </body>
286
- </VerticalSideBarLayout>
45
+ {nodeGraphs.length > 0 &&
46
+ nodeGraphs.map((nodeGraph: any) => {
47
+ const collection = resourceToCollectionMap[nodeGraph.type as keyof typeof resourceToCollectionMap];
48
+ return (
49
+ <NodeGraph
50
+ id={nodeGraph.id}
51
+ version={nodeGraph.version}
52
+ collection={collection}
53
+ title={nodeGraph.title}
54
+ mode="simple"
55
+ linksToVisualiser={true}
56
+ href={{
57
+ label: 'Open in Visualiser',
58
+ url: buildUrl(`/visualiser/${collection}/${nodeGraph.id}/${nodeGraph.version}`),
59
+ }}
60
+ />
61
+ );
62
+ })}
63
+ </main>
64
+ </VerticalSideBarLayout>
65
+ ) : (
66
+ <DefaultAstroLandingPage />
67
+ )
68
+ }
@@ -19,3 +19,4 @@ export const isCustomDocsEnabled = () => isEventCatalogStarterEnabled() || isEve
19
19
  export const isEventCatalogChatEnabled = () => isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
20
20
 
21
21
  export const isEventCatalogUpgradeEnabled = () => !isEventCatalogStarterEnabled() && !isEventCatalogScaleEnabled();
22
+ export const isCustomLandingPageEnabled = () => isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.36.1",
9
+ "version": "2.37.1",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },