@eventcatalog/editor
v0.1.2
Published
Rich editor for EventCatalog resources.
Readme
@eventcatalog/editor
A local-first rich editor for EventCatalog resources. Run it from a catalog, pass a catalog path, or open the editor and mount one from the UI.
Usage
npx @eventcatalog/editorThe editor opens http://localhost:3900 in your browser. Startup uses this order:
- Use
--catalog <path>when provided. - Use the current directory when it contains
eventcatalog.config.js. - Use the first immediate child directory that contains
eventcatalog.config.js, ignoring.eventcatalog-core. - Show a catalog path screen when no catalog can be found.
Flags
--catalog <path>— EventCatalog root to edit; omit it to use the current directory or choose a catalog in the UI--port <n>— port to listen on (default: 3900)--no-open— do not open the browser--help,-h— show help--version,-v— show version
Requirements
- Node 22+
- An EventCatalog directory containing an
eventcatalog.config.js
What works today (0.1.0)
- Browse every resource type (services, domains, events, commands, queries, channels, entities, flows, users, teams).
- Edit markdown bodies in a rich Tiptap editor.
- Edit simple frontmatter fields (strings, string arrays).
- Full-text search across names, summaries, bodies, and frontmatter (MiniSearch, prefix + fuzzy).
- Delete resources (with confirmation).
- Last-write-wins conflict detection via mtime (returns 409 on stale save).
- MDX components round-trip verbatim as opaque blocks.
What's coming
See ROADMAP.md.
Architecture
Two seams make the editor data-source-agnostic:
CatalogStoreinterface on the server — v1 ships aLocalSdkStoreadapter that wraps@eventcatalog/sdk. Future adapters (GitHub, DB, remote API) slot in without touching UI or routes./api/resources/:type/:id[/:version]HTTP contract — resource-oriented, keyed by{ type, id, version }, never by file path. UI talks only to this contract.
Development
npm install
npm run dev # server on :3900 mounted to /Users/dboyne/Dev/eventcatalog/tmp/my-catalog + Vite on :5173
npm test
npm run build # UI build + server bundleLicense
MIT
