How leowmjw/go-event-driven works
Main Components
a) Core Bounded Contexts (Services):
• Customers Service (internal/customers)
• Ordering Service (internal/ordering)
• Analytics Service (internal/analytics)
b) Infrastructure Components:
• MongoDB (indicated by mongodb directory)
• Temporal (workflow engine, indicated by temporal directory)
• Bento (configuration and projections system)
Service Layer
• Internal components for each service:
• Customers: Repository, Forwarder, Types
• Ordering: Workflow, Activities, Service
• Analytics: Analytics components
Infrastructure Layer
• MongoDB database
• Temporal workflow engine
• Bento projections system
Event Flow Layer
• Event buses/channels between services
• Workflow orchestration paths
Specific Instructions:
Use these symbols
• Rectangles with rounded corners for bounded contexts
• Hexagons for external services (Temporal)
Component Relationships
• Event flow from Customers to other services
• Projection paths from services to Bento
• Database connections to MongoDB
Details
• Async workflows in the Ordering service
• Event forwarding paths in the Customer service
• Analytics data flow
Key Architectural Patterns to Highlight:
Event-Driven Architecture
• Event publication/subscription patterns
• Event flow directions
CQRS Pattern (if used)
• Separation of command and query responsibilities
• How projections are used
Workflow Orchestration
• Temporal's role in managing workflows
• Activity execution paths
Level of Detail Guidelines:
• High Level: Show bounded contexts and their interactions
• Medium Level: Include internal service components
• Low Level: Add configuration and deployment details
Additional Notes:
• Annotations for key architectural decisions
• Configuration flow from Bento to services
• Where tests exist (based on _test.go files)