dabydat/alpha-omega/nestjs-event-driven-architecture

Claude Code and agent skill by dabydat/alpha-omega

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Event-driven architecture for NestJS. Covers domain event publishing, event handlers, Kafka integration, and asynchronous communication patterns. Use when implementing event publishing, queue consumers, or cross-service communication.

Install

npx vskill@latest install dabydat/alpha-omega/nestjs-event-driven-architecture

SKILL.md

NestJS Event-Driven Architecture (EDA)

EDA is a communication pattern where services communicate via asynchronous events rather than synchronous calls. Events enable loose coupling, scalability, and resilience.

Why Event-Driven Architecture

See references/why-eda.md for the ❌ BAD synchronous-call example and the ✅ GOOD event-driven example.


Event Anatomy

Domain Events

See references/domain-events.md for UserCreatedEvent and MerchantAdminUserCreatedEvent.

Event Message Format

See references/domain-events.md for UserCreatedMessage.


Event Publishing

Publishing from Aggregate

See references/event-publishing.md (aggregate calls this.apply(...)).

Event Publisher Port (Hexagonal)

See references/event-publishing.md (EVENT_PUBLISHER_PORT interface).

Adapter Implementation

See references/event-publishing.md (EventPublisherAdapter).


Event Consumers

Consumer Service Pattern

See references/event-consumers.md (UserEventConsumerService).

Cross-Service Event Consumption

See references/event-consumers.md (AuthenticationEventConsumerService).


Event Handlers (CQRS Event Handlers)

@EventsHandler Pattern

See references/event-handlers.md (UserUpdatedHandler).


Topic Constants

See references/topic-constants.md (TopicConstant).

Consumer Groups

See references/topic-constants.md (KafkaGroupsConstant).


Event Flow Example

See references/event-flow.md for the user-service → Kafka → merchant-service sequence.


Retry Configuration

See references/retry-config.md.


Anti-Patterns to Avoid

See references/anti-patterns.md for the four ❌ examples (with fixes).


Summary: EDA Responsibilities

ComponentResponsibility
Domain EventRepresents domain fact
Event Publisher PortAbstraction for publishing
Event Publisher AdapterKafka implementation
Event ConsumerSubscribes to topics
Event HandlerReacts to events
Topic ConstantsTopic name single source of truth
Consumer Group ConstantsConsumer group IDs

Golden rule: Services communicate via events, not direct calls. Events are contracts — design them carefully and version them.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dabydat/alpha-omega/nestjs-event-driven-architecture/badge)](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-event-driven-architecture)

Something wrong with this skill or its page? Tell us.