Skip to main content

Inventory App: Manage your products like a pro!

Inventory Icon.
Last updated: September 16, 2024

#🚀 Brief Overview

Inventory Management API built with Node.js and TypeScript, providing comprehensive functionality for handling suppliers, users, products, and orders. Employers can place orders for product quantities from suppliers, manage order statuses, and streamline the entire inventory workflow. The API includes robust features like documentation, testing, and scalable architecture, making it ideal for businesses seeking efficient inventory control. Fully tested and optimized for performance, it’s a flexible solution for modern inventory needs.

#✨ Key Features

  1. Well Organized and Clean code thanks to TypeScript, Prettier and ESlint tools.
  2. Clean Archeticture thanks to Modular Monolothic Arch.
  3. Strong Authentication Feature thanks to JWT Strategy.
  4. Logging with rotation Fetaure thanks to Winston.
  5. Awesome performance for Database operations thanks to Drizzle.
  6. Easy to start as a container with Doecker and docker-compose.
  7. Autocomplete thaks to Elasticsearch.
  8. High performance and small latency thanks to using Redis.
  9. Full customizable filtering and searching feature thanks to Elasticsearch.
  10. Full power of charts to get valuabe info thanks to Kibana

#🛠️ Tech Stack

#🏗️ Architecture

Main Architecture

Logs Logic

#💾 Database Design

#📘 API Documentation

After you run the App you can find API Docs in route: http://localhost:3000/api-docs

#🔧 Install Instructions

#📦 Using NPM Package Manager

  1. Clone the Repo
Terminal window
git clone https://github.com/ahmedmohmd/inventory-app
cd inventory-app
  1. Add Your Desired Environment Variables in .env File
// JWT Configs
JWT_SECRET: string;
// Database ceredintials
DB_URL: string;
// Email Provider Credentials (Gmail)
MAIL_USERNAME: string;
MAIL_PASSWORD: string;
MAIL_PORT: string;
MAIL_HOST: string;
SENDER_EMAIL: string;
// Cloudinary
CLOUDINARY_CLOUD_NAME: string;
CLOUDINARY_API_KEY: string;
CLOUDINARY_API_SECRET: string;
  1. Install Dependencies
Terminal window
npm install
  1. Create Database postgres and Called it inventory.

    • Open the Temrinal
    • Write: psql -U <your username>
    • Type your password if desired
    • write: create database if not exists inventory
    • write: exit
  2. Apply Drizzle Schema on created Database

Terminal window
npx drizzle-kit push
  1. Run the APP
Terminal window
npm run start:dev

#🐋 Using Docker

  1. Clone the Repo
Terminal window
git clone https://github.com/ahmedmohmd/inventory-app
cd inventory-app
  1. Add necessary Environemnt Variables in docker-compose.yaml file
// JWT Configs
JWT_SECRET: string;
// Database ceredintials
DB_URL: string;
// Email Provider Credentials (Gmail)
MAIL_USERNAME: string;
MAIL_PASSWORD: string;
MAIL_PORT: string;
MAIL_HOST: string;
SENDER_EMAIL: string;
// Cloudinary
CLOUDINARY_CLOUD_NAME: string;
CLOUDINARY_API_KEY: string;
CLOUDINARY_API_SECRET: string;
  1. Run Docker Compose Command
docker-compose up
  1. Apply drizzle schema on the database
Terminal window
docker-compose exec inventory npx drizzle-kit push

#🖥️ Usage

  1. Moderators can order any quantity of products from their suppliers
  2. Order related so specific warehouse
  3. When any action happened, email sent to the target employer
  4. Products are organized by categories
  5. Products are organized in the storage area by sections
  6. Products have at least 4 screenshots
  7. Users can reset his password

#🏋️ Challanges