@eventcatalog/core 2.26.0 → 2.27.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.
- package/README.md +7 -3
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/catalog-to-astro-content-directory.cjs +1 -7
- package/dist/catalog-to-astro-content-directory.js +2 -2
- package/dist/{chunk-3EOBEGSB.js → chunk-2VGR4HMJ.js} +1 -1
- package/dist/{chunk-TFBAK5C5.js → chunk-CTL6CH3C.js} +1 -1
- package/dist/{chunk-7JDTB3U5.js → chunk-FIY5JLSQ.js} +0 -2
- package/dist/{chunk-IY5HYH2G.js → chunk-LMNJPHFP.js} +1 -1
- package/dist/{chunk-VCR3LHZR.js → chunk-R2NILSWL.js} +2 -6
- package/dist/{chunk-OW2FQPYP.js → chunk-WUCY3QHK.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +2 -8
- package/dist/eventcatalog.js +6 -6
- package/dist/map-catalog-to-astro.cjs +0 -2
- package/dist/map-catalog-to-astro.js +1 -1
- package/dist/watcher.cjs +0 -2
- package/dist/watcher.js +2 -2
- package/eventcatalog/astro.config.mjs +0 -3
- package/eventcatalog/src/components/Grids/DomainGrid.tsx +233 -0
- package/eventcatalog/src/components/Grids/MessageGrid.tsx +457 -0
- package/eventcatalog/src/components/Grids/ServiceGrid.tsx +364 -0
- package/eventcatalog/src/components/Grids/components.tsx +170 -0
- package/eventcatalog/src/components/Grids/utils.tsx +38 -0
- package/eventcatalog/src/{content/config.ts → content.config.ts} +12 -2
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +29 -17
- package/eventcatalog/src/pages/architecture/[type]/index.astro +88 -0
- package/eventcatalog/src/pages/chat/index.astro +1 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +6 -13
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +7 -13
- package/eventcatalog/src/pages/index.astro +237 -72
- package/eventcatalog/src/utils/url-builder.ts +20 -0
- package/eventcatalog/src/utils/users.ts +2 -2
- package/eventcatalog/tailwind.config.mjs +11 -0
- package/package.json +2 -1
- package/default-files-for-collections/teams.md +0 -11
- package/default-files-for-collections/users.md +0 -11
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
export async function getStaticPaths() {
|
|
25
|
+
const VALID_TYPES = ['domains', 'services', 'messages'] as const;
|
|
26
|
+
return VALID_TYPES.map((type) => ({
|
|
27
|
+
params: { type },
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const { type } = Astro.params as { type: ValidType };
|
|
32
|
+
|
|
33
|
+
// Get data based on type
|
|
34
|
+
let items: ExtendedDomain[] | Service[] | CollectionEntry<'commands'>[] | CollectionEntry<CollectionMessageTypes>[] = [];
|
|
35
|
+
|
|
36
|
+
if (type === 'domains') {
|
|
37
|
+
const domains = await getDomains({ getAllVersions: false });
|
|
38
|
+
|
|
39
|
+
// Get messages for each domain
|
|
40
|
+
items = await Promise.all(
|
|
41
|
+
domains.map(async (domain) => {
|
|
42
|
+
const messages = await getMessagesForDomain(domain);
|
|
43
|
+
// @ts-ignore we have to remove markdown information, as it's all send to the astro components. This reduced the page size.
|
|
44
|
+
return {
|
|
45
|
+
...domain,
|
|
46
|
+
sends: messages.sends.map((s) => ({ ...s, body: undefined, catalog: undefined })),
|
|
47
|
+
receives: messages.receives.map((r) => ({ ...r, body: undefined, catalog: undefined })),
|
|
48
|
+
catalog: undefined,
|
|
49
|
+
body: undefined,
|
|
50
|
+
} as ExtendedDomain;
|
|
51
|
+
})
|
|
52
|
+
);
|
|
53
|
+
} else if (type === 'services') {
|
|
54
|
+
const services = await getServices({ getAllVersions: false });
|
|
55
|
+
let filteredServices = services.map((s) => {
|
|
56
|
+
// @ts-ignore we have to remove markdown information, as it's all send to the astro components. This reduced the page size.
|
|
57
|
+
return {
|
|
58
|
+
...s,
|
|
59
|
+
sends: (s.data.sends || []).map((s) => ({ ...s, body: undefined, catalog: undefined })),
|
|
60
|
+
receives: (s.data.receives || []).map((r) => ({ ...r, body: undefined, catalog: undefined })),
|
|
61
|
+
catalog: undefined,
|
|
62
|
+
body: undefined,
|
|
63
|
+
} as Service;
|
|
64
|
+
}) as unknown as Service[];
|
|
65
|
+
items = filteredServices;
|
|
66
|
+
} else if (type === 'messages') {
|
|
67
|
+
const { events, commands, queries } = await getMessages({ getAllVersions: false });
|
|
68
|
+
const messages = [...events, ...commands, ...queries];
|
|
69
|
+
items = messages.map((m) => ({
|
|
70
|
+
...m,
|
|
71
|
+
body: undefined,
|
|
72
|
+
catalog: undefined,
|
|
73
|
+
})) as unknown as CollectionEntry<CollectionMessageTypes>[];
|
|
74
|
+
}
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
<VerticalSideBarLayout title={'EventCatalog'}>
|
|
78
|
+
<div class="bg-white min-h-screen">
|
|
79
|
+
<div class="max-w-[90em] mx-auto">
|
|
80
|
+
<div class="px-6 py-6" transition:animate={fade({ duration: '0.4s' })}>
|
|
81
|
+
{type === 'domains' && <DomainGrid domains={items as ExtendedDomain[]} client:load />}
|
|
82
|
+
{type === 'services' && <ServiceGrid services={items as unknown as Service[]} client:load />}
|
|
83
|
+
{type === 'messages' && <MessageGrid messages={items as CollectionEntry<CollectionMessageTypes>[]} client:load />}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<ClientRouter />
|
|
87
|
+
</div>
|
|
88
|
+
</VerticalSideBarLayout>
|
|
@@ -108,7 +108,7 @@ const generatorConfig = `
|
|
|
108
108
|
<h3 class="text-lg text-white font-semibold mb-3">Quick Setup</h3>
|
|
109
109
|
<Code code={`npm install @eventcatalog/generator-ai`} lang="bash" frame="none" />
|
|
110
110
|
<a
|
|
111
|
-
href="https://www.eventcatalog.dev/
|
|
111
|
+
href="https://www.eventcatalog.dev/features/ai-assistant"
|
|
112
112
|
class="inline-flex items-center text-sm text-white mt-4"
|
|
113
113
|
>
|
|
114
114
|
Learn more about setup →
|
|
@@ -3,7 +3,7 @@ import components from '@components/MDX/components';
|
|
|
3
3
|
|
|
4
4
|
// SideBars
|
|
5
5
|
import { getTeams } from '@utils/teams';
|
|
6
|
-
import { getEntry } from 'astro:content';
|
|
6
|
+
import { getEntry, render } from 'astro:content';
|
|
7
7
|
import type { CollectionEntry } from 'astro:content';
|
|
8
8
|
import OwnersList from '@components/Lists/OwnersList';
|
|
9
9
|
import PillListFlat from '@components/Lists/PillListFlat';
|
|
@@ -15,23 +15,16 @@ export async function getStaticPaths() {
|
|
|
15
15
|
const teams = await getTeams();
|
|
16
16
|
|
|
17
17
|
return teams.map((team) => ({
|
|
18
|
-
params: {
|
|
19
|
-
|
|
20
|
-
id: team.data.id,
|
|
21
|
-
},
|
|
22
|
-
props: {
|
|
23
|
-
type: 'team',
|
|
24
|
-
...team,
|
|
25
|
-
},
|
|
18
|
+
params: { id: team.data.id },
|
|
19
|
+
props: team,
|
|
26
20
|
}));
|
|
27
21
|
}
|
|
28
22
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const { Content } = await render();
|
|
23
|
+
const props = Astro.props;
|
|
24
|
+
const { Content } = await render(props);
|
|
32
25
|
|
|
33
26
|
const membersRaw = props.data.members || [];
|
|
34
|
-
const members = await Promise.all(membersRaw.map((m) => getEntry(m)));
|
|
27
|
+
const members = (await Promise.all(membersRaw.map((m) => getEntry(m)))).filter(Boolean);
|
|
35
28
|
|
|
36
29
|
const domains = props.data.ownedDomains as CollectionEntry<'domains'>[];
|
|
37
30
|
const services = props.data.ownedServices as CollectionEntry<'services'>[];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import components from '@components/MDX/components';
|
|
3
3
|
|
|
4
4
|
// SideBars
|
|
5
|
+
import { render } from 'astro:content';
|
|
5
6
|
import type { CollectionEntry } from 'astro:content';
|
|
6
7
|
import OwnersList from '@components/Lists/OwnersList';
|
|
7
8
|
import PillListFlat from '@components/Lists/PillListFlat';
|
|
@@ -11,23 +12,16 @@ import { buildUrl } from '@utils/url-builder';
|
|
|
11
12
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
12
13
|
|
|
13
14
|
export async function getStaticPaths() {
|
|
14
|
-
const
|
|
15
|
+
const users = await getUsers();
|
|
15
16
|
|
|
16
|
-
return
|
|
17
|
-
params: {
|
|
18
|
-
|
|
19
|
-
id: team.data.id,
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
type: 'team',
|
|
23
|
-
...team,
|
|
24
|
-
},
|
|
17
|
+
return users.map((user) => ({
|
|
18
|
+
params: { id: user.data.id },
|
|
19
|
+
props: user,
|
|
25
20
|
}));
|
|
26
21
|
}
|
|
27
22
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const { Content } = await render();
|
|
23
|
+
const props = Astro.props;
|
|
24
|
+
const { Content } = await render(props);
|
|
31
25
|
|
|
32
26
|
const domains = props.data.ownedDomains as CollectionEntry<'domains'>[];
|
|
33
27
|
const services = props.data.ownedServices as CollectionEntry<'services'>[];
|
|
@@ -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 {
|
|
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="
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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'} Documentation
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
</
|
|
203
|
+
</a>
|
|
62
204
|
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<
|
|
72
|
-
</
|
|
73
|
-
<
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
</
|
|
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
|
+
};
|
|
@@ -32,8 +32,8 @@ export const getUsers = async (): Promise<User[]> => {
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
const isOwnedByUserOrAssociatedTeam = (item: CollectionEntry<CollectionTypes>) => {
|
|
35
|
-
const
|
|
36
|
-
return item.data.owners?.some((owner) => owner.id === user.data.id ||
|
|
35
|
+
const associatedTeamsId: string[] = associatedTeams.map((team) => team.data.id);
|
|
36
|
+
return item.data.owners?.some((owner) => owner.id === user.data.id || associatedTeamsId.includes(owner.id));
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
const ownedServices = services.filter(isOwnedByUserOrAssociatedTeam);
|
|
@@ -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.
|
|
9
|
+
"version": "2.27.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,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: dboyne
|
|
3
|
-
name: David Boyne
|
|
4
|
-
avatarUrl: "https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_400x400.png"
|
|
5
|
-
role: Lead developer
|
|
6
|
-
email: test@test.com
|
|
7
|
-
hidden: true
|
|
8
|
-
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<!-- Do not delete this file, required for EC, you an ignore this file -->
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: dboyne
|
|
3
|
-
name: David Boyne
|
|
4
|
-
avatarUrl: "https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_400x400.png"
|
|
5
|
-
role: Lead developer
|
|
6
|
-
email: test@test.com
|
|
7
|
-
hidden: true
|
|
8
|
-
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<!-- Do not delete this file, required for EC, you an ignore this file -->
|