Skip to content

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.

Notifications You must be signed in to change notification settings

DFanso/Inventory-Management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inventory Management System

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.

Technologies Used

Next.js NestJS TypeORM MySQL Redis Chakra UI Swagger Yarn Docker Docker

Features

  • 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

Prerequisites

  • Node.js
  • Yarn

Getting Started

Backend

  1. Clone the repository:

    cd backend
  2. Install dependencies:

    yarn install
  3. 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=
  4. Run the backend server:

    yarn dev

    The backend API will be available at http://localhost:9000/v1 and the Swagger documentation at http://localhost:9000/doc.

Frontend

  1. Navigate to the frontend directory:

    cd ../frontend
  2. Install dependencies:

    yarn install
  3. Set up environment variables in a .env.local file in the frontend root:

    NEXT_PUBLIC_API_URL=http://localhost:9000/v1
  4. Run the frontend server:

    yarn dev

    The frontend will be available at http://localhost:3000.

Kubernetes (k8s)

  1. The Kubernetes manifests for deploying the services are located in the k8s directory.

  2. 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

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.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published