E-Stock Market Application

This is a Micro services project created with Spring boot and Java version 1.8. This project contains these microservices:

  • EdgeMicroService: This service is based on Netflix Zuul and acts as an API Gateway
  • DiscoveryMicroService: This service works as a eureka server and handles service discovery.
  • CompanyMicroService: This service handles the operation for Company entity
  • StockCommandService: This service follow CQRS Pattern with event sourcing (Apache Kafka) and handles the write operations for stock prices
  • StockQueryService: This service follow CQRS Pattern with event sourcing (Apache Kafka) and handles the read operations for stock prices
  • AuthMicroService: This service acts an in-memory authorization service. EdgeMicroService is dependent on this.
  • Grafana Dashboards
  • Prometheus
  • ELK Stack: This uses Apache Kafka as a Log stream to LogStash which create indexes on these logs and send to Elasticsearch and Kibana is used to visualize the logs.

All the services are built and deployed using docker containers

To start the microservices:

  • Clone this repository.
  • Run docker-compose up --build -d from the parent directory, this will first build and then deploy the services.
  • Or, if just want to run the services use docker-compose up from the parent directory

If everything goes well, you can access the following services at given location:

API Documentation:

API Endpoint Edge Url
POST /api/v1.0/market/company/register http://localhost:8092/company-service/api/v1.0/market/company/register
GET /api/v1.0/market/company/info/companycode http://localhost:8092/company-service/api/v1.0/market/company/info/1213
GET /api/v1.0/market/company/getall http://localhost:8092/company-service/api/v1.0/market/company/getall
DELETE /api/v1.0/market/company/delete/companycode http://localhost:8092/company-service/api/v1.0/market/company/delete/1213
POST /api/v1.0/market/stock/add/companycode http://localhost:8092/stock-command-service/api/v1.0/market/stock/add/1213
GET /api/v/1.0/market/stock/get/companycode/startdate/enddate http://localhost:8092/stock-query-service/api/v1.0/market/stock/get/1213/2021-06-20/2021-06-20
- Company API Swagger UI: http://localhost:8089/swagger-ui/
- StockPrice API Swagger UI: http://localhost:8090/swagger-ui/

Complete API can be accessed from Zuul Gateway Endpoint: http://localhost:8092/swagger-ui/

EStock UI Application: