How 2227324689/gpmall works
Project Type and Purpose
• This is a full-stack, microservices-based e-commerce platform (“Gpmall”) with a Vue.js front end and multiple Spring Boot/Dubbo back-end services.
• The front end (gpmall-front) serves UI pages and proxies REST calls to BFF (Backend For Frontend) modules. Those BFF modules in turn consume Dubbo services for shopping, user, order, payment, search, comment, coupon, market, etc.
High-Level Components
a. Front End (Vue.js)
• gpmall-front (ports via webpack dev server)
b. BFF / API Gateways (Spring Boot web modules)
• gpmall-shopping (8081)
• gpmall-user (8082)
• gpmall-cashier (8083)
c. Core Microservices (Dubbo providers + API interface modules)
• shopping-service (20881)
• user-service (20880)
• order-services (20882)
• pay-service (20883)
• market-service (20884)
• comment-service (20885)
• coupon-service (uses Dubbo)
• search-service (builds/queries Elasticsearch)
d. Shared Libraries
• gpmall-commons (core utilities, locking, MQ, email, etc.)
• parent POM for version management
e. Infrastructure / Middleware
• Zookeeper (Dubbo registry)
• MySQL (each service persistence)
• Redis (caching/session)
• Kafka (async messaging, e.g. order cancellation, registration)
• Elasticsearch (product search)
• Druid (DB connection pool & monitoring)
• Docker-Compose orchestrates services
Relationships and Data Flows
• User’s browser → HTTP(S) to gpmall-front (port 8080)
• Front end proxies REST calls → BFF modules (8081–8083)
• BFF modules act as Dubbo consumers → invoke remote service APIs (RPC)
• Each Dubbo provider registers with Zookeeper → receives RPC calls
• Providers perform business logic → interact with MySQL (via MyBatis + generated mappers)
• Providers leverage Redis for caching and Kafka for events
• The search service synchronizes data to Elasticsearch for product search
Architectural Patterns & Design Principles
• Microservices: Each bounded context is a separate deployable unit
• API-Gateway/BFF: Web modules tailor service calls for UI use cases
• Service Registry & Discovery: Dubbo + Zookeeper
• Event-Driven: Kafka for decoupled asynchronous flows (e.g. email callbacks)
• Domain-Driven layering: API interfaces, dto conversions, persistence, service implementations
• Pipeline/Saga: Order service composes business steps via handler pipeline
Essential Elements to Capture
• All BFF modules and their REST endpoints
• Each Dubbo service (API + Provider) with registry to Zookeeper
• Persistence layer per service (MyBatis mappers → MySQL)
• Caching (Redis) and search index (Elasticsearch)
• Asynchronous flows via Kafka (order cancellation, registration mail)
• Shared utility layers (commons-core, commons-mq, commons-lock, commons-tool)