View Code? Open in Web Editor
NEW
This project forked from gagandeep39/drink-and-delight
A Spring Boot + Angular Project based on Inventory Management System
Shell 16.79%
JavaScript 0.62%
Java 39.93%
TypeScript 20.12%
CSS 2.17%
HTML 19.76%
Dockerfile 0.61%
drink-and-delight's Introduction
inventory-database-service
- Database Server
- Microservice Port 9500
- Database port 9550
- Endpoint
/h2
- Credentials
- Perform Login, Registeration, Change Password
- Refer file for JSON formats
- Encrypts Password
- Default Port 9100
inventory-discovery-server
- All microservices register themselves to eureka
- Microservices path is fetched By Gateway
- Default port 8761
inventory-product-order-service
- Purchase a new Product
- Fetch list of all products
- Update Product Delivery Status
- Default port 9200
inventory-rawmaterial-order-service
- Crete Raw Material Order
- Update Raw Material Order
- Default Port 9300
inventory-stock-management-service
- Create new Product entity and Raw Material Entity
- Update Stocks
- Fetch All products and Raw materials
inventory-supplier-service
- Stores Supplier, Distribtor Data
- Create and Update Supplier, Distributor
- Fetch All Supplier AAnd Distributors
- Open the project on Ecllipse/ VS Code
- Launch Eureka Discovery Server
- Launch Database Server
- Launch Gateway Server
- Launch All other Services
- Go to root of the project
- Run Docker-compose up to Run the server
- Run the Client Separately
- Make sure Client Project running normally or in docker has correct server URL
- Go to k8s Directory
- Run
kubectl apply -f .
- Check the Zuul service port number
- Update Application URL by setting it as zuul nodeport url
- Run client Code
- Install Google Cloud SDK on PC
- Launch Docker Desktop on PC (Make sure Kubernetes is on)
- Create a new Cluster with 4 CPU and 8GB
- Set Kubernetes Context to Google Cloud Cluster
- Go to K8s Directory
- Run
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.40.2/deploy/static/provider/cloud/deploy.yaml
-
- Go to Kubernetes Depoyment Code directory
- Run
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.40.2/deploy/static/provider/cloud/deploy.yaml
- Run
kubernetes apply -f .
- Check Google Cloud Console -> Services
- Look for a load balancer service
- Copy the Extenal Load Balancer URL
- Run it in Browser
- Wait for Sometime for services to start (15 min atleast)
- Go to services -> Create Ingress (This step requires a NodePort service - Take a note if modifying K8s)
- Create Ingress
- Specify Path as default
- Specify Service as zuul-srv
- Create
- Run the Client with External Load balancer IP
- Application Docs link
- Test Case Docs link
- Refer Above link for Latest Docs or else fetch the docs from current repository
TODO - CORS Observations (Need Help)
- Route must hvae Cross origin annotation independent of everything lese it will surely give erro
- Registreation routes will still give error with origins annotation(Needs cors().and() in Security fofx to fix it)
- Cors Interceptor with allow origin header breaks CORS
- cors().and() breaks JWT Code (Prevents any Request from even hitting JWT filter or auth entry point)
- CORS filter Bean causes Error for Cross-Origin header missing
- adding res.addHeader("Authntication") in JWT Filter fixes code temporailiy in Chrome Only
- SensitiveHeaders must be set blank (Cant be removed)
- Ignored Header causes Origin Error
- To Run Client and server in localhost, use extension
moesif cors chrome extension
- To Deploy in a remote device append
https://cors-anywhere.herokuapp.com/
before http://
- Make sure localhost client has port number in gateway url i.e
localhost:9000
drink-and-delight's People