An Inventory Management System built with Next.js, NestJS, TypeORM, MySQL, Redis, and Chakra UI. This project allows different types of users (Admin, Manager, Viewer) to manage inventory, view items, and send reports to merchants.
- Admin
- Manage users (add, update, disable)
- Perform all Manager and Viewer tasks
- Manager
- Add, remove, and update inventory items
- Send inventory summary reports to merchants
- Perform all Viewer tasks
- Viewer
- View inventory items and their quantities
- Node.js
- Yarn
-
Clone the repository:
cd backend
-
Install dependencies:
yarn install
-
Set up environment variables in a
.env
file in the backend root:MYSQL_HOST= MYSQL_PORT= MYSQL_DATABASE= MYSQL_USERNAME= MYSQL_PASSWORD= MYSQL_SYNCHRONIZE= JWT_SECRET= BREVO_SMTP= BREVO_USER= BREVO_PASS= EMAIL_FROM_ADDRESS=ims@noreply.com REDIS_HOST= REDIS_PORT= REDIS_PASSWORD=
-
Run the backend server:
yarn dev
The backend API will be available at
http://localhost:9000/v1
and the Swagger documentation athttp://localhost:9000/doc
.
-
Navigate to the frontend directory:
cd ../frontend
-
Install dependencies:
yarn install
-
Set up environment variables in a
.env.local
file in the frontend root:NEXT_PUBLIC_API_URL=http://localhost:9000/v1
-
Run the frontend server:
yarn dev
The frontend will be available at
http://localhost:3000
.
-
The Kubernetes manifests for deploying the services are located in the
k8s
directory. -
The list of YAML files in the directory are as follows:
brevo-secret.yaml
jwt-secret.yaml
mysql-secret.yaml
mysql.yaml
nestjs.yaml
nginx.yaml
redis-secret.yaml
redis.yaml
These files contain the necessary configurations for deploying the backend, database, Redis, and other related services on a Kubernetes cluster.
NGINX is used as the load balancer in this setup. The nginx.yaml
file in the k8s
directory contains the configuration for setting up NGINX to manage traffic to the backend services.