@eventcatalog/core 3.0.0-beta.2 → 3.0.0-beta.21

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 (103) hide show
  1. package/README.md +10 -0
  2. package/dist/__mocks__/astro-content.cjs +32 -0
  3. package/dist/__mocks__/astro-content.d.cts +13 -0
  4. package/dist/__mocks__/astro-content.d.ts +13 -0
  5. package/dist/__mocks__/astro-content.js +7 -0
  6. package/dist/analytics/analytics.cjs +1 -1
  7. package/dist/analytics/analytics.js +2 -2
  8. package/dist/analytics/log-build.cjs +1 -1
  9. package/dist/analytics/log-build.js +3 -3
  10. package/dist/{chunk-JSONCD7V.js → chunk-2FUEBPD3.js} +1 -1
  11. package/dist/{chunk-3W6JYTHP.js → chunk-HABY2LVH.js} +6 -2
  12. package/dist/{chunk-H4QHE5YZ.js → chunk-KQAMO3R4.js} +1 -1
  13. package/dist/chunk-Q6KRYWPV.js +44 -0
  14. package/dist/{chunk-PQL6O5YA.js → chunk-RRP2B7BL.js} +1 -1
  15. package/dist/constants.cjs +1 -1
  16. package/dist/constants.js +1 -1
  17. package/dist/eventcatalog.cjs +84 -65
  18. package/dist/eventcatalog.config.d.cts +4 -0
  19. package/dist/eventcatalog.config.d.ts +4 -0
  20. package/dist/eventcatalog.js +45 -57
  21. package/dist/generate.cjs +48 -2
  22. package/dist/generate.js +3 -1
  23. package/dist/utils/cli-logger.cjs +82 -0
  24. package/dist/utils/cli-logger.d.cts +10 -0
  25. package/dist/utils/cli-logger.d.ts +10 -0
  26. package/dist/utils/cli-logger.js +7 -0
  27. package/eventcatalog/astro.config.mjs +4 -1
  28. package/eventcatalog/integrations/ecstudio-watcher.mjs +1 -1
  29. package/eventcatalog/integrations/eventcatalog-features.ts +69 -0
  30. package/eventcatalog/public/icons/asyncapi-black.svg +2 -0
  31. package/eventcatalog/public/icons/graphql-black.svg +1 -0
  32. package/eventcatalog/public/icons/openapi-black.svg +1 -0
  33. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +821 -0
  34. package/eventcatalog/src/components/ChatPanel/ChatPanelButton.tsx +24 -0
  35. package/eventcatalog/src/components/Grids/DomainGrid.tsx +1 -3
  36. package/eventcatalog/src/components/Grids/MessageGrid.tsx +8 -8
  37. package/eventcatalog/src/components/Header.astro +25 -5
  38. package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +14 -3
  39. package/eventcatalog/src/components/Search/Search.astro +2 -2
  40. package/eventcatalog/src/components/Search/SearchModal.tsx +16 -7
  41. package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +9 -2
  42. package/eventcatalog/src/components/SideNav/NestedSideBar/builders/domain.ts +7 -6
  43. package/eventcatalog/src/components/SideNav/NestedSideBar/builders/service.ts +6 -3
  44. package/eventcatalog/src/components/SideNav/NestedSideBar/builders/shared.ts +1 -0
  45. package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +23 -8
  46. package/eventcatalog/src/components/SideNav/NestedSideBar/sidebar-builder.ts +57 -11
  47. package/eventcatalog/src/content.config.ts +1 -10
  48. package/eventcatalog/src/enterprise/ai/chat-api.ts +262 -0
  49. package/eventcatalog/src/enterprise/auth/[...auth].ts +3 -0
  50. package/eventcatalog/src/enterprise/auth/login.astro +420 -0
  51. package/eventcatalog/src/enterprise/collections/index.ts +0 -1
  52. package/eventcatalog/src/layouts/Footer.astro +8 -5
  53. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +30 -19
  54. package/eventcatalog/src/pages/_index.astro +8 -9
  55. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +19 -3
  56. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +7 -7
  57. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +1 -1
  58. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +5 -5
  59. package/eventcatalog/src/pages/docs/teams/[id].mdx.ts +36 -0
  60. package/eventcatalog/src/pages/docs/users/[id].mdx.ts +36 -0
  61. package/eventcatalog/src/pages/schemas/explorer/_index.data.ts +178 -0
  62. package/eventcatalog/src/pages/schemas/explorer/index.astro +5 -155
  63. package/eventcatalog/src/remark-plugins/directives.ts +30 -9
  64. package/eventcatalog/src/utils/collections/schemas.ts +31 -7
  65. package/eventcatalog/src/utils/feature.ts +8 -4
  66. package/eventcatalog/src/utils/resource-files.ts +86 -0
  67. package/package.json +12 -15
  68. package/default-files-for-collections/changelogs.md +0 -5
  69. package/default-files-for-collections/channels.md +0 -8
  70. package/default-files-for-collections/commands.md +0 -8
  71. package/default-files-for-collections/domains.md +0 -8
  72. package/default-files-for-collections/events.md +0 -8
  73. package/default-files-for-collections/flows.md +0 -11
  74. package/default-files-for-collections/queries.md +0 -8
  75. package/default-files-for-collections/services.md +0 -8
  76. package/default-files-for-collections/ubiquitousLanguages.md +0 -7
  77. package/eventcatalog/src/enterprise/collections/chat-prompts.ts +0 -32
  78. package/eventcatalog/src/enterprise/eventcatalog-chat/components/Chat.tsx +0 -60
  79. package/eventcatalog/src/enterprise/eventcatalog-chat/components/ChatMessage.tsx +0 -414
  80. package/eventcatalog/src/enterprise/eventcatalog-chat/components/ChatSidebar.tsx +0 -169
  81. package/eventcatalog/src/enterprise/eventcatalog-chat/components/InputModal.tsx +0 -244
  82. package/eventcatalog/src/enterprise/eventcatalog-chat/components/MentionInput.tsx +0 -211
  83. package/eventcatalog/src/enterprise/eventcatalog-chat/components/WelcomePromptArea.tsx +0 -176
  84. package/eventcatalog/src/enterprise/eventcatalog-chat/components/default-prompts.ts +0 -93
  85. package/eventcatalog/src/enterprise/eventcatalog-chat/components/hooks/ChatProvider.tsx +0 -143
  86. package/eventcatalog/src/enterprise/eventcatalog-chat/components/windows/ChatWindow.server.tsx +0 -387
  87. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/api/chat.ts +0 -59
  88. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/chat/index.astro +0 -104
  89. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/ai-provider.ts +0 -140
  90. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/anthropic.ts +0 -28
  91. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/google.ts +0 -41
  92. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/index.ts +0 -26
  93. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/openai.ts +0 -61
  94. package/eventcatalog/src/enterprise/eventcatalog-chat/utils/chat-prompts.ts +0 -50
  95. package/eventcatalog/src/pages/auth/login.astro +0 -280
  96. package/eventcatalog/src/pages/chat/feature.astro +0 -179
  97. package/eventcatalog/src/pages/chat/index.astro +0 -10
  98. package/eventcatalog/src/pages/nav-index.json.ts +0 -30
  99. /package/eventcatalog/src/{pages → enterprise}/auth/error.astro +0 -0
  100. /package/eventcatalog/src/{middleware-auth.ts → enterprise/auth/middleware/middleware-auth.ts} +0 -0
  101. /package/eventcatalog/src/{middleware.ts → enterprise/auth/middleware/middleware.ts} +0 -0
  102. /package/eventcatalog/src/{pages/unauthorized/index.astro → enterprise/auth/unauthorized.astro} +0 -0
  103. /package/eventcatalog/src/{pages → enterprise}/plans/index.astro +0 -0
