Skip to content

Create Events Module for Internal Domain Event Bus #43

@Mkalbani

Description

@Mkalbani

Description

Build an events module that provides a lightweight internal event bus for decoupled communication between modules. Rather than sessions directly calling scoring, rewards, achievements, and notifications, they emit events that each module listens to independently. This keeps modules loosely coupled and makes it easy to add new side effects without modifying the originating module.

Acceptance Criteria

  • An events module is scaffolded at src/events/
  • NestJS EventEmitter2 is used as the underlying bus
  • Defined event types include: session.completed, score.updated, achievement.unlocked, reward.granted
  • Events carry a typed payload — no raw any objects
  • Scoring, achievements, rewards, and notifications modules subscribe to relevant events
  • Event listeners run asynchronously and do not block the emitting request
  • Unit tests cover event emission and listener invocation for each event type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions