Integration Handbook Epic

User Journey

The Integration bounded context provides the messaging infrastructure and API patterns for SEA™ Forge services to communicate reliably. It implements NATS/JetStream for event streaming, outbox/inbox pattern for transactional messaging, API patterns for REST endpoints, and runbooks for debugging, DLQ processing, and troubleshooting.

Jobs to be Done & EARS Requirements

Job: Start NATS Infrastructure

User Story: As a platform engineer, I want to start NATS and PostgreSQL for messaging, so that services have reliable communication infrastructure.

EARS Requirement:


Job: Initialize JetStream Stream

User Story: As a messaging architect, I want to create a NATS JetStream stream with retention policies, so that events are durably stored and replayable.

EARS Requirement:


Job: Run Database Migrations

User Story: As a database administrator, I want to create outbox and inbox tables, so that transactional messaging is enabled.

EARS Requirement:


Job: Publish Outbox Event

User Story: As a service developer, I want to write domain events to the outbox within the same transaction as state changes, so that messaging is reliable.

EARS Requirement:


Job: Process Inbox Message

User Story: As a service developer, I want to receive events from the inbox with idempotency, so that messages are processed exactly once.

EARS Requirement:


Job: Route to Dead Letter Queue

User Story: As a system operator, I want failed messages to route to DLQ after retry exhaustion, so that they can be analyzed and replayed.

EARS Requirement:


Job: Replay Dead Letter Messages

User Story: As a system operator, I want to replay messages from DLQ after fixing issues, so that I can recover from transient failures.

EARS Requirement:


Job: Design REST API Endpoints

User Story: As an API designer, I want to follow SEA™ API patterns for consistent REST endpoints, so that services integrate seamlessly.

EARS Requirement:


Job: Debug API Integration Issues

User Story: As a developer, I want to diagnose API integration problems using runbooks, so that I can resolve issues quickly.

EARS Requirement:


Domain Entities Summary

Root Aggregates

Value Objects

Policy Rules

Integration Points

Success Metrics

Non-Functional Requirements