setup-events

Create a centralized event hub with typed schemas for Node/TypeScript services.

1|Updated May 21, 2025
One-click install
npx skills add https://github.com/madooei/backend-template --skill setup-events
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-events
Source: https://github.com/madooei/backend-template/tree/main/.claude/skills/setup-events
Command: npx skills add https://github.com/madooei/backend-template --skill setup-events

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide a centralized event infrastructure to coordinate service communication.

Core Features & Use Cases

  • Central event hub for decoupled service communication
  • Base service for consistent event emission
  • Typed event schemas for reliable payloads
  • Support for real-time updates via SSE patterns

Quick Start

Initialize a centralized event hub, extend a base service to emit typed events, and define an event schema to enable real-time, cross-service communication.

Frequently Asked Questions about setup-events

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up centralized event-driven communication in a Node TypeScript app?

Set up centralized event-driven communication by initializing an app-wide EventEmitter and extending a BaseService class to emit typed events. This establishes a central event hub for decoupled service communication in Node and TypeScript applications.

What is the best way to structure real-time SSE streams with typed event payloads?

The best way to structure real-time SSE streams is by enforcing a typed event schema with timestamped events and UUID-based event identifiers. This ensures reliable payload validation for cross-service notifications and real-time updates.

How does a centralized event hub coordinate cross-service notifications?

A centralized event hub coordinates cross-service notifications by exposing a shared EventEmitter instance. Services extend a base service to emit typed, timestamped events, allowing decoupled communication without direct dependencies.

Can I use a base service pattern to enforce consistent event emission across services?

Yes, you can use a base service pattern to enforce consistent event emission. The skill provides a BaseService foundation that automatically handles UUID event identification and timestamping, ensuring typed payload consistency across all services.

Do I need a typed event schema to decouple services in a real-time architecture?

Yes, a typed event schema is necessary to reliably decouple services in a real-time architecture. It enforces payload consistency, ensuring that emitted events contain predictable data structures for SSE streams and cross-service notifications.