@eventcatalog/core 4.10.13 → 4.10.15

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 (164) 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-SSSN5FXC.js → chunk-7LWOCX4R.js} +1 -1
  6. package/dist/{chunk-IIECZFXN.js → chunk-A4JRWRCV.js} +1 -1
  7. package/dist/{chunk-JHUICVBT.js → chunk-HBVTU6ZP.js} +1 -1
  8. package/dist/{chunk-PADMH2RJ.js → chunk-I6HUOX4R.js} +1 -1
  9. package/dist/{chunk-34RMFKFB.js → chunk-Q2ATWE7N.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/docs/api/02-config.md +60 -6
  13. package/dist/docs/development/ask-your-architecture/02-eventcatalog-assistant/02-configuration.md +18 -11
  14. package/dist/docs/development/authentication/providers/03-setting-up-github.md +29 -0
  15. package/dist/docs/development/bring-your-own-documentation/custom-pages/02-adding-custom-docs.md +2 -2
  16. package/dist/docs/development/bring-your-own-documentation/custom-pages/03-components.md +17 -0
  17. package/dist/docs/development/components/07-resource-references.md +7 -1
  18. package/dist/docs/development/components/components/05-architecture-graph.md +65 -0
  19. package/dist/docs/development/components/components/{05-attachments.md → 06-attachments.md} +1 -1
  20. package/dist/docs/development/components/components/{06-channel-information.md → 07-channel-information.md} +1 -1
  21. package/dist/docs/development/components/components/{07-custom-properties.md → 08-custom-properties.md} +1 -1
  22. package/dist/docs/development/components/components/{08-design.md → 09-design.md} +1 -1
  23. package/dist/docs/development/components/components/{09-entitymap.md → 10-entitymap.md} +1 -1
  24. package/dist/docs/development/components/components/{10-flow.md → 11-flow.md} +1 -1
  25. package/dist/docs/development/components/components/{11-link.md → 12-link.md} +1 -1
  26. package/dist/docs/development/components/components/{12-mermaid-file-loader.md → 13-mermaid-file-loader.md} +13 -1
  27. package/dist/docs/development/components/components/{13-message-table.md → 14-message-table.md} +1 -1
  28. package/dist/docs/development/components/components/{14-nodegraph.md → 15-nodegraph.md} +1 -1
  29. package/dist/docs/development/components/components/{15-openapi.md → 16-openapi.md} +1 -1
  30. package/dist/docs/development/components/components/{16-prompt.md → 17-prompt.md} +1 -1
  31. package/dist/docs/development/components/components/{17-remote-schema.md → 18-remote-schema.md} +1 -1
  32. package/dist/docs/development/components/components/{18-resource-group-table.md → 19-resource-group-table.md} +1 -1
  33. package/dist/docs/development/components/components/{19-resource-link.md → 20-resource-link.md} +1 -1
  34. package/dist/docs/development/components/components/{20-schema.md → 21-schema.md} +1 -1
  35. package/dist/docs/development/components/components/{21-schema-viewer.md → 22-schema-viewer.md} +1 -1
  36. package/dist/docs/development/components/components/{22-steps.md → 23-steps.md} +1 -1
  37. package/dist/docs/development/components/components/{23-tabs.md → 24-tabs.md} +1 -1
  38. package/dist/docs/development/components/components/{24-tiles.md → 25-tiles.md} +1 -1
  39. package/dist/docs/development/components/components/{25-visibility.md → 26-visibility.md} +1 -1
  40. package/dist/docs/development/components/diagram-syntax/06-mermaid.md +45 -6
  41. package/dist/docs/development/customization/04-documentation-sidebar.md +3 -3
  42. package/dist/docs/development/customization/05-resource-sidebar.md +235 -0
  43. package/dist/docs/development/customization/09-embed-eventcatalog.md +179 -0
  44. package/dist/docs/development/customization/_category_.json +1 -1
  45. package/dist/docs/development/deployment/build-and-deploy.md +4 -0
  46. package/dist/docs/development/deployment/hosting-options.md +1 -1
  47. package/dist/docs/development/deployment/link-validation.md +105 -0
  48. package/dist/docs/development/developer-tools/eventcatalog-linter/00-overview.md +76 -0
  49. package/dist/docs/development/developer-tools/eventcatalog-linter/01-setup.md +144 -0
  50. package/dist/docs/development/developer-tools/eventcatalog-linter/_category_.json +10 -0
  51. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/01-configure-rules.md +130 -0
  52. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/02-run-in-ci.md +93 -0
  53. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/03-use-custom-frontmatter.md +81 -0
  54. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/04-reference-external-catalogs.md +51 -0
  55. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/05-fix-common-problems.md +120 -0
  56. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/_category_.json +12 -0
  57. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/01-cli.md +109 -0
  58. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/02-configuration.md +120 -0
  59. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/03-rules.md +287 -0
  60. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/04-versions.md +77 -0
  61. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/05-supported-resources.md +75 -0
  62. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/_category_.json +12 -0
  63. package/dist/docs/development/guides/97-architecture-graph.md +78 -0
  64. package/dist/docs/development/guides/domains/02-create-domain.md +1 -1
  65. package/dist/docs/development/guides/domains/03-ownership-and-language/02-adding-ubiquitous-language.md +29 -0
  66. package/dist/docs/development/guides/domains/09-reference.md +10 -0
  67. package/dist/docs/development/guides/resources/messages/04-message-channels/02-adding-channels.md +2 -2
  68. package/dist/docs/development/guides/resources/messages/04-message-channels/04-adding-messages-to-services.md +8 -0
  69. package/dist/docs/development/guides/resources/schemas/03-add-specifications-to-services/01-add-openapi-specifications.md +2 -2
  70. package/dist/docs/development/guides/resources/schemas/03-add-specifications-to-services/02-add-asyncapi-specifications.md +3 -3
  71. package/dist/docs/development/guides/systems/05-system-context-maps.md +2 -0
  72. package/dist/docs/development/license-keys/license-validation.md +7 -3
  73. package/dist/docs/development/license-keys/overview.md +7 -3
  74. package/dist/docs/development/upgrading/upgrading.md +3 -3
  75. package/dist/docs/development/upgrading/v2.md +3 -3
  76. package/dist/docs/federation/00-overview.md +158 -0
  77. package/dist/docs/federation/01-first-federation.md +199 -0
  78. package/dist/docs/federation/_category_.json +12 -0
  79. package/dist/docs/federation/explanation/_category_.json +12 -0
  80. package/dist/docs/federation/explanation/how-it-works.md +129 -0
  81. package/dist/docs/federation/explanation/lockfile-and-cache.md +134 -0
  82. package/dist/docs/federation/explanation/mvp-status-and-feedback.md +86 -0
  83. package/dist/docs/federation/explanation/ownership-and-references.md +134 -0
  84. package/dist/docs/federation/how-to/_category_.json +12 -0
  85. package/dist/docs/federation/how-to/configure-github-sources.md +156 -0
  86. package/dist/docs/federation/how-to/configure-validation-rules.md +127 -0
  87. package/dist/docs/federation/how-to/run-in-ci.md +138 -0
  88. package/dist/docs/federation/how-to/share-assets-and-components.md +125 -0
  89. package/dist/docs/federation/how-to/use-local-sources.md +138 -0
  90. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/00-introduction.md +11 -2
  91. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/01-installation.md +11 -3
  92. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/02-plugin-configuration.md +11 -2
  93. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/03-examples.md +11 -1
  94. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/04-configuration.md +11 -1
  95. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/05-setup-team-catalog.md +11 -2
  96. package/dist/docs/federation/legacy-federation/_category_.json +12 -0
  97. package/dist/docs/federation/reference/_category_.json +12 -0
  98. package/dist/docs/federation/reference/cli.md +122 -0
  99. package/dist/docs/federation/reference/configuration.md +192 -0
  100. package/dist/docs/federation/reference/diagnostic-rules.md +173 -0
  101. package/dist/docs/federation/reference/generated-output.md +118 -0
  102. package/dist/docs/federation/reference/supported-content.md +86 -0
  103. package/dist/docs/federation/reference/troubleshooting.md +208 -0
  104. package/dist/docs/plugins/01-intro.md +3 -3
  105. package/dist/docs/plugins/03-all-plugins.md +2 -2
  106. package/dist/docs/plugins/asyncapi/00-intro.md +4 -4
  107. package/dist/docs/plugins/asyncapi/02-plugin-configuration.md +4 -4
  108. package/dist/docs/plugins/backstage/00-overview.md +53 -0
  109. package/dist/docs/plugins/backstage/01-get-started.md +95 -0
  110. package/dist/docs/plugins/backstage/02-embed-entity-tabs.md +109 -0
  111. package/dist/docs/plugins/backstage/03-add-overview-cards.md +79 -0
  112. package/dist/docs/plugins/backstage/04-control-theme-and-size.md +54 -0
  113. package/dist/docs/plugins/backstage/05-migrate-to-annotations.md +49 -0
  114. package/dist/docs/plugins/backstage/06-configuration.md +85 -0
  115. package/dist/docs/plugins/backstage/07-components.md +129 -0
  116. package/dist/docs/plugins/backstage/08-how-embeds-work.md +52 -0
  117. package/dist/docs/plugins/backstage/_category_.json +4 -3
  118. package/dist/docs/plugins/eventbridge/00-intro.md +5 -5
  119. package/dist/docs/plugins/eventbridge/03-api.md +3 -3
  120. package/dist/docs/plugins/graphql/00-intro.md +2 -2
  121. package/dist/docs/plugins/graphql/02-plugin-configuration.md +2 -2
  122. package/dist/docs/plugins/hookdeck/01-intro.md +1 -1
  123. package/dist/docs/plugins/openapi/00-intro.md +1 -1
  124. package/dist/eventcatalog.cjs +1 -1
  125. package/dist/eventcatalog.js +5 -5
  126. package/dist/generate.cjs +1 -1
  127. package/dist/generate.js +3 -3
  128. package/dist/utils/cli-logger.cjs +1 -1
  129. package/dist/utils/cli-logger.js +2 -2
  130. package/eventcatalog/src/components/SchemaExplorer/AvroSchemaViewer.tsx +21 -19
  131. package/eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.test.tsx +114 -0
  132. package/eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.tsx +107 -86
  133. package/eventcatalog/src/components/SchemaExplorer/ProtobufSchemaViewer.test.tsx +91 -0
  134. package/eventcatalog/src/components/SchemaExplorer/ProtobufSchemaViewer.tsx +115 -33
  135. package/eventcatalog/src/components/SchemaExplorer/SchemaViewerHover.test.tsx +33 -0
  136. package/eventcatalog/src/components/SchemaExplorer/protobuf-validation.test.ts +84 -0
  137. package/eventcatalog/src/components/SchemaExplorer/protobuf-validation.ts +149 -0
  138. package/eventcatalog/src/utils/collections/glob-loader.ts +2 -2
  139. package/eventcatalog/src/utils/protobuf-schema.ts +211 -16
  140. package/package.json +8 -8
  141. package/dist/docs/cli/channels.md +0 -180
  142. package/dist/docs/cli/commands.md +0 -183
  143. package/dist/docs/cli/custom-docs.md +0 -78
  144. package/dist/docs/cli/data-products.md +0 -177
  145. package/dist/docs/cli/data-stores.md +0 -166
  146. package/dist/docs/cli/diagrams.md +0 -147
  147. package/dist/docs/cli/domains.md +0 -280
  148. package/dist/docs/cli/entities.md +0 -138
  149. package/dist/docs/cli/events.md +0 -186
  150. package/dist/docs/cli/export.md +0 -27
  151. package/dist/docs/cli/governance.md +0 -24
  152. package/dist/docs/cli/messages.md +0 -69
  153. package/dist/docs/cli/queries.md +0 -183
  154. package/dist/docs/cli/services.md +0 -266
  155. package/dist/docs/cli/snapshots.md +0 -44
  156. package/dist/docs/cli/teams.md +0 -75
  157. package/dist/docs/cli/users.md +0 -75
  158. package/dist/docs/cli/utilities.md +0 -43
  159. package/dist/docs/development/developer-tools/eventcatalog-linter.md +0 -732
  160. package/dist/docs/plugins/backstage/00-intro.md +0 -67
  161. package/dist/docs/plugins/backstage/01-installation.md +0 -242
  162. package/dist/docs/plugins/backstage/02-api.md +0 -51
  163. package/dist/docs/plugins/backstage/03-examples.md +0 -12
  164. package/dist/docs/plugins/eventcatalog-federation/_category_.json +0 -11
@@ -0,0 +1,86 @@
1
+ ---
2
+ sidebar_position: 4
3
+ sidebar_label: MVP status and feedback
4
+ title: Federation MVP status and feedback
5
+ description: Understand the current Federation release boundaries and how to share useful feedback.
6
+ ---
7
+
8
+ import EventCatalogEnterprise from '@site/src/components/MDX/EventCatalogEnterprise';
9
+
10
+ <EventCatalogEnterprise />
11
+
12
+ EventCatalog Federation is being introduced as an initial working release for feedback.
13
+
14
+ The core workflow is ready to combine real catalogs, validate ownership, and build an organization-wide view. The first release deliberately keeps source configuration and execution explicit while EventCatalog learns how teams want to operate Federation.
15
+
16
+ ## What is included
17
+
18
+ The MVP includes:
19
+
20
+ - GitHub sources
21
+ - Local filesystem sources for development
22
+ - Indexing and hydration of EventCatalog resources
23
+ - Cross-catalog relationship and version resolution
24
+ - Central catalog ownership validation
25
+ - Schemas, specifications, sidecar files, public assets, and custom components
26
+ - Configurable `off`, `warn`, and `error` diagnostic rules
27
+ - Content hashing and a verified local cache
28
+ - Stale generated-output cleanup
29
+ - Restoration of previous output after a normal failed update
30
+ - A lockfile that records completed source and managed public-file state
31
+
32
+ ## Current boundaries
33
+
34
+ The first release does not include:
35
+
36
+ - `add`, `status`, or `dry-run` source management commands
37
+ - Automatic Federation before `dev`, `build`, or `generate`
38
+ - Local source watcher integration
39
+ - A frozen mode that installs the commits recorded in `eventcatalog.lock`
40
+ - Graph diff commands
41
+ - Automatic cache pruning
42
+ - Parallel source fetching
43
+ - A command for publishing `catalog.index.json`
44
+ - Federation of top-level reusable `snippets/`
45
+
46
+ Sources are configured manually in `eventcatalog.config.js` and processed with:
47
+
48
+ ```bash
49
+ npx eventcatalog federate
50
+ ```
51
+
52
+ These constraints are intentional for the feedback release. They keep the contract small while the team observes which operational workflows matter in real organizations.
53
+
54
+ ## Useful areas for feedback
55
+
56
+ When you try Federation, consider:
57
+
58
+ - Is editing `federation.sources` directly clear enough?
59
+ - Do you prefer moving branches or immutable commits?
60
+ - Which diagnostics should block your organization catalog?
61
+ - Does local filesystem Federation give you a useful development loop?
62
+ - How often do resource, asset, or component collisions occur?
63
+ - Should Federation run manually, in CI, or automatically before builds?
64
+ - Do your teams share custom components, reusable snippets, or npm dependencies?
65
+ - How large are your catalogs and how long does a Federation run take?
66
+ - What information would you expect from future `status` or diff commands?
67
+
68
+ ## Share feedback
69
+
70
+ The most useful feedback includes:
71
+
72
+ - What you were trying to federate
73
+ - The number and approximate size of the source catalogs
74
+ - Whether the sources were GitHub or local
75
+ - What worked
76
+ - What was confusing
77
+ - The diagnostic or workflow that blocked you
78
+ - What you expected Federation to do
79
+
80
+ Share feedback in the [EventCatalog Discord](https://eventcatalog.dev/discord) or [open an issue in the EventCatalog repository](https://github.com/event-catalog/eventcatalog/issues).
81
+
82
+ ## Related guides
83
+
84
+ - [EventCatalog Federation overview](/docs/federation/overview)
85
+ - [How Federation works](/docs/federation/explanation/how-it-works)
86
+ - [Troubleshooting Federation](/docs/federation/reference/troubleshooting)
@@ -0,0 +1,134 @@
1
+ ---
2
+ sidebar_position: 2
3
+ sidebar_label: Ownership and references
4
+ title: Ownership and cross-catalog references
5
+ description: Understand how Federation assigns ownership and resolves relationships across catalog boundaries.
6
+ ---
7
+
8
+ import EventCatalogEnterprise from '@site/src/components/MDX/EventCatalogEnterprise';
9
+
10
+ <EventCatalogEnterprise />
11
+
12
+ Federation separates **owning a resource** from **referring to a resource**.
13
+
14
+ A catalog owns a resource when it contains the resource documentation. Other catalogs can use normal EventCatalog relationship pointers to refer to that ID without copying its definition.
15
+
16
+ ## One resource, one owner
17
+
18
+ Resource IDs are organization-wide in a federated view.
19
+
20
+ If Payments owns `payment-captured`, another catalog should not create a second `payment-captured` event as a placeholder. It should point to the owner's ID.
21
+
22
+ <div className="federation-mermaid">
23
+
24
+ ```mermaid
25
+ flowchart LR
26
+ ORD[Orders service] -->|receives payment-captured| EVT[payment-captured event]
27
+ PAY[Payments catalog] -->|owns documentation| EVT
28
+
29
+ classDef owner fill:#ecfdf5,stroke:#10b981,color:#064e3b
30
+ classDef consumer fill:#eef2ff,stroke:#6366f1,color:#1e1b4b
31
+ class PAY,EVT owner
32
+ class ORD consumer
33
+ ```
34
+
35
+ </div>
36
+
37
+ The same owner should document every version of an ID. Splitting version `1.0.0` and version `2.0.0` across catalogs is still multiple ownership.
38
+
39
+ ## Relationships stay in normal frontmatter
40
+
41
+ Teams keep authoring `sends`, `receives`, domain membership, flow steps, and other EventCatalog relationships as they do in a standalone catalog.
42
+
43
+ For example, an Orders service can receive an event owned by Payments:
44
+
45
+ ```yaml
46
+ ---
47
+ id: order-service
48
+ name: Order Service
49
+ version: 1.0.0
50
+ receives:
51
+ - id: payment-captured
52
+ version: 1.0.0
53
+ ---
54
+ ```
55
+
56
+ The Orders catalog does not need a local event file for `payment-captured`. When both catalogs participate in the central view, Federation connects the relationship to the Payments resource.
57
+
58
+ ## Central resources participate too
59
+
60
+ The central catalog can own local resources. Those resources are included when Federation validates ownership and resolves relationships from remote catalogs.
61
+
62
+ <div className="federation-mermaid">
63
+
64
+ ```mermaid
65
+ flowchart TB
66
+ REMOTE[Remote service] -->|referenced by| LOCAL[Central flow or domain]
67
+ LOCAL --> GRAPH[Combined ownership graph]
68
+ REMOTE --> GRAPH
69
+ ```
70
+
71
+ </div>
72
+
73
+ This allows organization-wide flows and architecture decisions to refer to team-owned services and messages without copying them into the central repository.
74
+
75
+ ## How versions resolve
76
+
77
+ Relationship pointers can select:
78
+
79
+ | Pointer | Resolution |
80
+ | --- | --- |
81
+ | No version | Highest available version |
82
+ | `latest` | Highest available version |
83
+ | Exact version such as `1.2.0` | That version only |
84
+ | Semantic range such as `^1.2.0` | Highest available version satisfying the range |
85
+
86
+ If the ID exists but the requested version cannot be selected, Federation reports `federation/unresolved-version` with the requested and available versions.
87
+
88
+ ## Missing resource and unresolved version are different
89
+
90
+ <div className="federation-mermaid">
91
+
92
+ ```mermaid
93
+ flowchart TD
94
+ P[Relationship pointer] --> ID{Does the ID exist?}
95
+ ID -->|No| M[federation/missing-resource]
96
+ ID -->|Yes| V{Does a version match?}
97
+ V -->|No| U[federation/unresolved-version]
98
+ V -->|Yes| R[Resolved relationship]
99
+ ```
100
+
101
+ </div>
102
+
103
+ - **Missing resource** means no participating catalog documents the target ID.
104
+ - **Unresolved version** means an owner exists, but it does not publish a matching version.
105
+
106
+ Both are warnings by default so organizations can onboard catalogs gradually. They can be promoted to errors with [Federation rules](/docs/federation/how-to/configure-validation-rules).
107
+
108
+ ## Ambiguous ownership blocks by default
109
+
110
+ Federation reports structural errors when:
111
+
112
+ - Several catalogs own the same resource ID
113
+ - The same ID is documented as different resource types
114
+ - A relationship expects one resource type but finds another
115
+ - Catalogs provide contradictory facets for one resource
116
+
117
+ These problems have no unambiguous organization-wide interpretation, so their rules default to `error`.
118
+
119
+ ## Ownership conventions to agree on
120
+
121
+ Before onboarding many catalogs, agree that:
122
+
123
+ - Every resource ID has one owning catalog
124
+ - The owner keeps all versions of the resource
125
+ - Consumers point to the owner rather than creating placeholders
126
+ - Shared teams and users have one source of truth
127
+ - Central documentation uses unique IDs for resources it owns
128
+ - Teams coordinate any intentionally shared asset or component paths
129
+
130
+ ## Related guides
131
+
132
+ - [Configure validation rules](/docs/federation/how-to/configure-validation-rules)
133
+ - [Diagnostic rule reference](/docs/federation/reference/diagnostic-rules)
134
+ - [Troubleshooting ownership problems](/docs/federation/reference/troubleshooting#ownership-and-type-errors)
@@ -0,0 +1,12 @@
1
+ {
2
+ "label": "How-to guides",
3
+ "position": 3,
4
+ "collapsible": true,
5
+ "collapsed": false,
6
+ "link": {
7
+ "type": "generated-index",
8
+ "slug": "federation/how-to",
9
+ "title": "Federation how-to guides",
10
+ "description": "Task-focused guides for configuring, running, and operating EventCatalog Federation."
11
+ }
12
+ }
@@ -0,0 +1,156 @@
1
+ ---
2
+ sidebar_position: 1
3
+ sidebar_label: Configure GitHub sources
4
+ title: Configure GitHub federation sources
5
+ description: Add public or private GitHub-hosted EventCatalog projects to a central catalog.
6
+ ---
7
+
8
+ import EventCatalogEnterprise from '@site/src/components/MDX/EventCatalogEnterprise';
9
+
10
+ <EventCatalogEnterprise />
11
+
12
+ Use this guide when the catalogs you want to federate are stored in GitHub repositories.
13
+
14
+ ## Prerequisites
15
+
16
+ You need:
17
+
18
+ - A central EventCatalog project
19
+ - One or more EventCatalog projects in GitHub
20
+ - Git installed on the machine running Federation
21
+ - An EventCatalog Enterprise offline license. Email [hello@eventcatalog.dev](mailto:hello@eventcatalog.dev?subject=EventCatalog%20Federation%20Trial) to request a trial key.
22
+ - A GitHub token with read access when a repository is private
23
+
24
+ ## Add a catalog at the repository root
25
+
26
+ Add the source to `federation.sources` in the central `eventcatalog.config.js`:
27
+
28
+ ```js title="eventcatalog.config.js"
29
+ export default {
30
+ federation: {
31
+ sources: [
32
+ {
33
+ id: 'acme/payments',
34
+ source: 'github:acme/payments-catalog',
35
+ },
36
+ ],
37
+ },
38
+ };
39
+ ```
40
+
41
+ The `github:` locator contains the GitHub owner and repository name. It does not contain a full URL.
42
+
43
+ ## Add a catalog from a repository subdirectory
44
+
45
+ Use `path` when the EventCatalog is not at the repository root:
46
+
47
+ ```js title="eventcatalog.config.js"
48
+ export default {
49
+ federation: {
50
+ sources: [
51
+ {
52
+ id: 'acme/payments',
53
+ source: 'github:acme/platform',
54
+ path: 'catalogs/payments',
55
+ },
56
+ ],
57
+ },
58
+ };
59
+ ```
60
+
61
+ `path` is relative to the source repository. It cannot be absolute or escape the repository.
62
+
63
+ ## Choose a branch, tag, or commit
64
+
65
+ GitHub sources use `main` by default. Set `ref` to use another branch or tag:
66
+
67
+ ```js title="eventcatalog.config.js"
68
+ {
69
+ id: 'acme/payments',
70
+ source: 'github:acme/payments-catalog',
71
+ ref: 'production',
72
+ }
73
+ ```
74
+
75
+ Use an exact commit SHA when the central build must repeatedly select the same source state:
76
+
77
+ ```js title="eventcatalog.config.js"
78
+ {
79
+ id: 'acme/payments',
80
+ source: 'github:acme/payments-catalog',
81
+ ref: '4a1b7e23c79b4ef9f5f337c5e7655a5ec82a4761',
82
+ }
83
+ ```
84
+
85
+ The lockfile records what a run resolved, but it does not pin the next run. Repeatability comes from configuring an immutable `ref`.
86
+
87
+ ## Authenticate to private repositories
88
+
89
+ Set one of these environment variables before running Federation:
90
+
91
+ ```bash
92
+ export EVENTCATALOG_GITHUB_TOKEN=your-token
93
+ ```
94
+
95
+ or:
96
+
97
+ ```bash
98
+ export GITHUB_TOKEN=your-token
99
+ ```
100
+
101
+ `EVENTCATALOG_GITHUB_TOKEN` takes precedence when both are set. The token needs read access to repository contents.
102
+
103
+ For local development, place the token in the central catalog's `.env` file:
104
+
105
+ ```dotenv title=".env"
106
+ EVENTCATALOG_GITHUB_TOKEN=your-token
107
+ ```
108
+
109
+ Do not commit the token.
110
+
111
+ ## Configure several catalogs from one repository
112
+
113
+ Give each catalog a different stable `id` and `path`:
114
+
115
+ ```js title="eventcatalog.config.js"
116
+ export default {
117
+ federation: {
118
+ sources: [
119
+ {
120
+ id: 'acme/orders',
121
+ source: 'github:acme/architecture-catalogs',
122
+ path: 'orders',
123
+ },
124
+ {
125
+ id: 'acme/payments',
126
+ source: 'github:acme/architecture-catalogs',
127
+ path: 'payments',
128
+ },
129
+ ],
130
+ },
131
+ };
132
+ ```
133
+
134
+ Source IDs must be unique within the central configuration. Keep them stable if repositories or folders move, because the IDs are used in provenance, generated paths, diagnostics, and the lockfile.
135
+
136
+ ## Run Federation
137
+
138
+ From the central catalog:
139
+
140
+ ```bash
141
+ npx eventcatalog federate
142
+ ```
143
+
144
+ If the source contains a `catalog.index.json`, Federation validates and uses it. Otherwise, Federation checks out the requested source and creates an index for the run.
145
+
146
+ Run with verbose diagnostics when you need details for every warning:
147
+
148
+ ```bash
149
+ npx eventcatalog federate --verbose
150
+ ```
151
+
152
+ ## Next steps
153
+
154
+ - [Run Federation in CI](/docs/federation/how-to/run-in-ci)
155
+ - [Use local sources during development](/docs/federation/how-to/use-local-sources)
156
+ - Review the [source configuration reference](/docs/federation/reference/configuration#sources)
@@ -0,0 +1,127 @@
1
+ ---
2
+ sidebar_position: 4
3
+ sidebar_label: Configure validation rules
4
+ title: Configure Federation validation rules
5
+ description: Change federation diagnostics to off, warn, or error for your organization.
6
+ ---
7
+
8
+ import EventCatalogEnterprise from '@site/src/components/MDX/EventCatalogEnterprise';
9
+
10
+ <EventCatalogEnterprise />
11
+
12
+ Federation rules work like lint rules. Every supported rule has one of three levels:
13
+
14
+ | Level | Behavior |
15
+ | --- | --- |
16
+ | `off` | Do not report the diagnostic |
17
+ | `warn` | Report the diagnostic and continue |
18
+ | `error` | Report the diagnostic and stop before installing new output |
19
+
20
+ Unconfigured rules keep the default levels shown below.
21
+
22
+ ## Available rules
23
+
24
+ | Rule | Default | When it appears | Typical fix |
25
+ | --- | --- | --- | --- |
26
+ | `federation/duplicate-source` | `error` | More than one catalog documents and claims ownership of the same resource ID | Choose one owning catalog and remove copied or placeholder definitions from the others |
27
+ | `federation/type-collision` | `error` | The same resource ID is documented with different types, such as an event in one catalog and a command in another | Correct the resource type or give the different resources unique IDs |
28
+ | `federation/pointer-type-mismatch` | `error` | A relationship expects one resource type, but the referenced resource is documented as another type | Correct the relationship pointer or point it to the intended resource |
29
+ | `federation/facet-disagreement` | `error` | Catalogs contribute contradictory information for the same resource facet | Choose an authoritative source and align or remove the conflicting contribution |
30
+ | `federation/asset-collision` | `warn` | Remote catalogs publish different files to the same `public/` or `components/` path | Namespace the paths, make the files identical, or deliberately accept the last configured source as the winner |
31
+ | `federation/missing-resource` | `warn` | A relationship references a resource ID that no participating catalog documents | Add the owning catalog, document the missing resource, or correct the referenced ID |
32
+ | `federation/unresolved-version` | `warn` | The referenced resource exists, but none of its available versions satisfy the requested version or range | Reference an available version or publish a version that satisfies the request |
33
+
34
+ Rules that default to `error` protect the catalog from ambiguous ownership or resource types. Rules that default to `warn` allow teams to onboard catalogs incrementally while keeping incomplete relationships and asset collisions visible.
35
+
36
+ For the diagnostic messages and output attributes associated with each rule, see the [diagnostic rule reference](/docs/federation/reference/diagnostic-rules).
37
+
38
+ ## Add rule overrides
39
+
40
+ Add `rules` beside `sources`:
41
+
42
+ ```js title="eventcatalog.config.js"
43
+ export default {
44
+ federation: {
45
+ rules: {
46
+ 'federation/missing-resource': 'error',
47
+ 'federation/unresolved-version': 'error',
48
+ 'federation/asset-collision': 'off',
49
+ },
50
+ sources: [
51
+ // ...
52
+ ],
53
+ },
54
+ };
55
+ ```
56
+
57
+ ## Make unresolved references block a build
58
+
59
+ Missing IDs and unavailable versions are warnings by default because organizations often introduce catalogs gradually.
60
+
61
+ Use errors when every relationship in the organization view must resolve:
62
+
63
+ ```js title="eventcatalog.config.js"
64
+ rules: {
65
+ 'federation/missing-resource': 'error',
66
+ 'federation/unresolved-version': 'error',
67
+ }
68
+ ```
69
+
70
+ This is useful in CI after all expected owning catalogs have been onboarded.
71
+
72
+ ## Keep asset collisions visible
73
+
74
+ Asset collisions use `warn` by default. The last configured remote source wins when remote sources publish different content to the same path.
75
+
76
+ Keep this warning enabled unless the collision is deliberate and reviewed:
77
+
78
+ ```js title="eventcatalog.config.js"
79
+ rules: {
80
+ 'federation/asset-collision': 'warn',
81
+ }
82
+ ```
83
+
84
+ The diagnostic identifies the asset path, all contributing sources, and the winning source.
85
+
86
+ ## Be careful with structural rules
87
+
88
+ These rules default to `error` because continuing can produce an ambiguous organization model:
89
+
90
+ - `federation/duplicate-source`
91
+ - `federation/type-collision`
92
+ - `federation/pointer-type-mismatch`
93
+ - `federation/facet-disagreement`
94
+
95
+ :::warning Changing ownership errors
96
+
97
+ Changing a structural rule to `warn` or `off` allows Federation to continue with ambiguity that would normally block the update. Prefer fixing the ownership boundary, resource type, or relationship pointer.
98
+
99
+ Use lower levels temporarily only when you understand how the resulting catalog will be interpreted.
100
+
101
+ :::
102
+
103
+ ## Review warning details
104
+
105
+ Run with `--verbose`:
106
+
107
+ ```bash
108
+ npx eventcatalog federate --verbose
109
+ ```
110
+
111
+ Warnings are grouped with their rule ID and attributes. Errors always show details, even without verbose output.
112
+
113
+ ## Validate the configuration
114
+
115
+ Federation rejects unknown rule IDs and invalid levels. For example, `fatal` is not a valid level.
116
+
117
+ Run Federation after editing the rules:
118
+
119
+ ```bash
120
+ npx eventcatalog federate
121
+ ```
122
+
123
+ ## Next steps
124
+
125
+ - Look up every [diagnostic rule](/docs/federation/reference/diagnostic-rules)
126
+ - [Resolve common Federation problems](/docs/federation/reference/troubleshooting)
127
+ - [Understand ownership and cross-catalog references](/docs/federation/explanation/ownership-and-references)
@@ -0,0 +1,138 @@
1
+ ---
2
+ sidebar_position: 3
3
+ sidebar_label: Run in CI
4
+ title: Run EventCatalog Federation in CI
5
+ description: Fetch and validate federated catalogs before building the organization catalog in CI.
6
+ ---
7
+
8
+ import EventCatalogEnterprise from '@site/src/components/MDX/EventCatalogEnterprise';
9
+
10
+ <EventCatalogEnterprise />
11
+
12
+ Run Federation before the normal EventCatalog build so the generated organization view exists when EventCatalog renders the site.
13
+
14
+ ## Add explicit scripts
15
+
16
+ Add separate and combined scripts to the central catalog:
17
+
18
+ ```json title="package.json"
19
+ {
20
+ "scripts": {
21
+ "federate": "eventcatalog federate",
22
+ "build": "eventcatalog build",
23
+ "build:federated": "npm run federate && npm run build"
24
+ }
25
+ }
26
+ ```
27
+
28
+ Keeping `federate` and `build` separate makes it clear which stage failed. The combined script is useful for deployment platforms that accept one build command.
29
+
30
+ ## Provide your Enterprise license and repository tokens
31
+
32
+ Federation requires an EventCatalog Enterprise offline license. Email [hello@eventcatalog.dev](mailto:hello@eventcatalog.dev?subject=EventCatalog%20Federation%20Trial) to request a trial key.
33
+
34
+ The simplest option is to commit `license.jwt` in the central catalog root. Federation will find it automatically when CI runs. If your organization prefers not to commit the file, store its contents in your CI provider and write `license.jwt` during the job. Set `EC_LICENSE` only when you write the file somewhere other than the catalog root.
35
+
36
+ Provide these environment variables when needed:
37
+
38
+ | Variable | When it is needed |
39
+ | --- | --- |
40
+ | `EC_LICENSE` | Optional path to the Enterprise offline license file when it is not stored at `./license.jwt` |
41
+ | `EVENTCATALOG_GITHUB_TOKEN` | Recommended for private GitHub sources |
42
+ | `GITHUB_TOKEN` | Used as a fallback when `EVENTCATALOG_GITHUB_TOKEN` is not set |
43
+
44
+ GitHub tokens need read access to the configured repositories. Store those tokens in your CI provider's secret store rather than in `eventcatalog.config.js`.
45
+
46
+ ## Run the pipeline
47
+
48
+ The CI sequence is:
49
+
50
+ ```bash
51
+ npm ci
52
+ npm run federate
53
+ npm run build
54
+ ```
55
+
56
+ or:
57
+
58
+ ```bash
59
+ npm ci
60
+ npm run build:federated
61
+ ```
62
+
63
+ <div className="federation-mermaid">
64
+
65
+ ```mermaid
66
+ flowchart LR
67
+ A[Install dependencies] --> B[Federate sources]
68
+ B --> C{Errors?}
69
+ C -->|Yes| D[Stop the pipeline]
70
+ C -->|No| E[Build EventCatalog]
71
+ E --> F[Deploy organization catalog]
72
+ ```
73
+
74
+ </div>
75
+
76
+ ## Choose moving or immutable refs
77
+
78
+ A branch such as `main` makes CI pick up new source commits whenever Federation runs. This is useful when the organization catalog should continuously follow each team.
79
+
80
+ An exact commit SHA makes the configured source repeatable:
81
+
82
+ ```js title="eventcatalog.config.js"
83
+ {
84
+ id: 'acme/payments',
85
+ source: 'github:acme/payments-catalog',
86
+ ref: '4a1b7e23c79b4ef9f5f337c5e7655a5ec82a4761',
87
+ }
88
+ ```
89
+
90
+ `eventcatalog.lock` records the source state selected by a completed run, but it does not control the next run. Use immutable `ref` values when repeatability is required.
91
+
92
+ ## Decide which warnings should block CI
93
+
94
+ Promote important warning rules to `error` in the central configuration:
95
+
96
+ ```js title="eventcatalog.config.js"
97
+ export default {
98
+ federation: {
99
+ rules: {
100
+ 'federation/missing-resource': 'error',
101
+ 'federation/unresolved-version': 'error',
102
+ },
103
+ sources: [/* ... */],
104
+ },
105
+ };
106
+ ```
107
+
108
+ This makes the federation command return an error before installing new output when a configured rule is violated.
109
+
110
+ Review [Configure validation rules](/docs/federation/how-to/configure-validation-rules) before changing structural errors to warnings.
111
+
112
+ ## Cache downloaded content
113
+
114
+ Federation stores verified content in `.eventcatalog-cache/federation/content/`. Persisting `.eventcatalog-cache` with your CI cache can reduce repeated downloads.
115
+
116
+ Treat the cache as disposable. Federation checks content hashes before reuse and downloads content again when a valid entry is unavailable.
117
+
118
+ Use `--no-cache` when investigating a cache problem:
119
+
120
+ ```bash
121
+ npm run federate -- --no-cache
122
+ ```
123
+
124
+ ## Preserve useful failure output
125
+
126
+ Errors always include their details. Warning details require `--verbose`:
127
+
128
+ ```bash
129
+ npm run federate -- --verbose
130
+ ```
131
+
132
+ Consider using verbose output in CI while Federation is being introduced, then switch back to the concise output if the logs become noisy.
133
+
134
+ ## Next steps
135
+
136
+ - [Configure GitHub sources](/docs/federation/how-to/configure-github-sources)
137
+ - [Configure validation rules](/docs/federation/how-to/configure-validation-rules)
138
+ - [Understand the lockfile and cache](/docs/federation/explanation/lockfile-and-cache)