All Projects → mostafacs → ecommerce-microservices-spring-reactive-webflux

mostafacs / ecommerce-microservices-spring-reactive-webflux

Licence: other
E-commerce demo with spring reactive webflux and spring cloud microservice

Programming Languages

java
68154 projects - #9 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to ecommerce-microservices-spring-reactive-webflux

spring-r2dbc-sample
Code samples for demonstrating R2dbc, Spring R2dbc, and Spring Data R2dbc.
Stars: ✭ 105 (-1.87%)
Mutual labels:  r2dbc, spring-data-r2dbc, r2dbc-postgresql
Hsweb Framework
hsweb (haʊs wɛb) 是一个基于spring-boot 2.x开发 ,首个使用全响应式编程的企业级后台管理系统基础项目。
Stars: ✭ 7,724 (+7118.69%)
Mutual labels:  reactive-streams, spring-webflux, r2dbc
Javadevjournal
Source code for the tutorials published on the Javadevjournal site.
Stars: ✭ 141 (+31.78%)
Mutual labels:  maven, spring-cloud, spring-security
springboot-rsocketjwt-example
Example of using JWT with RSocket and Spring Boot
Stars: ✭ 26 (-75.7%)
Mutual labels:  reactive-streams, spring-security
spring-boot-cities-service
A Spring Boot + Spring Data + Spring Cloud Connectors demo app
Stars: ✭ 13 (-87.85%)
Mutual labels:  spring-cloud, flyway
project-tracking-system-backend-app
Enterprise project tracker, tracks commits done by employees after getting assigned to a couple of projects by their managers
Stars: ✭ 62 (-42.06%)
Mutual labels:  maven, spring-security
r2dbc-proxy
R2DBC Proxying Framework
Stars: ✭ 108 (+0.93%)
Mutual labels:  reactive-streams, r2dbc
sample-spring-webflux
testing webclient reactive communication with spring boot reactive application built on top of spring webflux
Stars: ✭ 21 (-80.37%)
Mutual labels:  reactive-streams, spring-webflux
spring-interview-questions
500+ Spring-Boot Interview Questions
Stars: ✭ 269 (+151.4%)
Mutual labels:  spring-cloud, spring-security
KotlinReactiveMS
An educational project to learn reactive programming with Spring 5 and Kotlin
Stars: ✭ 33 (-69.16%)
Mutual labels:  reactive-streams, spring-webflux
Cloud-Native-App-Spring-Boot
A Cloud Native App with Spring Coud Security with KeyCloak Auth Server, API Gateway Server, Naming Server, Config Server and Distributed Tracing and ELK Stack hosted in K8s
Stars: ✭ 19 (-82.24%)
Mutual labels:  spring-cloud, spring-security
spring-cloud-boilerplate
The discovery & gateway boilerplate based on spring-cloud with spring security.
Stars: ✭ 12 (-88.79%)
Mutual labels:  spring-cloud, spring-security
lc-spring-data-r2dbc
An extension of spring-data-r2dbc to provide features such as relationships, joins, cascading save/delete, lazy loading, sequence, schema generation, composite id
Stars: ✭ 30 (-71.96%)
Mutual labels:  r2dbc, spring-data-r2dbc
spring-cloud-examples
🎏 Personal learning use cases.
Stars: ✭ 33 (-69.16%)
Mutual labels:  spring-cloud, spring-security
Spring
Personal notes of preparation to Spring 5 Professional Certification
Stars: ✭ 35 (-67.29%)
Mutual labels:  spring-cloud, spring-security
zainabed-spring-security-jwt
Authentication & Authorization module for standalone Spring Boot app or Spring Cloud applications
Stars: ✭ 24 (-77.57%)
Mutual labels:  spring-cloud, spring-security
okta-jhipster-microservices-oauth-example
A microservices architecture built with JHipster, OAuth 2.0, and Okta
Stars: ✭ 29 (-72.9%)
Mutual labels:  spring-security, microservices-architecture
cf-butler
My purpose in life is to cleanup stale apps and services on a Cloud Foundry foundation. I can be configured to report on and remove orphaned services and stopped app instances older than a configurable duration. I do many other useful things too.
Stars: ✭ 31 (-71.03%)
Mutual labels:  spring-webflux, r2dbc
JavaFamily
【Java面试+Java学习指南】 一份涵盖大部分Java程序员所需要掌握的核心知识。
Stars: ✭ 517 (+383.18%)
Mutual labels:  spring-cloud, spring-security
spring-cloud-microservices-on-kubernetes
My Best Practices in development and deployment of Spring Cloud Microservices on Kubernetes.
Stars: ✭ 19 (-82.24%)
Mutual labels:  spring-cloud, flyway

Ecommerce Microservices Architecture

A complete ecommerce demo Implement based on Microservice Architecture Pattern using Spring Boot, Spring Cloud, Spring WebFlux, Postgresdb and Docker.

Abstract

In this project I didn't built independent microservices But i implemented microservices share the same database Why? Because I want to use database tools like ACID transactions, joins, bulk files imports, ... instead of network overhead for interprocess communication between microservices. I worked in a large project implemented based on microservices architecture we have a set of independent services and I used Spring Cloud Open Feign for inter-process communication (Which uses client side load balancer ribbon)

I'm planning to implement another version from project with independent microservices and communicate via feign.

I have split services into two types system and logical services.

Features

Secured, Authorized and Paginated endpoints.

Functional services

Authentication Service

Authorization Server for all other services which grants OAuth2 tokens for the backend resource services. All other secured services must set jwk uri for endpoint implemented on this service.

   security:
     oauth2:
       resourceserver:
         jwt:
           jwk-set-uri: ${JWKS_URL}

Endpoints

Method Path Description User authenticated
GET /.well-known/jwks System endpoint to get JSON Web Key Set (JWKS) is a set of keys containing the public keys that should be used to verify JWT token
POST /user/merchant Register new merchant account (with merchant role)
POST /user/client Register new client account (with client role)
GET /user Get current login user information ×

Product Service

Manage products information and inventory Endpoints

Method Path Description User authenticated Role
GET /list?page={page}&pageSize={pageSize} Get all products x any
GET /list/merchant?page={page}&pageSize={pageSize} Get products created by merchant x merchant,admin
POST /save Create new product x merchant
PUT /save Update existing product x merchant
GET /list/available?page={page}&pageSize={pageSize} Get available products with inventory > 0 × any
GET /list/not-available?page={page}&pageSize={pageSize} Get available products with inventory = 0 × any

Order Service

Manage products information and inventory Endpoints

Method Path Description User authenticated Role
GET /list/user?page={page}&pageSize={pageSize} Get login user orders x any
GET /{orderId} Get order by id x any
POST /save Create new order x client
PUT /save Update existing order x client

System Services

Core service to implement Netflix OSS design architecture and Services token security

Config Service

Provides configuration for all other services (centralize configuration for all services).
Details: Spring Cloud Config

Discovery Service

It allows automatic detection of network locations for service instances, which could have dynamically assigned addresses because of auto-scaling, failures and upgrades (Every service register in this service after running).
Details: Spring Cloud Netflix
Eureka server url: http://localhost:2222/

Gateway Service

Provide a proxy (routing) and client side load balancing via ribbon You can deploy multiple services for the same service and gateway will load balancing between them ( Simple scalability ) Details: Spring Cloud Gateway

Migration Service

Migrations service handle changes on database tables using flyway
To apply change on database please create file in this folder ecommerce-microservices/storage/migration/src/main/resources/flyway/migrations in this structure *__*.sql then apply this command

cd ecommerce-microservices/storage/migration # change it to your path
mvn clean package
docker-compose build
docker-compose up migration

Monitoring

Not completed require implement turbine service and any broker service (rabbitmq) But you can access start page from http://localhost:8000/hystrix

Run Project

Install maven and docker

mvn clean install 
docker-compse build
docker-compse up

# on the first run or after update sql migration on migration service
docker-compose up migration

Probably you got issues because docker caching refresh docker images by:

docker rm $(docker ps -a -q) -f
docker volume prune

Endpoints Documentations

Endpoints Docs

Contributions are welcome!

greatly appreciate your help. Feel free to suggest and implement improvements.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].