How dohongkien/mall works
High-Level Components
• Backend Services:
– mall‑admin: Handles management interfaces and administrative operations.
– mall‑portal: Provides the public storefront, shopping cart, orders, and user-related functionalities.
– mall‑search: Implements product search capabilities using Elasticsearch.
– mall‑mbg: Contains the MyBatis Generator output for data access and mapping.
– mall‑common: Provides shared utilities, API response wrappers, error handling and configurations.
– mall‑security: Encapsulates authentication, authorization, and security-related cross-cutting concerns.
• Frontend/Client Applications:
– Although not part of the provided file tree, the README refers to separate front‑end projects (mall‑admin‑web and mall‑app‑web) which should be noted as clients interacting with the backend.
• Data & External Infrastructure:
– Databases: MySQL (primary datastore), Redis (caching), MongoDB (NoSQL support mentioned), etc.
– Message Queue: RabbitMQ.
– Search Engine: Elasticsearch.
– File/Object Storage: OSS/MinIO for static resources (as per configuration files).
– Log Infrastructure: ELK stack (Logstash, Kibana) for log aggregation and visualization.
– Web Server and Reverse Proxy: Nginx (with provided configuration in document/docker/nginx.conf).
– Containerization & Deployment: Docker (with Dockerfiles, docker-compose and Jenkins deployment scripts).
Depicting Component Relationships
– Add a “Data Layer” block that shows MySQL and Redis, plus optionally MongoDB and the ELK stack.
• External service interactions:
– Connect the client applications (mall‑admin‑web, mall‑app‑web) with the corresponding backend services using API calls.
• Integration points:
– mall‑mbg outputs integration with the database.
– mall‑common is used across modules.
– mall‑security applies authentication filters and JWT handling across all services.
• Containerization:
Architectural Patterns & Design Principles
• Separation of concerns – each module (administration, portal, search, security, etc.) encapsulates a distinct business functionality.
• Use of Spring Boot micro‑service principles (even if running in a monolithic style, the project is modularized) with clear boundaries.
• API design, with the separation between front‑end (client) and backend (service) through RESTful endpoints.
• The layered architecture is evident: presentation layer (clients), application/service layer (mall‑admin, mall‑portal, mall‑search), data access layer (mall‑mbg, connection to databases), and cross‑cutting security and common utilities (mall‑security, mall‑common).
• Below that, display the API gateway/reverse proxy (Nginx) receiving HTTP requests.
• To the side or bottom, include the “Data & Infrastructure” layer showing MySQL, Redis, RabbitMQ, Elasticsearch, and logging (ELK).
• Optionally, include an outer layer or overlay that indicates deployment via Docker and orchestration via Docker Compose (referencing the docker files in document/docker).