A Spring-based e-commerce microservices repository with both classic and hexagonal domain implementations, Spring Cloud edge/security services, and local infrastructure orchestration for Kafka/RabbitMQ-backed event flows.
:api— defines shared API contracts, DTO transfer objects, and common exception types so all services speak the same contract language.:util— hosts shared utility classes (HTTP helpers, error handling scaffolding, logging/formatting, retry/backoff helpers) to avoid cross-service duplication.
:microservices:product-service— product master data, pricing, variants, and product metadata used by catalog/cart/checkout.:microservices:review-service— product reviews, ratings, and moderation workflows.:microservices:recommendation-service— recommendation APIs such as similar items and frequently-bought-together.:microservices:product-composite-service— facade that aggregates product, review, recommendation, and related catalog-facing data.:microservices:product-catalog-service— shopper-facing product listings, category navigation, and discovery/search-facing views.
:microservices:shopping-cart-service— user cart state, quantity management, and checkout-readiness.:microservices:order-service— order lifecycle, status transitions, cancellations, and refund orchestration.:microservices:inventory-service— stock levels, reservations, and allocations to prevent overselling.:microservices:payment-service— payment authorization/capture/reconciliation with external providers.:microservices:shipping-service— shipment creation, carrier coordination, and tracking lifecycle.
:microservices:user-service— user identities, profiles, and account metadata (business-facing user context).:microservices:notification-service— event-driven outbound notifications (email/SMS/push).:microservices:admin-service— internal administration and operational support APIs.:microservices:analytics-service— behavior and operational aggregation for dashboards/reports.
:microservices:cart-domain:shopping-cart-service— cart bounded context with explicit ports/adapters.:microservices:order-domain:order-service— order bounded context and lifecycle/state machine ownership.
:microservices:auth-domain:user-service— auth/identity concerns (auth, roles, sessions), separated from business profile concerns.
:microservices:catalog-domain:product-catalog-service— product discoverability/search/category logic as a bounded context.
:microservices:inventory-domain:inventory-service— inventory reservations, allocations, and replenishment event logic.
:microservices:payment-domain:payment-service— isolated payment domain integrations and secret-bearing flows.
:microservices:notification-domain:notification-service— reusable channel/template/delivery domain.
:microservices:review-domain:review-service— review moderation/rating/spam-defense rules.:microservices:recommendation-domain:recommendation-service— recommendation model and tuning lifecycle.
:microservices:analytics-domain:analytics-service— domain event aggregation into analytics-ready datasets.:microservices:analytics-domain:admin-service— admin APIs for operations/configuration built from analytics + core data.
:microservices:composite-domain:product-composite-service— domain facade coordinating product/review/recommendation/catalog dependencies.
:spring-cloud:gateway— edge gateway and TLS entrypoint; routing, auth passthrough, and cross-cutting policies.:spring-cloud:authorization-server— OAuth2/OIDC authorization server for token issuance and client/consent flows.
This repo supports two integration styles for local development:
- Kafka + Zookeeper
- MongoDB (e.g., product/recommendation)
- MySQL (review)
- Zipkin (tracing)
- RabbitMQ
- MongoDB
- MySQL
- Zipkin
Additional service-level storage also exists in some services (for example Postgres/Redis in specific modules via their own application configs).
Common profile patterns used in this repo:
docker— containerized runtime settings.kafka— Kafka binder/runtime profile for stream messaging.streaming_partitioned— enables partitioned stream processing.streaming_instance_0,streaming_instance_1— instance identity for partitioned consumers.
Examples from compose files:
docker,streaming_partitioned,streaming_instance_0,kafkadocker,streaming_partitioned,kafkadocker
- Java 26
- Docker + Docker Compose
./gradlew clean builddocker compose -f docker-compose-kafka.yml up -ddocker compose -f docker-compose-native.yml up -d./gradlew :microservices:inventory-service:bootRun./gradlew :util:testUse the provided script to run end-to-end API checks:
HOST=localhost PORT=8443 HEALTH_URL=https://localhost:8443 USE_K8S=false ./test-em-all.bash- Some modules represent production-style services, while others are architecture migration pilots.
- Prefer module-specific
README.mdfiles for service-specific configuration and endpoints.