React.jsNode.jsKubernetesMongoDBAgileTDD

Inventory management tool that allows you to track goods across your business's supply chain.

Inventory Management

Inventory Management is a headless inventory management platform built on Node.js, React.js and Kubernetes.

Demo

Here are some screenshots of the application.

login

Login page

category

Adding category

product

Product page

profile

Profile page

user

Adding new user

Getting Started

Follow the steps below to initialize the development platform on your local system.

Software Dependencies

Setting up the Development Platform for Windows:

Clone the repository in your local machine.

git clone https://github.com/benzene-tech/inventory-management.git

Run the setup file to install all the micro-services.

cd inventory-management && bash setup

This command will check for any missing software dependencies and will pull the latest Docker Images of the micro-services.

Once the script is executed without any errors, add the DNS inventory-management.com to your hosts file. This will require a super-user.

sudo vim /etc/hosts

Append the below snippet to the file.

127.0.0.1 inventory-management.com

Add JWT-Secret using

kubectl create secret generic jwt-secret --from-literal=JWT_SECRET=dptUHjXVkKB2TdPy4ZmbPdC2GqTDHQW5

Create Ingress Resource using

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.46.0/deploy/static/provider/cloud/deploy.yaml

Run the development cluster with

skaffold dev

Setting up the Development Platform for Linux:

Docker Installation and Setting Docker Group:

sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo usermod -aG docker $USER

Kubernetes Setup:

Install Minikube:

wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
cp minikube-linux-amd64 /usr/local/bin/minikube
chmod 755 /usr/local/bin/minikube

Install Kubectl and Kudedm

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update -y
sudo apt-get install kubectl kubeadm kubectl -y

Start Minikube

minikube start

Enable Ingress Addon

minikube addons enable ingress

Clone the repository in your local machine.

git clone https://github.com/benzene-tech/inventory-management.git

Run the setup file to install all the micro-services.

cd inventory-management && bash setup

This command will check for any missing software dependencies and will pull the latest Docker Images of the micro-services.

Once the script is executed without any errors, Navigate to the local inventory-management folder.

Create Ingress Resource

kubectl apply -f ./kubernetes/ingress-svc.yaml

Obtain Minikibe IP:

minikube ip

Add the DNS inventory-management.com to your host file.

sudo nano /etc/hosts

Paste the obtained IP as

$IPv4Address inventory-management.com

Add JWT-Secret using

kubectl create secret generic jwt-secret --from-literal=JWT_SECRET=dptUHjXVkKB2TdPy4ZmbPdC2GqTDHQW5

Run the development cluster with

skaffold dev

©2022 Dev, by Sanjay.