@@ -0,0 +1,420 @@
1
+ ---
2
+ import config from '@config';
3
+ const { title, logo } = config;
4
+ import { join } from 'node:path';
5
+ import { isAuthEnabled, isSSR } from '@utils/feature';
6
+ import { buildUrl } from '@utils/url-builder';
7
+
8
+ const catalogDirectory = process.env.PROJECT_DIR || process.cwd();
9
+
10
+ let hasAuthConfigurationFile = false;
11
+ let providers: string[] = [];
12
+
13
+ try {
14
+ const authConfig = await import(/* @vite-ignore */ join(catalogDirectory, 'eventcatalog.auth.js'));
15
+ providers = Object.keys(authConfig.default.providers);
16
+ hasAuthConfigurationFile = true;
17
+ } catch (error) {
18
+ hasAuthConfigurationFile = false;
19
+ }
20
+
21
+ // Check if we should show login (auth file exists, SSR enabled, auth enabled, and has providers)
22
+ const shouldShowLogin = hasAuthConfigurationFile && isSSR() && isAuthEnabled() && providers.length > 0;
23
+
24
+ // Check if configuration exists but no providers are set up
25
+ const hasConfigButNoProviders = hasAuthConfigurationFile && isSSR() && isAuthEnabled() && providers.length === 0;
26
+
27
+ // If we are not in SSR mode, redirect to home
28
+ if (!isSSR() || !isAuthEnabled()) {
29
+ return Astro.redirect('/');
30
+ }
31
+
32
+ // If we are in SSR mode, check if the user is already logged in
33
+ if (isSSR() && isAuthEnabled()) {
34
+ const { getSession } = await import(/* @vite-ignore */ 'auth-astro/server');
35
+ const session = await getSession(Astro.request);
36
+ if (session) {
37
+ return Astro.redirect('/');
38
+ }
39
+ }
40
+
41
+ // Provider configurations
42
+ const providerConfig = {
43
+ github: {
44
+ name: 'GitHub',
45
+ bgColor: 'bg-gray-900',
46
+ hoverBg: 'hover:bg-gray-800',
47
+ textColor: 'text-white',
48
+ icon: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
49
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"></path>
50
+ </svg>`,
51
+ },
52
+ google: {
53
+ name: 'Google',
54
+ bgColor: 'bg-white',
55
+ hoverBg: 'hover:bg-gray-50',
56
+ textColor: 'text-gray-700',
57
+ border: true,
58
+ icon: `<svg class="w-5 h-5" viewBox="0 0 24 24">
59
+ <path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/>
60
+ <path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/>
61
+ <path fill="#FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/>
62
+ <path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/>
63
+ </svg>`,
64
+ },
65
+ okta: {
66
+ name: 'Okta',
67
+ bgColor: 'bg-[#007DC1]',
68
+ hoverBg: 'hover:bg-[#006BA8]',
69
+ textColor: 'text-white',
70
+ icon: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
71
+ <path d="M12 0C5.389 0 0 5.389 0 12s5.389 12 12 12 12-5.389 12-12S18.611 0 12 0zm0 18c-3.314 0-6-2.686-6-6s2.686-6 6-6 6 2.686 6 6-2.686 6-6 6z"/>
72
+ </svg>`,
73
+ },
74
+ auth0: {
75
+ name: 'Auth0',
76
+ bgColor: 'bg-[#EB5424]',
77
+ hoverBg: 'hover:bg-[#D44B20]',
78
+ textColor: 'text-white',
79
+ icon: `<svg class="w-5 h-5" viewBox="0 0 16 16" fill="currentColor">
80
+ <path d="M12.549 1h-4.55l1.407 4.38h4.548l-3.68 2.61 1.406 4.405c2.37-1.725 3.143-4.336 2.274-7.016L12.55 1zM2.045 5.38h4.55L8 1H3.45L2.045 5.38c-.868 2.68-.094 5.29 2.275 7.015L5.725 7.99l-3.68-2.612zm2.275 7.015L8 15l3.68-2.605L8 9.745l-3.68 2.65z"/>
81
+ </svg>`,
82
+ },
83
+ entra: {
84
+ name: 'Microsoft',
85
+ bgColor: 'bg-white',
86
+ hoverBg: 'hover:bg-gray-50',
87
+ textColor: 'text-gray-700',
88
+ border: true,
89
+ icon: `<svg class="w-5 h-5" viewBox="0 0 21 21">
90
+ <rect x="1" y="1" width="9" height="9" fill="#F25022"/>
91
+ <rect x="11" y="1" width="9" height="9" fill="#7FBA00"/>
92
+ <rect x="1" y="11" width="9" height="9" fill="#00A4EF"/>
93
+ <rect x="11" y="11" width="9" height="9" fill="#FFB900"/>
94
+ </svg>`,
95
+ },
96
+ };
97
+ ---
98
+
99
+ <!doctype html>
100
+ <html lang="en">
101
+ <head>
102
+ <meta charset="UTF-8" />
103
+ <meta name="viewport" content="width=device-width" />
104
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
105
+ <meta name="generator" content={Astro.generator} />
106
+ <title>Sign In | {title}</title>
107
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
108
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
109
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
110
+ <style>
111
+ body {
112
+ font-family: 'Inter', sans-serif;
113
+ }
114
+ .login-bg {
115
+ background-color: #fafafa;
116
+ background-image:
117
+ linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
118
+ linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
119
+ background-size: 40px 40px;
120
+ position: relative;
121
+ }
122
+ .login-bg::before {
123
+ content: '';
124
+ position: absolute;
125
+ inset: 0;
126
+ background: radial-gradient(ellipse 80% 50% at 50% 50%, transparent 0%, rgba(250, 250, 250, 0.9) 100%);
127
+ pointer-events: none;
128
+ }
129
+ .glass-card {
130
+ background: rgba(255, 255, 255, 0.98);
131
+ backdrop-filter: blur(10px);
132
+ }
133
+ @keyframes float {
134
+ 0%,
135
+ 100% {
136
+ transform: translateY(0px);
137
+ }
138
+ 50% {
139
+ transform: translateY(-10px);
140
+ }
141
+ }
142
+ .float-animation {
143
+ animation: float 6s ease-in-out infinite;
144
+ }
145
+ </style>
146
+ </head>
147
+ <body class="min-h-screen login-bg">
148
+ <div class="relative flex min-h-screen flex-col items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
149
+ {
150
+ shouldShowLogin ? (
151
+ <div class="w-full max-w-md">
152
+ {/* Logo and Title */}
153
+ <div class="text-center mb-8">
154
+ {logo && logo.src && (
155
+ <div class="inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-white shadow-lg shadow-gray-200/50 mb-6 float-animation">
156
+ <img alt={logo.alt} src={buildUrl(logo.src)} class="w-10 h-10" />
157
+ </div>
158
+ )}
159
+ <h1 class="text-3xl font-bold text-gray-900 mb-2">{title}</h1>
160
+ <p class="text-gray-600">Sign in to access your catalog</p>
161
+ </div>
162
+
163
+ {/* Login Card */}
164
+ <div class="glass-card rounded-2xl shadow-xl shadow-gray-200/50 border border-gray-200/50 overflow-hidden">
165
+ {/* Purple accent bar */}
166
+ <div class="h-1 bg-gradient-to-r from-purple-500 via-purple-600 to-indigo-600" />
167
+
168
+ <div class="p-8">
169
+ <div class="space-y-3">
170
+ {providers.map((provider) => {
171
+ const cfg = providerConfig[provider as keyof typeof providerConfig];
172
+ if (!cfg) return null;
173
+
174
+ return (
175
+ <button
176
+ data-provider={provider}
177
+ class={`provider-login-btn group relative flex w-full items-center justify-center rounded-xl px-4 py-3.5 text-sm font-medium transition-all duration-200 ${cfg.bgColor} ${cfg.hoverBg} ${cfg.textColor} hover:scale-[1.02] hover:shadow-lg active:scale-[0.98]`}
178
+ >
179
+ <span class="absolute left-4" set:html={cfg.icon} />
180
+ <span>Continue with {cfg.name}</span>
181
+ </button>
182
+ );
183
+ })}
184
+ </div>
185
+ </div>
186
+ </div>
187
+
188
+ {/* Footer links */}
189
+ <div class="mt-8 text-center">
190
+ <p class="text-sm text-gray-500">
191
+ Need a different provider?{' '}
192
+ <a
193
+ href="https://github.com/event-catalog/eventcatalog/issues"
194
+ target="_blank"
195
+ class="text-purple-600 hover:text-purple-700 font-medium hover:underline"
196
+ >
197
+ Let us know
198
+ </a>
199
+ </p>
200
+ </div>
201
+ </div>
202
+ ) : hasConfigButNoProviders ? (
203
+ <div class="w-full max-w-2xl">
204
+ {/* Logo */}
205
+ {logo && (
206
+ <div class="text-center mb-8">
207
+ <div class="inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-white shadow-lg shadow-gray-200/50 mb-4">
208
+ <img alt={logo.alt} src={logo.src} class="w-10 h-10" />
209
+ </div>
210
+ </div>
211
+ )}
212
+
213
+ <div class="glass-card rounded-2xl shadow-xl shadow-gray-200/50 border border-gray-200/50 overflow-hidden">
214
+ <div class="h-1 bg-gradient-to-r from-amber-500 via-orange-500 to-red-500" />
215
+
216
+ <div class="p-8 md:p-10">
217
+ {/* Warning Icon */}
218
+ <div class="flex justify-center mb-6">
219
+ <div class="w-16 h-16 rounded-2xl bg-amber-100 flex items-center justify-center">
220
+ <svg class="w-8 h-8 text-amber-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
221
+ <path
222
+ stroke-linecap="round"
223
+ stroke-linejoin="round"
224
+ stroke-width="2"
225
+ d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
226
+ />
227
+ </svg>
228
+ </div>
229
+ </div>
230
+
231
+ <div class="text-center mb-8">
232
+ <h2 class="text-2xl font-bold text-gray-900 mb-2">No Providers Configured</h2>
233
+ <p class="text-gray-600">Authentication is enabled but no providers are set up in your configuration file.</p>
234
+ </div>
235
+
236
+ <div class="bg-gray-50 rounded-xl p-6 mb-6">
237
+ <h3 class="text-sm font-semibold text-gray-900 uppercase tracking-wider mb-4">Setup Instructions</h3>
238
+ <ol class="space-y-3">
239
+ <li class="flex items-start gap-3">
240
+ <span class="flex-shrink-0 w-6 h-6 rounded-full bg-purple-100 text-purple-600 flex items-center justify-center text-sm font-semibold">
241
+ 1
242
+ </span>
243
+ <span class="text-sm text-gray-700">
244
+ Update your <code class="px-1.5 py-0.5 bg-gray-200 rounded text-xs font-mono">eventcatalog.auth.js</code>{' '}
245
+ file
246
+ </span>
247
+ </li>
248
+ <li class="flex items-start gap-3">
249
+ <span class="flex-shrink-0 w-6 h-6 rounded-full bg-purple-100 text-purple-600 flex items-center justify-center text-sm font-semibold">
250
+ 2
251
+ </span>
252
+ <span class="text-sm text-gray-700">Add at least one provider (GitHub, Google, Okta, etc.)</span>
253
+ </li>
254
+ <li class="flex items-start gap-3">
255
+ <span class="flex-shrink-0 w-6 h-6 rounded-full bg-purple-100 text-purple-600 flex items-center justify-center text-sm font-semibold">
256
+ 3
257
+ </span>
258
+ <span class="text-sm text-gray-700">Restart your EventCatalog server</span>
259
+ </li>
260
+ </ol>
261
+ </div>
262
+
263
+ <div class="flex flex-col sm:flex-row gap-3 justify-center">
264
+ <a
265
+ href="https://www.eventcatalog.dev/docs/development/authentication/introduction"
266
+ target="_blank"
267
+ class="inline-flex items-center justify-center gap-2 px-6 py-3 bg-gray-900 text-white rounded-xl font-medium hover:bg-gray-800 transition-all hover:scale-105"
268
+ >
269
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
270
+ <path
271
+ stroke-linecap="round"
272
+ stroke-linejoin="round"
273
+ stroke-width="2"
274
+ d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
275
+ />
276
+ </svg>
277
+ View Documentation
278
+ </a>
279
+ <a
280
+ href="/"
281
+ class="inline-flex items-center justify-center gap-2 px-6 py-3 bg-white text-gray-700 border-2 border-gray-200 rounded-xl font-medium hover:border-gray-300 hover:bg-gray-50 transition-all"
282
+ >
283
+ Go to Home
284
+ </a>
285
+ </div>
286
+ </div>
287
+ </div>
288
+ </div>
289
+ ) : (
290
+ <div class="w-full max-w-2xl">
291
+ {/* Logo */}
292
+ {logo && (
293
+ <div class="text-center mb-8">
294
+ <div class="inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-white shadow-lg shadow-gray-200/50 mb-4">
295
+ <img alt={logo.alt} src={logo.src} class="w-10 h-10" />
296
+ </div>
297
+ </div>
298
+ )}
299
+
300
+ <div class="glass-card rounded-2xl shadow-xl shadow-gray-200/50 border border-gray-200/50 overflow-hidden">
301
+ <div class="h-1 bg-gradient-to-r from-gray-400 via-gray-500 to-gray-600" />
302
+
303
+ <div class="p-8 md:p-10">
304
+ {/* Info Icon */}
305
+ <div class="flex justify-center mb-6">
306
+ <div class="w-16 h-16 rounded-2xl bg-gray-100 flex items-center justify-center">
307
+ <svg class="w-8 h-8 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
308
+ <path
309
+ stroke-linecap="round"
310
+ stroke-linejoin="round"
311
+ stroke-width="2"
312
+ d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
313
+ />
314
+ </svg>
315
+ </div>
316
+ </div>
317
+
318
+ <div class="text-center mb-8">
319
+ <h2 class="text-2xl font-bold text-gray-900 mb-2">Authentication Not Configured</h2>
320
+ <p class="text-gray-600">
321
+ {!hasAuthConfigurationFile
322
+ ? 'No authentication configuration file found.'
323
+ : 'Authentication is not properly enabled.'}
324
+ </p>
325
+ </div>
326
+
327
+ <div class="bg-gray-50 rounded-xl p-6 mb-6">
328
+ <h3 class="text-sm font-semibold text-gray-900 uppercase tracking-wider mb-4">Enable Authentication</h3>
329
+ <ol class="space-y-3">
330
+ {!hasAuthConfigurationFile && (
331
+ <li class="flex items-start gap-3">
332
+ <span class="flex-shrink-0 w-6 h-6 rounded-full bg-purple-100 text-purple-600 flex items-center justify-center text-sm font-semibold">
333
+ 1
334
+ </span>
335
+ <span class="text-sm text-gray-700">
336
+ Create <code class="px-1.5 py-0.5 bg-gray-200 rounded text-xs font-mono">eventcatalog.auth.js</code> in
337
+ your project root
338
+ </span>
339
+ </li>
340
+ )}
341
+ {!isSSR() && (
342
+ <li class="flex items-start gap-3">
343
+ <span class="flex-shrink-0 w-6 h-6 rounded-full bg-purple-100 text-purple-600 flex items-center justify-center text-sm font-semibold">
344
+ {!hasAuthConfigurationFile ? '2' : '1'}
345
+ </span>
346
+ <span class="text-sm text-gray-700">
347
+ Set <code class="px-1.5 py-0.5 bg-gray-200 rounded text-xs font-mono">output: 'server'</code> in your
348
+ config
349
+ </span>
350
+ </li>
351
+ )}
352
+ {!isAuthEnabled() && (
353
+ <li class="flex items-start gap-3">
354
+ <span class="flex-shrink-0 w-6 h-6 rounded-full bg-purple-100 text-purple-600 flex items-center justify-center text-sm font-semibold">
355
+ {!hasAuthConfigurationFile ? (!isSSR() ? '3' : '2') : !isSSR() ? '2' : '1'}
356
+ </span>
357
+ <span class="text-sm text-gray-700">
358
+ Set <code class="px-1.5 py-0.5 bg-gray-200 rounded text-xs font-mono">auth: {'{ enabled: true }'}</code>{' '}
359
+ in your config
360
+ </span>
361
+ </li>
362
+ )}
363
+ </ol>
364
+ </div>
365
+
366
+ <div class="flex flex-col sm:flex-row gap-3 justify-center">
367
+ <a
368
+ href="https://www.eventcatalog.dev/docs/development/authentication/introduction"
369
+ target="_blank"
370
+ class="inline-flex items-center justify-center gap-2 px-6 py-3 bg-gray-900 text-white rounded-xl font-medium hover:bg-gray-800 transition-all hover:scale-105"
371
+ >
372
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
373
+ <path
374
+ stroke-linecap="round"
375
+ stroke-linejoin="round"
376
+ stroke-width="2"
377
+ d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
378
+ />
379
+ </svg>
380
+ View Documentation
381
+ </a>
382
+ <a
383
+ href="/"
384
+ class="inline-flex items-center justify-center gap-2 px-6 py-3 bg-white text-gray-700 border-2 border-gray-200 rounded-xl font-medium hover:border-gray-300 hover:bg-gray-50 transition-all"
385
+ >
386
+ Go to Home
387
+ </a>
388
+ </div>
389
+ </div>
390
+ </div>
391
+ </div>
392
+ )
393
+ }
394
+
395
+ {/* Footer */}
396
+ <div class="absolute bottom-6 text-center">
397
+ <p class="text-xs text-gray-400">
398
+ Powered by <a href="https://www.eventcatalog.dev" target="_blank" class="hover:text-gray-600 transition-colors"
399
+ >EventCatalog</a
400
+ >
401
+ </p>
402
+ </div>
403
+ </div>
404
+ </body>
405
+ </html>
406
+
407
+ <script>
408
+ import { signIn } from 'auth-astro/client';
409
+
410
+ // Add event listeners to all provider login buttons
411
+ const providerButtons = document.querySelectorAll('.provider-login-btn');
412
+
413
+ providerButtons.forEach((button) => {
414
+ const provider = button.getAttribute('data-provider');
415
+ if (provider) {
416
+ let providerId = provider === 'entra' ? 'microsoft-entra-id' : provider;
417
+ button.addEventListener('click', () => signIn(providerId));
418
+ }
419
+ });
420
+ </script>
@@ -1,2 +1 @@
1
1
  export { customPagesSchema } from './custom-pages';
2
- export { chatPromptsSchema } from './chat-prompts';
@@ -9,24 +9,27 @@ const { className } = Astro.props;
9
9
  showEventCatalogBranding() && (
10
10
  <div class="flex justify-between items-center py-8 text-gray-500 text-sm font-light">
11
11
  <div class="flex space-x-5">
12
- <a href="https://github.com/event-catalog/eventcatalog" target="_blank">
12
+ <a href="https://github.com/event-catalog/eventcatalog" target="_blank" aria-label="View EventCatalog on GitHub">
13
13
  <svg
14
14
  class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
15
15
  style={`mask-image: url("${buildUrl('/icons/github.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
16
+ aria-hidden="true"
16
17
  />
17
18
  </a>
18
- <a href="https://x.com/event_catalog" target="_blank">
19
- <span class="sr-only">x</span>
19
+ <a href="https://x.com/event_catalog" target="_blank" aria-label="Follow EventCatalog on X (Twitter)">
20
+ <span class="sr-only">X (Twitter)</span>
20
21
  <svg
21
22
  class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
22
23
  style={`mask-image: url("${buildUrl('/icons/x-twitter.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
24
+ aria-hidden="true"
23
25
  />
24
26
  </a>
25
- <a href="https://www.youtube.com/@event-catalog" target="_blank">
26
- <span class="sr-only">x</span>
27
+ <a href="https://www.youtube.com/@event-catalog" target="_blank" aria-label="Watch EventCatalog on YouTube">
28
+ <span class="sr-only">YouTube</span>
27
29
  <svg
28
30
  class="w-5 h-5 bg-gray-400 hover:bg-primary dark:hover:bg-gray-400"
29
31
  style={`mask-image: url("${buildUrl('/icons/youtube.svg', true)}"); mask-repeat: no-repeat; mask-position: center center;`}
32
+ aria-hidden="true"
30
33
  />
31
34
  </a>
32
35
  </div>
@@ -160,14 +160,6 @@ const premiumFeatures = [
160
160
  current: currentPath.includes('/docs/custom'),
161
161
  isPremium: true,
162
162
  },
163
- {
164
- id: '/chat',
165
- label: 'EventCatalog Chat',
166
- icon: BotMessageSquare,
167
- href: buildUrl('/chat'),
168
- current: currentPath.includes('/chat'),
169
- isPremium: true,
170
- },
171
163
  ].filter((item) => {
172
164
  const userSideBarOption = userSideBarConfiguration.find((config: { id: string; visible: boolean }) => config.id === item.id);
173
165
  return userSideBarOption ? userSideBarOption.visible : true;
@@ -248,15 +240,19 @@ const canPageBeEmbedded = isEmbedEnabled();
248
240
  id={item.id}
249
241
  data-role="nav-item"
250
242
  href={item.href}
243
+ aria-label={item.label}
251
244
  class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${
252
245
  item.current ? 'text-white bg-gray-900' : 'hover:bg-gray-800 hover:text-white text-gray-700'
253
246
  }`}
254
247
  >
255
248
  <div class="has-tooltip">
256
- <span class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap">
249
+ <span
250
+ class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
251
+ aria-hidden="true"
252
+ >
257
253
  {item.label}
258
254
  </span>
259
- <item.icon className="h-6 w-6" />
255
+ <item.icon className="h-6 w-6" aria-hidden="true" />
260
256
  </div>
261
257
  </a>
262
258
  );
@@ -271,13 +267,17 @@ const canPageBeEmbedded = isEmbedEnabled();
271
267
  id={studioNavigationItem[0].id}
272
268
  data-role="nav-item"
273
269
  href={studioNavigationItem[0].href}
270
+ aria-label={studioNavigationItem[0].label}
274
271
  class={`p-1.5 inline-block pt-1 pb-1 mt-0 mb-0 transition-colors duration-200 rounded-lg relative ${studioNavigationItem[0].current ? 'text-white bg-gray-900' : 'hover:bg-gray-800 hover:text-white text-gray-700'}`}
275
272
  >
276
273
  <div class="has-tooltip">
277
- <span class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap">
274
+ <span
275
+ class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
276
+ aria-hidden="true"
277
+ >
278
278
  {studioNavigationItem[0].label}
279
279
  </span>
280
- <SquareDashedMousePointerIcon className="h-6 w-6" />
280
+ <SquareDashedMousePointerIcon className="h-6 w-6" aria-hidden="true" />
281
281
  </div>
282
282
  </a>
283
283
  )
@@ -291,17 +291,24 @@ const canPageBeEmbedded = isEmbedEnabled();
291
291
  id={item.id}
292
292
  data-role="nav-item"
293
293
  href={item.href}
294
+ aria-label={item.label}
294
295
  class={`p-1.5 inline-block transition-colors duration-200 rounded-lg mb-8 relative ${
295
296
  item.current ? 'text-white bg-gray-900' : 'hover:bg-gray-800 hover:text-white text-gray-700'
296
297
  }`}
297
298
  >
298
299
  <div class="has-tooltip">
299
- <span class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 flex items-center gap-1 whitespace-nowrap">
300
- <Sparkles className="h-3 w-3" /> {item.label}
300
+ <span
301
+ class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 flex items-center gap-1 whitespace-nowrap"
302
+ aria-hidden="true"
303
+ >
304
+ <Sparkles className="h-3 w-3" aria-hidden="true" /> {item.label}
301
305
  </span>
302
- <item.icon className="h-6 w-6" />
303
- <div class="absolute -top-1 -right-1 bg-gradient-to-r from-amber-400 to-amber-500 rounded-full p-0.5 shadow-lg">
304
- <Sparkles className="h-2 w-2 text-white" />
306
+ <item.icon className="h-6 w-6" aria-hidden="true" />
307
+ <div
308
+ class="absolute -top-1 -right-1 bg-gradient-to-r from-amber-400 to-amber-500 rounded-full p-0.5 shadow-lg"
309
+ aria-hidden="true"
310
+ >
311
+ <Sparkles className="h-2 w-2 text-white" aria-hidden="true" />
305
312
  </div>
306
313
  </div>
307
314
  </a>
@@ -316,13 +323,17 @@ const canPageBeEmbedded = isEmbedEnabled();
316
323
  id="/pro"
317
324
  data-role="nav-item"
318
325
  href={buildUrl('/plans')}
326
+ aria-label="Upgrade EventCatalog"
319
327
  class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${currentPath.includes('/pro') ? 'text-white bg-gray-900' : 'bg-gray-200 hover:bg-gray-800 hover:text-white text-gray-700'}`}
320
328
  >
321
329
  <div class="has-tooltip">
322
- <span class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap">
330
+ <span
331
+ class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
332
+ aria-hidden="true"
333
+ >
323
334
  Upgrade EventCatalog
324
335
  </span>
325
- <Rocket className="h-6 w-6" />
336
+ <Rocket className="h-6 w-6" aria-hidden="true" />
326
337
  </div>
327
338
  </a>
328
339
  </div>
@@ -174,7 +174,7 @@ const topTiles = [
174
174
  description: 'Business domains defined',
175
175
  href: buildUrl('/discover/domains'),
176
176
  icon: RectangleGroupIcon,
177
- bgColor: 'bg-yellow-100',
177
+ bgColor: 'bg-yellow-500',
178
178
  textColor: 'text-yellow-600',
179
179
  arrowColor: 'text-yellow-600',
180
180
  },
@@ -184,7 +184,7 @@ const topTiles = [
184
184
  description: 'Services documented in the catalog',
185
185
  href: buildUrl('/discover/services'),
186
186
  icon: ServerIcon,
187
- bgColor: 'bg-pink-100',
187
+ bgColor: 'bg-pink-500',
188
188
  textColor: 'text-pink-600',
189
189
  arrowColor: 'text-pink-600',
190
190
  },
@@ -194,7 +194,7 @@ const topTiles = [
194
194
  description: 'Messages documented in the catalog',
195
195
  href: buildUrl('/discover/events'),
196
196
  icon: ChatBubbleLeftIcon,
197
- bgColor: 'bg-blue-100',
197
+ bgColor: 'bg-blue-500',
198
198
  textColor: 'text-blue-600',
199
199
  arrowColor: 'text-blue-600',
200
200
  },
@@ -204,7 +204,7 @@ const topTiles = [
204
204
  description: 'Business flows documented',
205
205
  href: buildUrl('/discover/flows'),
206
206
  icon: Workflow,
207
- bgColor: 'bg-purple-100',
207
+ bgColor: 'bg-purple-500',
208
208
  textColor: 'text-purple-600',
209
209
  arrowColor: 'text-purple-600',
210
210
  },
@@ -304,6 +304,7 @@ const quickActions = [
304
304
  <button
305
305
  data-search-trigger
306
306
  class="group flex items-center gap-3 w-full px-4 py-3 bg-white border-2 border-gray-200 rounded-lg hover:border-blue-400 hover:shadow-md transition-all cursor-pointer"
307
+ aria-label="Search events, services, and domains"
307
308
  >
308
309
  <svg
309
310
  class="w-5 h-5 text-gray-400 group-hover:text-blue-500 transition-colors"
@@ -347,9 +348,7 @@ const quickActions = [
347
348
  <div class="absolute inset-0 bg-gradient-to-br from-gray-50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
348
349
 
349
350
  {/* Colored left border accent */}
350
- <div
351
- class={`absolute left-0 top-0 bottom-0 w-1 ${tile.bgColor} opacity-0 group-hover:opacity-100 transition-opacity duration-300`}
352
- />
351
+ <div class={`absolute left-0 top-0 bottom-0 w-1 ${tile.bgColor} transition-opacity duration-300`} />
353
352
 
354
353
  <div class="relative">
355
354
  <div class="flex items-center justify-between mb-4">
@@ -627,7 +626,7 @@ const quickActions = [
627
626
  target="_blank"
628
627
  class="group inline-flex items-center gap-2 px-5 py-2.5 bg-gray-900 text-white rounded-lg font-medium hover:bg-gray-800 transition-all shadow-sm"
629
628
  >
630
- <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
629
+ <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
631
630
  <path
632
631
  d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0a12.64 12.64 0 0 0-.617-1.25a.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.078.078 0 0 0 .084-.028a14.09 14.09 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13.107 13.107 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10.2 10.2 0 0 0 .372-.292a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127a12.299 12.299 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028a19.839 19.839 0 0 0 6.002-3.03a.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418z"
633
632
  ></path>
@@ -639,7 +638,7 @@ const quickActions = [
639
638
  target="_blank"
640
639
  class="group inline-flex items-center gap-2 px-5 py-2.5 bg-white text-gray-900 border border-gray-300 rounded-lg font-medium hover:border-gray-400 hover:bg-gray-50 transition-all"
641
640
  >
642
- <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
641
+ <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
643
642
  <path
644
643
  fill-rule="evenodd"
645
644
  d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"