Full-stack e-commerce platform demonstrating monolithic to microservices migration
Ecomera is a full-stack e-commerce platform that demonstrates the complete journey from monolithic architecture to microservices. This project showcases both architectural approaches: the original monolithic application and its decomposed microservices implementation, providing a comprehensive view of service-oriented architecture evolution.
- Demonstrate monolithic to microservices migration strategy
- Implement complete microservices infrastructure with service discovery and configuration management
- Build production-ready distributed system with independent, scalable services
- Showcase enterprise patterns: API Gateway, distributed caching, CI/CD, and containerization
- ecomera-backend - Original monolithic Spring Boot application
- Complete e-commerce business logic (Authentication, Products, Orders, Payments, Cart)
- Serves as reference architecture and comparison point
- Demonstrates well-structured modular monolith with clear domain boundaries
-
ecomera-auth-service - Authentication & Authorization microservice
- User registration, login, and JWT token management
- Secure authentication endpoints
-
ecomera-product-service - Product Catalog microservice
- Product CRUD operations
- Category management
- Inventory tracking
-
ecomera-order-service - Order Management microservice
- Order creation and processing
- Order history and tracking
- Order item management
-
ecomera-payment-service - Payment Processing microservice
- Payment transaction handling
- Payment method management
- Transaction history
-
ecomera-cart-service - Shopping Cart microservice
- Cart creation and management
- Cart item operations
- Session-based cart handling
-
ecomera-notification-service - Notification microservice
- Event-driven notifications via Apache Kafka
- Email notification delivery
- MongoDB for notification history storage
-
ecomera-api-gateway - Spring Cloud Gateway
- Unified entry point for all microservices
- Request routing and load balancing
- Cross-cutting concerns (logging, security)
-
ecomera-eureka-service-registry - Service Discovery
- Dynamic service registration and discovery
- Health monitoring and failover
- Load balancing support
-
ecomera-config-server - Configuration Management
- Centralized configuration for all microservices
- HashiCorp Vault integration for secrets
- Environment-specific properties
-
ecomera-api-config - Configuration Repository
- Git-based configuration storage
- Service-specific configuration files
- ecomera-keycloak - Identity Provider
- Centralized authentication and authorization
- OAuth2 / OpenID Connect support
- User federation and role-based access control
- ecomera-frontend - Angular application
- Angular Material UI components
- TypeScript with reactive programming
- Communicates with microservices via API Gateway
- Karma-Jasmine testing
- Tailwind CSS styling
- Java - Core programming language
- Spring Boot - Microservice framework
- Spring Cloud - Microservices ecosystem (Eureka, Config Server, Gateway)
- Maven - Build automation and dependency management
- Redis - Distributed caching layer
- JUnit & Mockito - Testing framework
- Keycloak - Identity and access management (OAuth2 / OIDC)
- HashiCorp Vault - Secrets management
- JWT - Token-based authentication
- Apache Kafka - Event-driven messaging and notification streaming
- MongoDB - Document database for notification history
- PostgreSQL - Relational database for core business data
- Angular - Frontend framework
- Angular Material - UI component library
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Karma & Jasmine - Testing tools
- Docker - Containerization for all services
- GitHub Actions - CI/CD automation
- SonarQube - Code quality and static analysis
- HashiCorp Vault - Secrets management
- Eureka - Service discovery and registration
The platform implements a fully distributed microservices architecture:
┌─────────────────┐
│ Angular UI │
└────────┬────────┘
│
┌────────▼────────┐
│ API Gateway │
│ (Port: 8080) │
└────────┬────────┘
│
┌──────────────────┼─────────────────┐
│ │ │
┌─────▼─────┐ ┌──────▼─────┐ ┌─────▼─────┐
│ Auth │ │ Product │ │ Order │
│ Service │ │ Service │ │ Service │
└─────┬─────┘ └─────┬──────┘ └─────┬─────┘
│ │ │
│ ┌───────▼─────────┐ │
│ │ Payment │ │
└─────────┤ Service ├───────┘
└────────┬────────┘
│
┌────────▼────────┐
│ Cart │
│ Service │
└────────┬────────┘
│
┌────────▼────────┐
│ Notification │
│ Service │
└────────┬────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌─────▼──────┐ ┌──────▼─────┐ ┌──────▼─────┐
│ Kafka │ │ MongoDB │ │ Email │
│ Broker │ │ Store │ │ SMTP │
└────────────┘ └────────────┘ └────────────┘
┌──────────────────────────────────────┐
│ Infrastructure │
├──────────────────┬───────────────────┤
│ Eureka Registry │ Config Server │
│ (Port: 8761) │ (Port: 8888) │
│ │ │
│ Keycloak (OIDC) │ HashiCorp Vault │
│ │ │
│ SonarQube │ Redis Cache │
└──────────────────┴───────────────────┘
- Synchronous - REST APIs via Spring Cloud OpenFeign
- Asynchronous - Apache Kafka for event-driven notifications
- Service Discovery - Eureka-based dynamic service location
- Load Balancing - Client-side load balancing with Spring Cloud LoadBalancer
- API Gateway - Single entry point routing to appropriate microservices
- Identity Provider - Keycloak for centralized OAuth2/OIDC authentication
- Independent Services - Each business domain is an autonomous microservice
- Service Discovery - Dynamic service registration and discovery with Eureka
- API Gateway - Centralized routing, authentication, and rate limiting
- Distributed Configuration - Externalized configuration management
- Independent Deployment - Each service can be deployed independently
- Fault Tolerance - Service isolation prevents cascading failures
- Distributed Caching - Redis for cross-service caching
- Identity Management - Keycloak OAuth2/OIDC for centralized authentication
- Event-Driven Architecture - Kafka-based messaging for notifications
- Secrets Management - HashiCorp Vault integration
- Code Quality - SonarQube static analysis and quality gates
- Comprehensive Testing - Unit and integration tests for each service
- CI/CD Pipeline - Automated build, test, and deployment per service
- Containerization - Docker images for all services
- User Authentication - Secure registration and login via Keycloak
- Product Catalog - Complete product management
- Shopping Cart - Real-time cart operations
- Order Processing - End-to-end order workflow
- Payment Processing - Secure payment handling
- Notifications - Kafka-driven email notifications for order updates
ecomera/
├── ecomera-backend/ # Original monolithic reference
├── ecomera-auth-service/ # Authentication microservice
├── ecomera-product-service/ # Product catalog microservice
├── ecomera-order-service/ # Order management microservice
├── ecomera-payment-service/ # Payment processing microservice
├── ecomera-cart-service/ # Shopping cart microservice
├── ecomera-notification-service/ # Notification microservice (Kafka + MongoDB)
├── ecomera-api-gateway/ # API Gateway
├── ecomera-eureka-service-registry/ # Service discovery
├── ecomera-config-server/ # Configuration server
├── ecomera-api-config/ # Configuration repository
├── ecomera-keycloak/ # Identity provider (OAuth2/OIDC)
├── ecomera-frontend/ # Angular application
└── .github/ # CI/CD centralized workflows
This project demonstrates the complete migration from monolithic to microservices:
Phase 1: Monolithic Foundation
- Built complete e-commerce functionality in single application
- Established clear module boundaries
- Identified service decomposition points
Phase 2: Infrastructure Setup
- Deployed Eureka for service discovery
- Configured Spring Cloud Config Server with HashiCorp Vault
- Implemented API Gateway
- Set up Keycloak for centralized identity management
Phase 3: Service Decomposition
- Extracted Authentication service
- Separated Product catalog service
- Isolated Order management service
- Created Payment processing service
- Deployed Cart management service
Phase 4: Event-Driven Notifications
- Implemented notification service with Apache Kafka
- MongoDB for notification history storage
- Email, SMS, and push notification delivery
Phase 5: Integration & Testing
- Inter-service communication via REST APIs and Kafka events
- Distributed caching with Redis
- End-to-end testing across services
- CI/CD pipeline for each microservice with SonarQube quality gates
This project demonstrates comprehensive full-stack development and distributed systems architecture.
- LinkedIn: Youssef Ammari
- Email: youssef.ammari.795@gmail.com
Spring Boot • Spring Cloud • Angular • Docker • Redis • Eureka • API Gateway • Keycloak • Vault • Kafka • MongoDB • SonarQube