Skip to content

R-Tharanka/ITP-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stockpile Handling System

A comprehensive inventory and stock management system designed for NELCO, a manufacturing company specializing in food products like turmeric, dry chilly, ginger, pepper, and garlic.

Overview

The Stockpile Handling System is a full-stack web application that provides efficient inventory and stock management capabilities. It allows users to track raw materials, semi-finished products, final products, returned goods, and wastage throughout the production cycle.

This system aims to streamline the company's inventory operations by providing real-time visibility of stock levels, enabling efficient tracking of items from receipt to production and distribution, and generating comprehensive reports for business analytics.

Features

Inventory Management

  • Add, update, and delete inventory items
  • View inventory status with visual representations (pie charts)
  • Search and filter inventory items
  • Track inventory capacity and occupied space

Stock Management

  • Add new stock items with automatic SKU generation
  • Unload stock items from inventory
  • Filter stocks by categories (Raw Material, Final Products, etc.)
  • Visual data representation with bar charts

Stock Records

  • View comprehensive loading and unloading records
  • Search and filter records
  • Generate reports in CSV and PDF formats

Dashboard

  • Overview of key metrics and statistics
  • Quick access to frequently used functions
  • Notifications for low stock items

Tech Stack

Frontend

  • React.js: UI library for building the user interface
  • React Router: For navigation and routing
  • Axios: For API requests
  • Chart.js & react-chartjs-2: For data visualization
  • jsPDF & jspdf-autotable: For PDF report generation
  • date-fns: For date formatting and manipulation

Backend

  • Node.js: JavaScript runtime
  • Express.js: Web application framework
  • MongoDB: NoSQL database for data storage
  • Mongoose: MongoDB object modeling
  • dotenv: For environment variable management
  • cors: For handling Cross-Origin Resource Sharing

Project Structure

Frontend

frontend/
β”œβ”€β”€ public/            # Public assets
β”‚   β”œβ”€β”€ index.html     # Main HTML file
β”‚   β”œβ”€β”€ favicon.ico    # Website icon
β”‚   β”œβ”€β”€ manifest.json  # Progressive Web App manifest
β”‚   └── robots.txt     # Robot crawling rules
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ api.js         # API connection functions
β”‚   β”œβ”€β”€ App.js         # Main application component
β”‚   β”œβ”€β”€ App.css        # Application-wide styles
β”‚   β”œβ”€β”€ index.js       # Application entry point
β”‚   β”œβ”€β”€ index.css      # Global CSS
β”‚   β”œβ”€β”€ assets/        # Images and static files
β”‚   β”‚   └── img/       # Image assets
β”‚   β”‚       β”œβ”€β”€ Operations Portal/   # Operations portal images
β”‚   β”‚       β”‚   └── icon/            # Icon assets
β”‚   β”‚       └── stockpile management/ # Stockpile management images
β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ AddInventoryForm.js      # Form for adding inventory
β”‚   β”‚   β”œβ”€β”€ AddStockForm.js          # Form for adding stock
β”‚   β”‚   β”œβ”€β”€ DeleteInventory.js       # Inventory deletion component
β”‚   β”‚   β”œβ”€β”€ UpdateInventoryForm.js   # Form for updating inventory
β”‚   β”‚   β”œβ”€β”€ footer.js                # Global footer component
β”‚   β”‚   β”œβ”€β”€ op_port_header.js        # Operations portal header
β”‚   β”‚   β”œβ”€β”€ stock_mn_header.js       # Stock management header
β”‚   β”‚   β”œβ”€β”€ stock_mn_sidenav.js      # Stock management sidebar
β”‚   β”‚   β”œβ”€β”€ stock_mn_footer.js       # Stock management footer
β”‚   β”‚   β”œβ”€β”€ stock_mn_dashb_stocktable.js    # Stock table for dashboard
β”‚   β”‚   β”œβ”€β”€ stock_mn_im_inventorytable.js   # Inventory table component
β”‚   β”‚   β”œβ”€β”€ stock_mn_inventory_status.js    # Inventory status component
β”‚   β”‚   β”œβ”€β”€ stock_mn_mnstock_filter.js      # Stock filtering component
β”‚   β”‚   β”œβ”€β”€ stock_mn_mnstock_stocktable.js  # Stock table for management
β”‚   β”‚   β”œβ”€β”€ unload_modal.js          # Modal for unloading stock
β”‚   β”‚   β”œβ”€β”€ chart/                   # Chart components
β”‚   β”‚   β”‚   β”œβ”€β”€ op_chartProduction.js         # Production chart
β”‚   β”‚   β”‚   β”œβ”€β”€ op_chartSales.js              # Sales chart
β”‚   β”‚   β”‚   β”œβ”€β”€ stock_mn_chartInventory_status.js   # Inventory status chart
β”‚   β”‚   β”‚   └── stock_mn_stockmn_chart_summary.js   # Stock summary chart
β”‚   β”‚   └── styles/                  # Component-specific styles
β”‚   β”‚       β”œβ”€β”€ AddInventoryForm.css
β”‚   β”‚       β”œβ”€β”€ AddStockForm.css
β”‚   β”‚       β”œβ”€β”€ delete_inventory.css
β”‚   β”‚       β”œβ”€β”€ footer.css
β”‚   β”‚       β”œβ”€β”€ op_port_header.css
β”‚   β”‚       β”œβ”€β”€ stock_mn_header.css
β”‚   β”‚       β”œβ”€β”€ stock_mn_footer.css
β”‚   β”‚       β”œβ”€β”€ stock_mn_sidenav.css
β”‚   β”‚       β”œβ”€β”€ stock_mn_dashb_stocktable.css
β”‚   β”‚       β”œβ”€β”€ stock_mn_im_inventorytable.css
β”‚   β”‚       β”œβ”€β”€ stock_mn_inventory_status.css
β”‚   β”‚       β”œβ”€β”€ stock_mn_mnstock_stocktable.css
β”‚   β”‚       β”œβ”€β”€ unload_modal.css
β”‚   β”‚       └── UpdateInventoryForm.css
β”‚   β”œβ”€β”€ pages/         # Page components
β”‚   β”‚   β”œβ”€β”€ operation_portal.js         # Main operations portal
β”‚   β”‚   β”œβ”€β”€ inventory_dashboard.js      # Inventory dashboard
β”‚   β”‚   β”œβ”€β”€ inventory_manage.js         # Inventory management page
β”‚   β”‚   β”œβ”€β”€ inventory_stock_manage.js   # Stock management page
β”‚   β”‚   └── inventory_stock_record.js   # Stock records page
β”‚   └── styles/        # Global styles
β”‚       β”œβ”€β”€ inventory_dashboard.css
β”‚       β”œβ”€β”€ inventory_manage.css
β”‚       β”œβ”€β”€ inventory_stock_manage.css
β”‚       β”œβ”€β”€ inventory_stock_record.css
β”‚       β”œβ”€β”€ operation_portal.css
β”‚       β”œβ”€β”€ operation_portal_main_side_navigation.css
β”‚       └── stock_mn_mnstock_filter.css
β”œβ”€β”€ .gitignore         # Git ignore file for frontend
└── package.json       # Project dependencies and scripts

Backend

backend/
β”œβ”€β”€ controllers/       # Request handlers
β”‚   └── userController.js   # User-related controller
β”œβ”€β”€ models/            # MongoDB schemas
β”‚   β”œβ”€β”€ Inventory.js          # Inventory model
β”‚   β”œβ”€β”€ InventoryStatus.js    # Inventory status model
β”‚   β”œβ”€β”€ Stock.js              # Stock model
β”‚   β”œβ”€β”€ UnloadStock.js        # Unload stock model
β”‚   └── userModel.js          # User model
β”œβ”€β”€ routes/            # API routes
β”‚   β”œβ”€β”€ inventoryRoutes.js    # Inventory API routes
β”‚   β”œβ”€β”€ loadStockRoutes.js    # Load stock API routes
β”‚   β”œβ”€β”€ unload_stockRoutes.js # Unload stock API routes
β”‚   └── userRoutes.js         # User API routes
β”œβ”€β”€ server.js          # Entry point - Express server setup
└── package.json       # Project dependencies and scripts

Installation and Setup

Prerequisites

  • Node.js (v14+)
  • npm (v6+)
  • MongoDB (v4+)
  • Internet connection (for CDN resources and package installation)

Backend Setup

  1. Navigate to the backend directory:

    cd backend
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file in the backend directory with the following content:

    MONGO_URI=your_mongodb_connection_string
    PORT=5000
    
  4. Start the server in development mode:

    npm run dev
    

    Or for production:

    npm start
    

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file in the frontend directory (optional for custom configuration):

    REACT_APP_API_URL=http://localhost:5000/api
    
  4. Start the development server:

    npm start
    
  5. For production build:

    npm run build
    
  6. Open your browser and navigate to http://localhost:3000

Usage

Main Operations Portal

The Operations Portal serves as the main entry point for users, providing access to:

  • Inventory management
  • Stock operations
  • Production monitoring
  • Reports and analytics

Inventory Management Workflow

  1. Dashboard: Start from the dashboard to get an overview of current inventory and stock levels across all categories
  2. Manage Inventory: Add new inventory locations, update capacity, or delete unused inventory spaces
  3. Add Stock: Add new stock items to the system with details like quantity, value, and space requirements
  4. Manage Stock: Filter and view stock by different categories (Raw Material, Final Products, etc.)
  5. Stock Records: View comprehensive records of all loading and unloading operations and generate reports in CSV or PDF format

Key User Flows

  • Adding New Stock: Navigate to Stock Management β†’ Add Stock β†’ Fill in details β†’ Submit
  • Unloading Stock: Navigate to Stock Management β†’ Select item β†’ Unload β†’ Fill details β†’ Confirm
  • Generating Reports: Navigate to Stock Records β†’ Select date range β†’ Choose format (CSV/PDF) β†’ Generate

Data Models

Inventory

  • id: Unique identifier
  • location: Physical location of the inventory
  • capacity: Maximum capacity (in cubic meters)
  • itemTypes: Types of items that can be stored (raw materials, final products, etc.)
  • createdAt: Date when the inventory was created
  • updatedAt: Date when the inventory was last updated

Inventory Status

  • id: Unique identifier
  • itemName: Name of the inventory item
  • itemType: Category of the item
  • totalAmount: Total quantity in the inventory
  • remainingAmount: Current available quantity
  • worth: Total value of the inventory item
  • occupiedSpace: Space occupied in cubic meters

Stock

  • sku: Stock Keeping Unit (auto-generated)
  • itemName: Name of the item
  • itemType: Type of item (Raw Material, Final Product, etc.)
  • amount: Quantity in kg
  • worth: Value in currency
  • occupiedSpace: Space occupied in cubic meters
  • date: Date of entry
  • imageUrl: Path to item image (if applicable)

UnloadStock

  • id: Unique identifier
  • sku: Reference to the original stock SKU
  • itemName: Name of the item
  • itemType: Type of item
  • amount: Quantity being unloaded
  • worth: Value of unloaded stock
  • occupiedSpace: Space freed up
  • date: Date of unloading

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A full-stack Stockpile Handling System for food-product manufacturers, providing real-time inventory tracking, stock operations, and comprehensive reporting.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors