@eventcatalog/core 2.26.1 → 2.28.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 (37) 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 +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-TOTPAQ4C.js → chunk-KGWJTMWU.js} +1 -1
  6. package/dist/{chunk-M7ERKXSB.js → chunk-KYGD25IE.js} +1 -1
  7. package/dist/{chunk-JCGLXXSE.js → chunk-RCPEAVRY.js} +1 -1
  8. package/dist/constants.cjs +1 -1
  9. package/dist/constants.js +1 -1
  10. package/dist/eventcatalog.cjs +1 -1
  11. package/dist/eventcatalog.config.d.cts +1 -4
  12. package/dist/eventcatalog.config.d.ts +1 -4
  13. package/dist/eventcatalog.js +3 -3
  14. package/eventcatalog/astro.config.mjs +0 -3
  15. package/eventcatalog/public/logo.svg +14 -0
  16. package/eventcatalog/src/components/Grids/DomainGrid.tsx +233 -0
  17. package/eventcatalog/src/components/Grids/MessageGrid.tsx +457 -0
  18. package/eventcatalog/src/components/Grids/ServiceGrid.tsx +362 -0
  19. package/eventcatalog/src/components/Grids/components.tsx +170 -0
  20. package/eventcatalog/src/components/Grids/utils.tsx +38 -0
  21. package/eventcatalog/src/components/SideNav/ListViewSideBar/components/CollapsibleGroup.tsx +46 -0
  22. package/eventcatalog/src/components/SideNav/ListViewSideBar/components/MessageList.tsx +31 -0
  23. package/eventcatalog/src/components/SideNav/ListViewSideBar/index.tsx +390 -0
  24. package/eventcatalog/src/components/SideNav/ListViewSideBar/types.ts +48 -0
  25. package/eventcatalog/src/components/SideNav/ListViewSideBar/utils.ts +103 -0
  26. package/eventcatalog/src/components/SideNav/SideNav.astro +8 -7
  27. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +34 -22
  28. package/eventcatalog/src/pages/architecture/[type]/index.astro +14 -0
  29. package/eventcatalog/src/pages/architecture/architecture.astro +81 -0
  30. package/eventcatalog/src/pages/architecture/docs/[type]/index.astro +14 -0
  31. package/eventcatalog/src/pages/index.astro +237 -72
  32. package/eventcatalog/src/utils/url-builder.ts +20 -0
  33. package/eventcatalog/tailwind.config.mjs +11 -0
  34. package/package.json +2 -1
  35. package/eventcatalog/src/components/SideNav/CatalogResourcesSideBar/getCatalogResources.ts +0 -65
  36. package/eventcatalog/src/components/SideNav/CatalogResourcesSideBar/index.tsx +0 -138
  37. package/eventcatalog/src/components/SideNav/CatalogResourcesSideBar/styles.css +0 -8
@@ -0,0 +1,14 @@
1
+ ---
2
+ import Architecture from '../architecture.astro';
3
+
4
+ export async function getStaticPaths() {
5
+ const VALID_TYPES = ['domains', 'services', 'messages'] as const;
6
+ return VALID_TYPES.map((type) => ({
7
+ params: { type },
8
+ }));
9
+ }
10
+
11
+ const { type } = Astro.params;
12
+ ---
13
+
14
+ <Architecture type={type} />
@@ -0,0 +1,81 @@
1
+ ---
2
+ import { getDomains, getMessagesForDomain } from '@utils/collections/domains';
3
+ import { getServices } from '@utils/collections/services';
4
+ import { getMessages } from '@utils/messages';
5
+ import type { ExtendedDomain } from '@components/Grids/DomainGrid';
6
+ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
7
+ import DomainGrid from '@components/Grids/DomainGrid';
8
+ import ServiceGrid from '@components/Grids/ServiceGrid';
9
+ import MessageGrid from '@components/Grids/MessageGrid';
10
+
11
+ import type { CollectionEntry } from 'astro:content';
12
+ import type { CollectionMessageTypes } from '@types';
13
+
14
+ import { ClientRouter, fade } from 'astro:transitions';
15
+ // Define valid types and their corresponding data fetchers
16
+ const VALID_TYPES = ['domains', 'services', 'messages'] as const;
17
+ type ValidType = (typeof VALID_TYPES)[number];
18
+
19
+ interface Service extends CollectionEntry<'services'> {
20
+ sends: CollectionEntry<'events' | 'commands' | 'queries'>[];
21
+ receives: CollectionEntry<'events' | 'commands' | 'queries'>[];
22
+ }
23
+
24
+ const { type } = Astro.props as { type: ValidType };
25
+
26
+ // Get data based on type
27
+ let items: ExtendedDomain[] | Service[] | CollectionEntry<'commands'>[] | CollectionEntry<CollectionMessageTypes>[] = [];
28
+
29
+ if (type === 'domains') {
30
+ const domains = await getDomains({ getAllVersions: false });
31
+
32
+ // Get messages for each domain
33
+ items = await Promise.all(
34
+ domains.map(async (domain) => {
35
+ const messages = await getMessagesForDomain(domain);
36
+ // @ts-ignore we have to remove markdown information, as it's all send to the astro components. This reduced the page size.
37
+ return {
38
+ ...domain,
39
+ sends: messages.sends.map((s) => ({ ...s, body: undefined, catalog: undefined })),
40
+ receives: messages.receives.map((r) => ({ ...r, body: undefined, catalog: undefined })),
41
+ catalog: undefined,
42
+ body: undefined,
43
+ } as ExtendedDomain;
44
+ })
45
+ );
46
+ } else if (type === 'services') {
47
+ const services = await getServices({ getAllVersions: false });
48
+ let filteredServices = services.map((s) => {
49
+ // @ts-ignore we have to remove markdown information, as it's all send to the astro components. This reduced the page size.
50
+ return {
51
+ ...s,
52
+ sends: (s.data.sends || []).map((s) => ({ ...s, body: undefined, catalog: undefined })),
53
+ receives: (s.data.receives || []).map((r) => ({ ...r, body: undefined, catalog: undefined })),
54
+ catalog: undefined,
55
+ body: undefined,
56
+ } as Service;
57
+ }) as unknown as Service[];
58
+ items = filteredServices;
59
+ } else if (type === 'messages') {
60
+ const { events, commands, queries } = await getMessages({ getAllVersions: false });
61
+ const messages = [...events, ...commands, ...queries];
62
+ items = messages.map((m) => ({
63
+ ...m,
64
+ body: undefined,
65
+ catalog: undefined,
66
+ })) as unknown as CollectionEntry<CollectionMessageTypes>[];
67
+ }
68
+ ---
69
+
70
+ <VerticalSideBarLayout title={'EventCatalog'}>
71
+ <div class="bg-white min-h-screen">
72
+ <div class="max-w-[90em] mx-auto">
73
+ <div class="px-6 py-6" transition:animate={fade({ duration: '0.4s' })}>
74
+ {type === 'domains' && <DomainGrid domains={items as ExtendedDomain[]} client:load />}
75
+ {type === 'services' && <ServiceGrid services={items as unknown as Service[]} client:load />}
76
+ {type === 'messages' && <MessageGrid messages={items as CollectionEntry<CollectionMessageTypes>[]} client:load />}
77
+ </div>
78
+ </div>
79
+ <ClientRouter />
80
+ </div>
81
+ </VerticalSideBarLayout>
@@ -0,0 +1,14 @@
1
+ ---
2
+ import Architecture from '../../architecture.astro';
3
+
4
+ export async function getStaticPaths() {
5
+ const VALID_TYPES = ['domains', 'services', 'messages'] as const;
6
+ return VALID_TYPES.map((type) => ({
7
+ params: { type },
8
+ }));
9
+ }
10
+
11
+ const { type } = Astro.params;
12
+ ---
13
+
14
+ <Architecture type={type} />
@@ -8,6 +8,7 @@ import {
8
8
  ServerIcon,
9
9
  MagnifyingGlassIcon,
10
10
  } from '@heroicons/react/24/outline';
