event-catalog / event-catalog/eventcatalog

RFC: Actions - Executable buttons in your documentation

Open
#2,016 1 comment 0 reactions 0 assignees View on GitHub
core
Dominant language
TypeScript
Stars
2.9k
Forks
277
Avg merge
4h 6m
Merged PRs (30d)
81

Description

# RFC: Actions

> Run backend functions directly from your documentation pages.

## What is it?

Actions let you add executable buttons to your EventCatalog pages. Click a button, run code on your server.

```mdx

```

## How does it help?

Instead of switching between your catalog and other tools, you can:

- **Send test events** to Kafka, RabbitMQ, or any broker
- **Validate schemas** against your registry
- **Generate code** (TypeScript types, consumers, producers)
- **Trigger pipelines** for deployments
- **Notify teams** via Slack, email, etc.
- **Run health checks** on producers/consumers

Your documentation becomes operational.

## How does it work?

**1. Define actions** in \`eventcatalog.actions.js\`:

```javascript
export const actions = {
sendTestEvent: {
label: 'Send Test Event',
description: 'Publish a sample event to your broker',
icon: 'paper-airplane',
execute: async ({ context }) => {
// context has: resourceId, resourceVersion, resourceType, pageUrl
await kafka.send({ topic: context.resourceId, messages: [...] });

return {
success: true,
message: 'Event sent!',
data: { topic: context.resourceId, timestamp: new Date() }
};
},
},
};

// Control visibility per collection
export const visibility = {
sendTestEvent: { collections: ['events', 'commands'] },
};
```

**2. Add to any page**:

```mdx

```

**3. Click and run** - results appear in a console panel.

## What does it look like?

### Trigger button on page

_This would probably change_

Image

### Actions Console

Image

### Request/Response view

Image

---

**Requirements:**
- SSR mode enabled

Contributor guide

No contributing guide indexed for this repository

Research direction

No implementation files or tests are named. Start by reviewing the RFC examples and the SSR requirement, then trace how MDX pages and server-side functions are handled. Done would require defining configured actions, rendering the ActionsConsole on documentation pages, executing backend functions, and displaying results.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.