Loading...
Loading...
Builds custom pages and API routes inside an EventCatalog project (Scale plan feature). Creates Astro pages and TypeScript endpoints in the catalog's pages/ folder using the stable @catalog/layouts and @catalog/utils toolkit, wires them into the navigation, and sets up editor support. Use when user asks to "add a custom page to my catalog", "build a team page", "add an API endpoint to EventCatalog", "create a custom homepage", "add a custom route", "query catalog data from my own page", or "extend EventCatalog with my own pages".
npx skill4agent add event-catalog/skills custom-pages-and-apispages//custompages/api/EVENTCATALOG_SCALE_LICENSE_KEY.envCustom pages require the Scale plan@eventcatalog/corepackage.json.astropages/api/output: "server"eventcatalog.config.jseventcatalog.config.jspages/pages/homepage.astro/pages.prefixeventcatalog.config.jscustomoutput: "static""server"components/@catalog/components/*| User wants | File to create | URL |
|---|---|---|
| A content/dashboard page | | |
| A custom homepage | | |
| A section with an index | | |
| A dynamic page | | |
| A JSON API endpoint | | |
| A dynamic API endpoint | | |
| Shared partials/components | | never routed (underscore prefix) |
@catalog/layouts/Layout.astrotitledescription?sidebar?trueshowHeader?true@catalog/utilsgetDomainsgetServicesgetSystemsgetEventsgetCommandsgetQueriesgetFlowsgetChannelsgetEntitiesgetAgentsgetContainersgetDataProductsgetAdrsgetTeamsgetUsersgetItemsFromCollectionByIdAndSemverOrLatest{ getAllVersions: false }@catalog/components/*components/---
import Layout from '@catalog/layouts/Layout.astro';
import { getServices } from '@catalog/utils';
const services = await getServices({ getAllVersions: false });
---
<Layout title="Service Report" description="All services in our architecture" sidebar={false}>
<div class="max-w-4xl mx-auto p-8">
<h1 class="text-2xl font-bold text-[rgb(var(--ec-page-text))]">Services ({services.length})</h1>
<ul>
{services.map((service) => (
<li>
<a href={`/docs/services/${service.data.id}/${service.data.version}`}>{service.data.name}</a>
</li>
))}
</ul>
</div>
</Layout>text-[rgb(var(--ec-page-text))]bg-[rgb(var(--ec-page-bg))]border-[rgb(var(--ec-page-border))]bg-[rgb(var(--ec-card-bg))]text-[rgb(var(--ec-accent))]dark:entry.dataentry.data.identry.data.nameentry.data.versionentry.data.summary{id}-{version}/docs/{collection}/{id}/{version}/docs/services/OrderService/1.0.0pages/_components/@components/*@utils/*@layouts/*@catalog/*navigation.groupseventcatalog.config.jsgroupsnavigation: {
groups: [
{ id: 'main', items: [{ id: 'home' }, { id: 'docs' }] },
{ id: 'browse', label: 'Browse', items: [{ id: 'catalog' }, { id: 'schemas' }] },
{
id: 'my-pages',
label: 'My Company',
items: [
{ id: 'reports', label: 'Reports', href: '/custom/reports', icon: 'ChartBar' },
{ id: 'team', label: 'Our Team', href: '/custom/team', icon: 'UsersRound' },
],
},
{ id: 'settings-group', position: 'bottom', items: [{ id: 'settings' }] },
],
}homedocscatalogschemasschema-insightsteamsuserssettingsstudiohreficonWorkflowGithubChartBarmatchmatch: ['/custom/reports', '/custom/reports/**']navigation.groupstsconfig.json@catalog/*tsconfig.json.eventcatalog-core{
// Editor support (IntelliSense, go-to-definition) for custom pages.
// These aliases mirror the ones the EventCatalog build provides at runtime.
"compilerOptions": {
"baseUrl": ".",
"allowJs": true,
"jsx": "preserve",
"paths": {
"@catalog/components/*": ["components/*"],
"@catalog/layouts/*": [".eventcatalog-core/src/toolkit/layouts/*"],
"@catalog/utils": [".eventcatalog-core/src/toolkit/utils/index.ts"],
"@catalog/utils/*": [".eventcatalog-core/src/toolkit/utils/*"]
}
},
"include": ["pages/**/*", "components/**/*"]
}.eventcatalog-corenpm run devnpm run devpages/http://localhost:3000/custom/reports.astro.ts.js.mjs| Symptom | Cause |
|---|---|
All custom pages 404, warning | No/invalid Scale license — routes are not injected without it. A free 30-day trial key is available at eventcatalog.cloud |
Build fails: API routes require | |
| Page 404s but others work | Underscore-prefixed path segment, non-routable extension, or wrong prefix |
| Missing catalog-level |
Config error: | Prefix collides with a core route — see reserved list in references/routing.md |
Homepage unchanged after adding | Requires Scale license; also note homepage is served at |
@catalog/layouts@catalog/utils@catalog/components