Event Service Agent Kata

Design Documentation

โ† Back to Documentation Home

This section contains domain models, architecture patterns, and module specifications for the Event Service Agent system.


๐Ÿ“‹ Overview Documents

Core Design


๐Ÿ”ง Module Specifications

Each module follows hexagonal architecture with clear boundaries:

API Module

HTTP API layer for accepting service call requests.

Timer Module

Time-based scheduling and notifications.

Orchestration Module

Service call lifecycle orchestration.

Execution Module

External HTTP service call execution.


๐Ÿ—๏ธ Architecture Principles

All modules adhere to these constraints (enforced in code reviews):

Single Writer Principle

Only Orchestration writes to domain tables. All other modules consume via events.

No Cross-Module DB Access

Modules query only their own tables (enforced by ports).

No Synchronous Cross-Module Calls

All inter-module communication via EventBusPort (message broker).

Idempotency Everywhere

All command/event handlers must be idempotent; keyed by (tenantId, serviceCallId).

Multi-Tenancy By Default

Every query must filter by tenant_id; every message must carry tenantId.



Note: Message schemas shown in messages.md are wire format contracts for documentation. The source of truth for runtime validation is the Effect Schema implementations in each moduleโ€™s domain/ folder. See ADR-0011 for schema strategy.