How i-love-flamingo/flamingo-commerce works
High-Level Architecture Components
a. Interface Layer (Top)
• GraphQL API endpoints
• REST Controllers
• Template Functions
• Web Controllers
b. Application Layer (Middle)
• Services
• Event Handlers
• Cache Management
• Command Handlers
c. Domain Layer (Bottom)
• Core Business Logic
• Domain Models
• Service Ports
• Value Objects
Core Bounded Contexts
Major module as a bounded context with clear boundaries:
• Product Context
• Cart Context
• Checkout Context
• Payment Context
• Category Context
• Customer Context
• Order Context
• Search Context
• Price Context
Specific Implementation Details
Specialized components:
• Infrastructure adapters (shown at the bottom of each context)
• Event publishing/handling mechanisms
• Cache implementations
• External service integrations
Key Elements to Highlight
a. Cart Module (Central):
• Cart domain model
• Decorator pattern implementation
• Event handling system
• Cache management
b. Checkout Flow:
• State machine implementation
• Payment integration points
• Order processing pipeline
c. Product & Category:
• Product type hierarchy
• Search integration
• Category tree structure
Cross-Cutting Concerns
As vertical layers:
• W3C Data Layer
• Breadcrumbs
• Price handling
• Authentication/Authorization
Integration Points
Clearly mark:
• GraphQL endpoints
• REST API endpoints
• External service connections
• Event buses
Technical Details
Annotations for:
• Go-specific implementations
• Dingo dependency injection
• Flamingo framework integration
• GraphQL schema locations
• Clean architecture principles
• Domain-driven design patterns
• Microservice readiness
• Event-driven architecture
• Clear separation of concerns
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make Flamingo Commerce unique, such as its ports and adapters pattern and its modular approach to e-commerce functionality.