How ignorancio/backend-java-store works
• API Gateway/Entry Point: Represent the Spring Boot application (StoreApplication) that serves as the entry point.
• Modules (each as their own bounded context):
• Authentication: Includes AuthController and AuthService, handling JWT-based authentication and registration.
• Products: With ProductController, ProductServiceImpl, and distinct handling of caching via Redis.
• Categories: Contains controllers, service interfaces and implementations, and mappers.
• Orders: With order controllers, services, and domain entities representing order details.
• Search: Incorporates integration with Elasticsearch for product searches.
• Users: Manages user accounts, roles, and related operations.
• Shared/Configuration Components:
• Security Configurations: Including JwtService, SecurityConfig, and related filters (JwtAuthFilter).
• Global Exception Handling: ControllerAdvice and ErrorResponse.
• OpenAPI/Swagger Config: For API documentation.
• External Dependencies:
• Database: Postgres for data storage.
• Cache: Redis for caching products.
• Search Engine: Elasticsearch for search functionality.
• Docker/Docker Compose: For containerization and deployment.
Data Flows and Interactions
• From the controller layers, show interactions with the service (application) layer.
• The service layers should then call domain logic and use ports (or interfaces) for persistence, triggering repositories in the infrastructure layer.
• External calls are represented where repositories interact with Postgres for CRUD operations, Redis for caching, or Elasticsearch for search capabilities.
• Lines representing calls from security filters (JwtAuthFilter) to JwtService and related configurations in SecurityConfig.
Important Architectural Patterns and Technologies
• Hexagonal architecture by grouping the internal business logic (domain+application) inside a “core hexagon” with ports pointing to different adapters.
• Mention design patterns deployed (like dependency inversion, separation of concerns, and possibly adapter or mapper patterns where conversion between entities and DTOs happens).
Additional Recommended Elements
• Interactions via filters (JwtAuthFilter) and indicate the role of OpenAPI/Swagger in API documentation.