11
+ import config from '@config';
11
12
 
12
13
  import { getMessages } from '@utils/messages';
13
14
  import { getDomains } from '@utils/collections/domains';
@@ -15,107 +16,271 @@ import { getServices } from '@utils/collections/services';
15
16
  import { getFlows } from '@utils/collections/flows';
16
17
  import DiscoverInsight from '@components/DiscoverInsight.astro';
17
18
  import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
18
- import { BookOpen, BookOpenText, TableProperties, Workflow } from 'lucide-react';
19
+ import { BookOpenText, Workflow, TableProperties, House, BookUser, MessageSquare, BotMessageSquare, Users } from 'lucide-react';
19
20
 
20
21
  const { commands = [], events = [], queries = [] } = await getMessages({ getAllVersions: false });
22
+ const messages = [...events, ...queries, ...commands];
21
23
  const domains = await getDomains({ getAllVersions: false });
22
24
  const services = await getServices({ getAllVersions: false });
23
25
  const flows = await getFlows({ getAllVersions: false });
24
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
+ ];
89
+
25
90
  const getDefaultUrl = (route: string, defaultValue: string) => {
26
91
  if (domains.length > 0) return buildUrl(`/${route}/domains/${domains[0].data.id}/${domains[0].data.latestVersion}`);
27
92
  if (services.length > 0) return buildUrl(`/${route}/services/${services[0].data.id}/${services[0].data.latestVersion}`);
28
93
  if (flows.length > 0) return buildUrl(`/${route}/flows/${flows[0].data.id}/${flows[0].data.latestVersion}`);
29
94
  return buildUrl(defaultValue);
30
95
  };
96
+
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
+ ];
31
129
  ---
32
130
 
33
131
  <VerticalSideBarLayout title="EventCatalog">
34
- <body class="min-h-screen">
35
- <main class="">
36
- <div class="container mx-auto px-6 py-20 max-w-[90em]">
37
- <section class="text-center mb-8">
38
- <h1 class="text-5xl font-bold mb-6 text-gray-800">Welcome to <span class="text-primary">EventCatalog</span></h1>
39
- <p class="text-xl mb-8 text-gray-700 max-w-2xl mx-auto font-light">
40
- Discover and document your event-driven architecture effortlessly. EventCatalog centralizes your events, services, and
41
- schemas in one place.
42
- </p>
43
- </section>
44
-
45
- <div class="hidden md:block">
46
- <!-- <h2 class="text-center text-xl ">Architecture insights</h2> -->
47
- <section class="mb-16 bg-white rounded-xl shadow-lg p-6">
48
- <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4">
49
- <DiscoverInsight color="text-yellow-600" dataTarget={domains.length} icon={RectangleGroupIcon} label="domains" />
50
-
51
- <DiscoverInsight color="text-pink-500" dataTarget={services.length} icon={ServerIcon} label="services" />
52
-
53
- <DiscoverInsight color="text-blue-500" dataTarget={commands.length} icon={ChatBubbleLeftIcon} label="commands" />
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>
54
142
 
55
- <DiscoverInsight color="text-green-500" dataTarget={queries.length} icon={MagnifyingGlassIcon} label="queries" />
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>
56
167
 
57
- <DiscoverInsight color="text-orange-400" dataTarget={events.length} icon={BoltIcon} label="events" />
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>
58
188
 
59
- <DiscoverInsight color="text-green-800" dataTarget={flows.length} icon={QueueListIcon} label="flows" />
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>
60
202
  </div>
61
- </section>
203
+ </a>
62
204
 
63
- <section class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-16">
64
- <div
65
- class="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition duration-300 transform hover:-translate-y-1"
66
- >
67
- <div class="h-2 bg-blue-400"></div>
68
- <div class="p-6">
69
- <h2 class="text-2xl font-semibold mb-4 text-blue-700 flex items-center">
70
- <BookOpenText size={24} className="inline-block mr-2" />
71
- <span class="block">Documentation</span>
72
- </h2>
73
- <p class="text-gray-600 mb-4">
74
- Create and maintain comprehensive documentation for your events, including schemas, examples, and versioning.
75
- </p>
76
- <a href={getDefaultUrl('docs', '/docs')} class="text-blue-600 hover:text-blue-800 font-semibold">Explore docs →</a
77
- >
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>
78
216
  </div>
217
+ <p class="text-sm text-gray-600">Navigate through your events and services</p>
79
218
  </div>
80
- <div
81
- class="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition duration-300 transform hover:-translate-y-1"
82
- >
83
- <div class="h-2 bg-teal-400"></div>
84
- <div class="p-6">
85
- <h2 class="text-2xl font-semibold mb-4 text-teal-700 flex items-center">
86
- <Workflow size={24} className="inline-block mr-2" />
87
- <span class="block">Visualiser</span>
88
- </h2>
89
- <p class="text-gray-600 mb-4">
90
- Transform complex event flows into clear, interactive diagrams. Gain insights at a glance and communicate
91
- effectively across teams.
92
- </p>
93
- <a href={getDefaultUrl('visualiser', '/visualiser')} class="text-teal-600 hover:text-teal-800 font-semibold"
94
- >Explore visualiser →</a
95
- >
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>
96
232
  </div>
233
+ <p class="text-sm text-gray-600">Ask questions about your architecture</p>
97
234
  </div>
235
+ </a>
98
236
 
99
- <div
100
- class="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition duration-300 transform hover:-translate-y-1"
101
- >
102
- <div class="h-2 bg-red-700"></div>
103
- <div class="p-6">
104
- <h2 class="text-2xl font-semibold mb-4 text-red-700 flex items-center">
105
- <TableProperties size={24} className="inline-block mr-2" />
106
- <span class="block">Discover</span>
107
- </h2>
108
- <p class="text-gray-600 mb-4">
109
- Dive deep into your event catalog. Search, filter, and analyze your events to gain insights and improve your
110
- architecture.
111
- </p>
112
- <a href={buildUrl('/discover/events')} class="text-red-600 hover:text-red-800 font-semibold">Start exploring →</a>
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>
113
248
  </div>
249
+ <p class="text-sm text-gray-600">Discover service and message ownership</p>
114
250
  </div>
115
- </section>
251
+ </a>
116
252
  </div>
117
- <!-- <Footer className="px-10" /> -->
118
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
+ }
282
+ </div>
283
+ </section>
119
284
  </main>
120
285
  </body>
121
286
  </VerticalSideBarLayout>
@@ -22,3 +22,23 @@ export const buildUrl = (url: string, ignoreTrailingSlash = false) => {
22
22
 
23
23
  return cleanUrl(newUrl);
24
24
  };
25
+
26
+ // Helper function to build URLs with query parameters
27
+ export const buildUrlWithParams = (baseUrl: string, params: Record<string, string | undefined>) => {
28
+ // Filter out undefined values and empty strings
29
+ const validParams = Object.entries(params)
30
+ .filter(([_, value]) => value !== undefined && value !== '')
31
+ .reduce<Record<string, string>>((acc, [key, value]) => ({ ...acc, [key]: value as string }), {});
32
+
33
+ // If no valid params, just return the base URL
34
+ if (Object.keys(validParams).length === 0) {
35
+ return buildUrl(baseUrl);
36
+ }
37
+
38
+ // Build query string with encoded values
39
+ const queryString = Object.entries(validParams)
40
+ .map(([key, value]) => `${key}=${value}`)
41
+ .join('&');
42
+
43
+ return buildUrl(`${baseUrl}?${queryString}`);
44
+ };
@@ -8,6 +8,9 @@ export default {
8
8
  content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
9
9
  theme: {
10
10
  extend: {
11
+ fontFamily: {
12
+ sans: ['Inter', 'sans-serif'],
13
+ },
11
14
  height: {
12
15
  header: HEADER_HEIGHT,
13
16
  content: `calc(100vh - ${HEADER_HEIGHT})`,
@@ -44,10 +47,18 @@ export default {
44
47
  'bg-orange-600',
45
48
  'bg-red-50',
46
49
  'bg-yellow-50',
50
+ 'bg-pink-50',
51
+ 'bg-green-50',
52
+ 'bg-blue-50',
47
53
  'bg-indigo-50',
48
54
  'border-l-red-500',
49
55
  'border-l-yellow-500',
50
56
  'border-l-blue-500',
57
+ 'bg-yellow-100',
58
+ 'bg-pink-100',
59
+ 'bg-green-100',
60
+ 'bg-blue-100',
61
+ 'bg-indigo-100',
51
62
  ],
52
63
 
53
64
  plugins: [require('@tailwindcss/typography')],
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.26.1",
9
+ "version": "2.28.0",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -30,6 +30,7 @@
30
30
  "@asyncapi/parser": "^3.4.0",
31
31
  "@asyncapi/react-component": "^2.4.3",
32
32
  "@eventcatalog/generator-ai": "^0.1.5",
33
+ "@fontsource/inter": "^5.2.5",
33
34
  "@headlessui/react": "^2.0.3",
34
35
  "@heroicons/react": "^2.1.3",
35
36
  "@huggingface/transformers": "^3.3.3",
@@ -1,65 +0,0 @@
1
- import { isCollectionVisibleInCatalog } from '@eventcatalog';
2
- import { buildUrl } from '@utils/url-builder';
3
- import { getChannels } from '@utils/channels';
4
- import { getDomains } from '@utils/collections/domains';
5
- import { getFlows } from '@utils/collections/flows';
6
- import { getServices } from '@utils/collections/services';
7
- import { getCommands } from '@utils/commands';
8
- import { getEvents } from '@utils/events';
9
- import { getQueries } from '@utils/queries';
10
- import { getTeams } from '@utils/teams';
11
- import { getUsers } from '@utils/users';
12
-
13
- export async function getCatalogResources({ currentPath }: { currentPath: string }) {
14
- const events = await getEvents({ getAllVersions: false });
15
- const commands = await getCommands({ getAllVersions: false });
16
- const queries = await getQueries({ getAllVersions: false });
17
- const services = await getServices({ getAllVersions: false });
18
- const domains = await getDomains({ getAllVersions: false });
19
- const channels = await getChannels({ getAllVersions: false });
20
- const flows = await getFlows({ getAllVersions: false });
21
-
22
- const messages = [...events, ...commands, ...queries];
23
-
24
- // @ts-ignore for large catalogs https://github.com/event-catalog/eventcatalog/issues/552
25
- const allData = [...domains, ...services, ...messages, ...channels, ...flows];
26
-
27
- const allDataAsSideNav = allData.reduce((acc, item) => {
28
- const title = item.collection;
29
- const group = acc[title] || [];
30
- const route = currentPath.includes('visualiser') ? 'visualiser' : 'docs';
31
-
32
- const navigationItem = {
33
- label: item.data.name,
34
- version: item.data.version,
35
- // items: item.collection === 'users' ? [] : item.headings,
36
- visible: isCollectionVisibleInCatalog(item.collection),
37
- // @ts-ignore
38
- href: item.data.version
39
- ? // @ts-ignore
40
- buildUrl(`/${route}/${item.collection}/${item.data.id}/${item.data.version}`)
41
- : buildUrl(`/${route}/${item.collection}/${item.data.id}`),
42
- collection: item.collection,
43
- };
44
-
45
- group.push(navigationItem);
46
-
47
- return {
48
- ...acc,
49
- [title]: group,
50
- };
51
- }, {} as any);
52
-
53
- const sideNav = {
54
- ...(currentPath.includes('visualiser')
55
- ? {
56
- 'bounded context map': [
57
- { label: 'Domain map', href: buildUrl('/visualiser/context-map'), collection: 'bounded-context-map' },
58
- ],
59
- }
60
- : {}),
61
- ...allDataAsSideNav,
62
- };
63
-
64
- return sideNav;
65
- }