Skip to content

miliariadnane/demo-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧺 E-commerce Platform With Microservice Architecture

Microservice E-commerce Platform β€” From Zero to Production

A practical e-commerce platform with Spring frameworks, Kubernetes, Terraform and deployed on AWS EKS. The repository demonstrates microservice patterns and cloud-native capabilities with focus on scalability, security, resiliency, observability, infrastructure automation and deployment improvements.

πŸ’‘ This application is not business oriented and my focus is mostly on technical part, I just want to implement a sample app from scratch with microservice architecture using different technologies, principles and patterns.

πŸŒ€ This Application is in-progress and I will add new features over time. πŸŒ€

Guide & Documentation

Link to the documentation and guide website : demo-microservices

Table of Contents

β”œβ”€β”€ Overview
β”œβ”€β”€ Set up a Microservice Project from Scratch
β”œβ”€β”€ Microservices 101
β”‚   β”œβ”€β”€ Service Discovery with Netflix Eureka
β”‚   β”œβ”€β”€ Communication Between Microservices
β”‚   β”‚   β”œβ”€β”€ Synchronous Communication
β”‚   β”‚   └── Asynchronous Communication
β”‚   β”œβ”€β”€ API Gateway
β”‚   β”‚   β”œβ”€β”€ Load Balancing
β”‚   β”‚   β”œβ”€β”€ Resiliency
β”‚   β”‚   β”‚   β”œβ”€β”€ Circuit Breaker
β”‚   β”‚   β”‚   β”œβ”€β”€ Fallback Pattern
β”‚   β”‚   β”‚   └── Rate Limiting
β”‚   β”‚   └── Security
β”‚   β”‚       β”œβ”€β”€ API Key Manager
β”‚   β”‚       └── Authentication
β”‚   β”œβ”€β”€ Cloud Native Deployment
β”‚   β”‚   β”œβ”€β”€ Containerization with Docker & Jib
β”‚   β”‚   β”œβ”€β”€ Container Orchestration with Kubernetes
β”‚   β”‚   └── Automating Deployment with Skaffold
β”‚   └── Monitoring
β”‚       β”œβ”€β”€ Distributed Tracing with Sleuth & Zipkin
β”‚       └── Prometheus & Grafana
β”œβ”€β”€ Microservices 102
β”‚   β”œβ”€β”€ Service Discovery Deep Dive
β”‚   β”œβ”€β”€ CQRS Pattern
β”‚   β”œβ”€β”€ Cloud Deployment with AWS
β”‚   β”œβ”€β”€ Infrastructure as Code with Terraform
β”‚   β”‚   β”œβ”€β”€ Terraform Fundamentals
β”‚   β”‚   β”œβ”€β”€ Our Terraform Configuration
β”‚   β”‚   └── Deploying to AWS with Terraform
β”‚   └── Deployment Strategies
β”‚       β”œβ”€β”€ Blue/Green Deployment (Docker Compose)
β”‚       β”œβ”€β”€ Rolling Update (Kubernetes)
β”‚       └── Canary Deployment (Kubernetes)

Support

Show your support by:

  • ⭐ Starring this repository. And we will be happy together :)
  • 🀲 Making a duaa for me and my parents
  • πŸ›οΈ Reporting bugs or submitting pull requests to fix them
  • πŸ“’οΈ Suggesting new features through issues or pull requests

Features

  • βœ… Service Discovery with Netflix Eureka
  • βœ… API Gateway with Spring Cloud Gateway
  • βœ… Distributed Tracing using Sleuth & Zipkin
  • βœ… Event-Driven Architecture with RabbitMQ
  • βœ… Security with API Key Manager & OAuth2/Keycloak
  • βœ… Resiliency with Resilience4j (Circuit Breaker, Fallback, Rate Limiting)
  • βœ… Database per Service Pattern
  • βœ… Cloud Native Support (Kubernetes & AWS EKS)
  • βœ… Infrastructure as Code with Terraform
  • βœ… Automated Deployment with Skaffold
  • βœ… Monitoring with Prometheus & Grafana
  • βœ… Email Notifications with AWS SES
  • βœ… Deployment Strategies β€” Blue/Green, Rolling Update, Canary
  • βœ… CQRS Pattern β€” separate read/write models with denormalized Order View read model

