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.
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.
- 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
- 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
- View comprehensive loading and unloading records
- Search and filter records
- Generate reports in CSV and PDF formats
- Overview of key metrics and statistics
- Quick access to frequently used functions
- Notifications for low stock items
- 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
- 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
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/
βββ 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
- Node.js (v14+)
- npm (v6+)
- MongoDB (v4+)
- Internet connection (for CDN resources and package installation)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install -
Create a
.envfile in the backend directory with the following content:MONGO_URI=your_mongodb_connection_string PORT=5000 -
Start the server in development mode:
npm run devOr for production:
npm start
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install -
Create a
.envfile in the frontend directory (optional for custom configuration):REACT_APP_API_URL=http://localhost:5000/api -
Start the development server:
npm start -
For production build:
npm run build -
Open your browser and navigate to
http://localhost:3000
The Operations Portal serves as the main entry point for users, providing access to:
- Inventory management
- Stock operations
- Production monitoring
- Reports and analytics
- Dashboard: Start from the dashboard to get an overview of current inventory and stock levels across all categories
- Manage Inventory: Add new inventory locations, update capacity, or delete unused inventory spaces
- Add Stock: Add new stock items to the system with details like quantity, value, and space requirements
- Manage Stock: Filter and view stock by different categories (Raw Material, Final Products, etc.)
- Stock Records: View comprehensive records of all loading and unloading operations and generate reports in CSV or PDF format
- 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
- 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
- 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
- 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)
- 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.