How jovijesc/ecom-product-catalog-admin works
Main Components
a. API Layer (Controllers)
• CategoryController
• ProductController
• REST endpoints
• Exception handling
b. Application Layer (Use Cases)
• Category Management
• Create
• Update
• Retrieve
• List
• Product Management
• Create
• Update
• Retrieve
• List
• Product Image Management
• Upload
• Get
c. Domain Layer
• Aggregates:
• Category
• Product
• ProductImage
• Store
• Value Objects
• Domain Services
• Gateway Interfaces
d. Infrastructure Layer
• Database Access (MySQL)
• Storage Service (AWS S3)
• Gateway Implementations
• Configuration
Architecture Pattern Representation
• Outer circle: Infrastructure (REST API, MySQL, AWS S3)
• Middle circle: Application (Use Cases)
• Inner circle: Domain (Entities, Value Objects)
Component Relationships
• External clients accessing REST endpoints
• Controllers calling Use Cases
• Use Cases accessing Domain entities through Gateways
• Infrastructure implementations of Gateways
• Storage service interaction for product images
Specific Elements
a. External Systems:
• Client Applications
• MySQL Database
• AWS S3 Storage
b. Internal Components:
• REST Controllers
• Use Case implementations
• Domain Entities
• Gateway interfaces
• Repository implementations
• Storage service
Data Flow Indicators
Flow of:
• HTTP requests/responses
• Use Case commands/queries
• Database operations
• File storage operations
Additional Details
Annotations for:
• Authentication/Authorization (if present)
• Validation layers
• Error handling
• Database migrations
• Configuration properties
Separation of concerns between layers
Remember to maintain clean architecture principles in the visualization, showing how the dependencies point inward toward the domain layer, and how the infrastructure adapts to the domain rather than vice versa.
This will provide a clear understanding of the system's architecture while maintaining the appropriate level of detail for a principal software engineer to understand the complete system design.