Roadmap

  • Kubernetes Deployment
  • AWS EKS Integration
  • API Documentation with OpenAPI
  • Api Key Manager for APIs security
  • OAuth2 Authentication with Keycloak
  • Resilience4j for circuit breaker and fallback
  • Automated K8S Deployment with Skaffold
  • Infrastructure as Code with Terraform
  • Deployment Strategies (Blue/Green, Rolling Update, Canary)
  • CQRS Pattern with denormalized read model in Order Service
  • Service Mesh Implementation
  • Frontend application with React or Angular

Technologies - Libraries

Core

  • βœ”οΈ eureka-server-discovery - Eureka is a service registry for resilient spring microservices.
  • βœ”οΈ spring-cloud-gateway - Spring Cloud Gateway is a non-blocking, reactive, based on Spring 5, web server gateway.
  • βœ”οΈ spring-cloud-loadbalancer - Spring Cloud LoadBalancer is a library that provides a common abstraction over client-side load balancing.
  • βœ”οΈ sleuth-zipkin - Distributed tracing with Zipkin and Spring Cloud Sleuth.
  • βœ”οΈ spring-boot-starter-data-jpa - Spring Data JPA is a layer on top of the JPA API.
  • βœ”οΈ amqp-starter - Spring AMQP provides an abstraction layer for sending and receiving messages with a message broker.
  • βœ”οΈ rabbitmq - RabbitMQ is an open source message broker software that implements the Advanced Message Queuing Protocol (AMQP).
  • βœ”οΈ Junit5 - For unit testing and integration testing.
  • βœ”οΈ Mockito - For mocking objects in unit tests.

Libraries

  • βœ”οΈ mapstruct - MapStruct is a code generator that greatly simplifies the implementation of mappings between Java bean types based on a convention over configuration approach.
  • βœ”οΈ open-feign - Declarative REST Client for spring.
  • βœ”οΈ lombok - Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
  • βœ”οΈ micrometer - Micrometer provides a simple facade over the instrumentation clients for the most popular monitoring systems, allowing you to instrument your JVM-based application code without vendor lock-in.
  • βœ”οΈ jib-plugin - Container image builder that facilitates building container images for your Java applications.

Infrastructure

  • βœ”οΈ prometheus - Prometheus is an open-source systems monitoring and alerting toolkit.
  • βœ”οΈ grafana - Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB.
  • βœ”οΈ AWS SES - Amazon Simple Email Service (Amazon SES) is a cloud-based email sending service.
  • βœ”οΈ AWS EKS - Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it easy for you to run Kubernetes on AWS without needing to install, operate, and maintain your own Kubernetes control plane.
  • βœ”οΈ Terraform - Infrastructure as Code tool for provisioning and managing cloud infrastructure using declarative configuration files.
  • βœ”οΈ Skaffold - Skaffold handles the workflow for building, pushing and deploying Kubernetes applications, enabling continuous development.
  • βœ”οΈ Keycloak - Open Source Identity and Access Management that adds security to your applications.
  • βœ”οΈ Resilience4j - Lightweight fault tolerance library for Java providing circuit breaker, rate limiter, retry and fallback patterns.
  • βœ”οΈ Docker - Docker is a set of platform as a service products that allows to build, test, and deploy applications quickly using containers.
  • βœ”οΈ kubernetes - Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

System Architecture

Microservices Architecture

Infrastructure Architecture

Deployment Architecture

License

This project is made available under the MIT license. See LICENSE for details.

About

E-commerce platform showcasing microservice architecture with Spring Cloud, Event-Driven Design, and Cloud-Native patterns. Features service discovery, API gateway, distributed tracing, message queuing, and OAuth2 security. Includes complete deployment guides for Docker, Kubernetes, and AWS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages