How ayyoubtelmoudy/microservice-project-spring-cloud-e-commerce- works
Project Type and Purpose
• This is a full-stack microservices e-commerce platform with:
• Front-end: Angular single-page application (ecom-web-app)
• Identity & Access: Keycloak server for authentication/authorization
• API Gateway: Spring Cloud Gateway for routing and security
• Service Discovery: Eureka Discovery Service
• Microservices (Spring Boot, Maven):
– customer-service (manages customers)
– inventory-service (manages products)
– billign-service (billing, uses OpenFeign to fetch customer & product data)
– analytics-service (streams events, generates reports)
– random-orders (simulates order generation, produces events via Kafka)
• Messaging: Kafka for event streaming between services (random-orders → analytics)
• Orchestration: docker-compose.yml ties Keycloak, Eureka, Gateway, microservices, Kafka, Angular
• Purpose: Demonstrate JEE microservices, security with Keycloak, dynamic routing, OpenFeign, stream processing
File Structure Analysis
• Top-level modules correspond to each microservice and the front-end:
analytics-service, billign-service, customer-service, inventory-service, random-orders, gateway-service, eureka-discovery, keycloak, ecom-web-app
• Each microservice follows standard Spring Boot layout:
src/main/java/com/... for code, src/main/resources for properties, Dockerfile for containerization
• Gateway uses application.yml and static/dynamic route config under resources
• Eureka is a standalone Spring Boot app for service registry
• Angular front-end contains src/app modules: auth, services, components for customers, products, orders, charts
• Keycloak directory holds a local Keycloak distribution with standalone server, realms, clients, themes, providers
• docker-compose.yml orchestrates containers
README Insights
• Sequential steps illustrating:
1. Customer & Inventory microservices (REST)
2. Gateway static/dynamic routing via Eureka
3. Billing via OpenFeign
4. Angular UI for CRUD and order details
5. Keycloak realm/client/user/role setup and adapter integration in services & front-end
6. Kafka stream integration for analytics