Skip to content

utpal-kumar-08/Inventory-Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

<<<<<<< HEAD

๐Ÿ›๏ธ Inventory Management System

A modern, full-stack inventory management system built with the MERN stack (MongoDB, Express.js, React.js, Node.js). This application helps businesses manage their products, orders, and inventory efficiently.

โœจ Features

  • ๐Ÿ” Secure user authentication and authorization
  • ๐Ÿ“ฆ Product management with categories and subcategories
  • ๐Ÿ“Š Real-time inventory tracking
  • ๐Ÿ›’ Order processing and management
  • ๐Ÿ“ˆ Analytics and reporting dashboard
  • ๐ŸŽจ Modern, responsive UI with Tailwind CSS

๐Ÿš€ Quick Start

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB
  • npm or yarn

Installation

  1. Clone the repository
<<<<<<< HEAD
git clone https://github.com/utpal-kumar-08/inventory-management.git
=======
git clone https://github.com/utpal-kumar-08/Inventory-Management.git

cd inventory-management
  1. Install dependencies
# Install backend dependencies
cd backend
npm install

# Install frontend dependencies
cd ../frontend
npm install
  1. Set up environment variables
# In backend directory
cp .env.example .env
# Edit .env with your configuration
  1. Start the development servers
# Start backend (from backend directory)
npm run dev

# Start frontend (from frontend directory)
npm run dev

The application will be available at:

๐Ÿ—๏ธ Project Structure

โ”œโ”€โ”€ frontend/          # React frontend application
โ”‚   โ”œโ”€โ”€ src/          # Source files
โ”‚   โ”œโ”€โ”€ public/       # Static files
โ”‚   โ””โ”€โ”€ package.json  # Frontend dependencies
โ”‚
โ””โ”€โ”€ backend/          # Node.js backend application
    โ”œโ”€โ”€ services/     # Microservices
    โ”œโ”€โ”€ config/       # Configuration files
    โ””โ”€โ”€ package.json  # Backend dependencies

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React.js
  • Tailwind CSS
  • Redux Toolkit
  • React Router
  • Axios

Backend

  • Node.js
  • Express.js
  • MongoDB
  • JWT Authentication
  • Microservices Architecture

๐Ÿ“ API Documentation

The API documentation is available at /api-docs when running the backend server. Key endpoints include:

  • /api/auth - Authentication endpoints
  • /api/products - Product management
  • /api/orders - Order processing
  • /api/inventory - Inventory management
  • /api/stats - Analytics and reporting

๐Ÿค Contributing

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

๐Ÿช Advanced Inventory Management System

A comprehensive, full-stack inventory management solution with AI-powered analytics, predictive forecasting, and responsive design.

Inventory Management Node.js MongoDB AI-Powered

๐Ÿš€ Features

๐Ÿ“Š Core Inventory Management

  • Product Management: Add, edit, delete, and categorize products
  • Category & Subcategory System: Hierarchical organization
  • Stock Tracking: Real-time inventory levels and alerts
  • User Management: Role-based access control
  • Image Upload: Product image management

๐Ÿค– AI-Powered Features

  • Smart Chatbot: Gemini AI-powered assistant for inventory queries
  • Predictive Analytics: Advanced demand forecasting with multiple algorithms
  • Reorder Recommendations: Intelligent stock replenishment suggestions
  • Analytics Dashboard: Interactive charts and insights

๐ŸŽจ Modern UI/UX

  • Responsive Design: Mobile-first approach with Tailwind CSS
  • Dark Mode: Complete theme support with smooth transitions
  • Interactive Charts: Chart.js integration for data visualization
  • Real-time Updates: Live data refresh and notifications

๐Ÿ”ง Advanced Features

  • Multi-algorithm Forecasting: Weighted Average, Moving Average, Exponential Smoothing, Linear Regression, Seasonal
  • Confidence Intervals: Statistical accuracy metrics
  • Smart Caching: Performance optimization with intelligent caching
  • Error Handling: Comprehensive error management and user feedback

๐Ÿ—๏ธ Architecture

Backend Stack

  • Node.js with Express.js
  • MongoDB with Mongoose ODM
  • JWT Authentication for secure access
  • Multer for file uploads
  • Google Gemini AI for intelligent features

Frontend Stack

  • React 18 with functional components
  • React Router for navigation
  • Tailwind CSS for styling
  • Chart.js for data visualization
  • Context API for state management

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB (local or cloud)
  • Google Gemini API key

Backend Setup

cd backend
npm install

Create .env file:

DB_URL=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
GEMINI_API_KEY=your_gemini_api_key
PORT=5050

Frontend Setup

cd frontend
npm install

Start Development Servers

# Backend (Terminal 1)
cd backend
npm start

# Frontend (Terminal 2)
cd frontend
npm start

๐ŸŽฏ Key Features Explained

1. Predictive Analytics Dashboard

The system includes a comprehensive predictive analytics engine with:

  • 5 Forecasting Algorithms:

    • Weighted Average (50%, 30%, 20% weights)
    • Moving Average (7-day window)
    • Exponential Smoothing (ฮฑ = 0.3)
    • Linear Regression (statistical trend analysis)
    • Seasonal Forecasting (weekly patterns)
  • Smart Recommendations:

    • Urgency-based reorder suggestions
    • Cost optimization calculations
    • Stock level monitoring
    • Category-specific forecasting

2. AI-Powered Chatbot

Integrated Gemini AI assistant providing:

  • Context-Aware Responses: Remembers conversation history
  • Inventory Intelligence: Answers about products, stock, categories
  • Actionable Insights: Provides recommendations and suggestions
  • Multi-language Support: Handles various query formats

3. Responsive Design

Mobile-first approach with:

  • Collapsible Sidebar: Touch-friendly navigation
  • Adaptive Layouts: Optimized for all screen sizes
  • Dark Mode Toggle: Complete theme support
  • Smooth Animations: CSS transitions and loading states

๐Ÿ“Š API Endpoints

Authentication

POST /api/v1/user/register
POST /api/v1/user/login
POST /api/v1/user/forgot-password

Products

GET    /api/v1/product
POST   /api/v1/product
PUT    /api/v1/product/:id
DELETE /api/v1/product/:id

Categories

GET    /api/v1/category
POST   /api/v1/category
PUT    /api/v1/category/:id
DELETE /api/v1/category/:id

Predictive Analytics

GET /api/v1/predictive/forecast
GET /api/v1/predictive/forecast/category/:categoryId
GET /api/v1/predictive/reorder-recommendations
GET /api/v1/predictive/accuracy
GET /api/v1/predictive/dashboard
DELETE /api/v1/predictive/cache

Chatbot

GET  /api/v1/chat/session
POST /api/v1/chat/message
GET  /api/v1/chat/history
POST /api/v1/chat/clear

๐ŸŽจ UI Components

Dashboard Layout

  • Responsive Navigation: Collapsible sidebar with mobile overlay
  • Theme Toggle: Dark/light mode with persistent preferences
  • Breadcrumb Navigation: Clear page hierarchy
  • Loading States: Smooth loading animations

Data Visualization

  • Interactive Charts: Line, Bar, Doughnut charts
  • Real-time Updates: Live data refresh
  • Export Capabilities: JSON, CSV, PDF formats
  • Responsive Charts: Mobile-optimized visualizations

๐Ÿ”ง Configuration

Environment Variables

# Database
DB_URL=mongodb://localhost:27017/inventory

# Authentication
JWT_SECRET=your_super_secret_key

# AI Services
GEMINI_API_KEY=your_gemini_api_key

# Server
PORT=5050
NODE_ENV=development

Frontend Configuration

// API Base URL
const API_BASE_URL = 'http://localhost:5050/api/v1';

// Chart Configuration
const chartOptions = {
  responsive: true,
  maintainAspectRatio: false
};

๐Ÿš€ Performance Optimizations

Backend

  • Caching Strategy: 10-minute cache for expensive calculations
  • Database Indexing: Optimized queries for large datasets
  • Error Handling: Comprehensive error management
  • Rate Limiting: API abuse prevention

Frontend

  • Code Splitting: Lazy loading for better performance
  • Memoization: React.memo for expensive components
  • Debounced Search: Optimized search functionality
  • Image Optimization: Compressed product images

๐Ÿ“ˆ Analytics & Insights

Predictive Analytics Features

  • Demand Forecasting: Multiple algorithm support
  • Stock Optimization: Smart reorder recommendations
  • Trend Analysis: Historical data insights
  • Accuracy Metrics: MAPE-based performance tracking

Dashboard Metrics

  • Total Products: Real-time product count
  • Low Stock Alerts: Items below threshold
  • Category Distribution: Product categorization
  • Value Analytics: Total inventory worth

๐Ÿ”’ Security Features

Authentication & Authorization

  • JWT Tokens: Secure session management
  • Role-based Access: Admin, Manager, Staff roles
  • Password Hashing: bcrypt encryption
  • Input Validation: XSS and injection prevention

Data Protection

  • Environment Variables: Secure configuration
  • CORS Configuration: Cross-origin request handling
  • File Upload Security: Image validation and sanitization
  • API Rate Limiting: Abuse prevention

๐Ÿงช Testing

Backend Testing

cd backend
npm test

Frontend Testing

cd frontend
npm test

API Testing

# Test predictive analytics
curl -X GET "http://localhost:5050/api/v1/predictive/forecast" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Test chatbot
curl -X POST "http://localhost:5050/api/v1/chat/message" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"message": "How many products do we have?"}'

๐Ÿ“ฑ Mobile Responsiveness

Breakpoints

  • Mobile: < 640px
  • Tablet: 640px - 1024px
  • Desktop: > 1024px

Touch Optimizations

  • Large Touch Targets: 44px minimum
  • Swipe Gestures: Mobile navigation
  • Optimized Forms: Mobile-friendly inputs
  • Fast Loading: Optimized for slow connections

๐ŸŽฏ Use Cases

Small Business

  • Basic Inventory Tracking: Product management
  • Stock Alerts: Low stock notifications
  • Simple Analytics: Basic reporting

Medium Business

  • Predictive Analytics: Demand forecasting
  • AI Chatbot: Intelligent assistance
  • Advanced Reporting: Detailed insights

Enterprise

  • Multi-location Support: Scalable architecture
  • Advanced Analytics: Machine learning integration
  • API Integration: Third-party system connectivity

๐Ÿ”ฎ Future Enhancements

Planned Features

  1. Machine Learning Integration: TensorFlow.js for advanced predictions
  2. Real-time Notifications: WebSocket support
  3. Mobile App: React Native version
  4. Advanced Analytics: Custom reporting engine
  5. Supplier Integration: Automated ordering system

Scalability Improvements

  • Microservices Architecture: Service decomposition
  • Redis Caching: High-performance caching
  • Load Balancing: Horizontal scaling
  • Database Sharding: Large dataset handling

๐Ÿค Contributing

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

Code Standards

  • ESLint: JavaScript linting
  • Prettier: Code formatting
  • TypeScript: Type safety (future)
  • Jest: Unit testing

master

๐Ÿ“„ License

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

<<<<<<< HEAD ##Contact <<<<<<< HEAD Utpal Kumar(utpal-kumar-08) Project link :

  • Thanks to all contributors who have helped shape this project

  • Inspired by modern inventory management systems ======= Utpal Kumar Github profile: utpal-kumar-08 Project link : https://github.com/utpal-kumar-08/Inventory-Management.git

  • Thanks to all contributors who have helped shape this project

  • Inspired by modern inventory management systems

2b0a548cbe64318edfa43992eae1d820b0c45f52 =======

๐Ÿ™ Acknowledgments

  • Google Gemini AI: For intelligent chatbot capabilities
  • Chart.js: For beautiful data visualizations
  • Tailwind CSS: For responsive design framework
  • MongoDB: For flexible data storage

๐Ÿ“ž Support

Documentation

Contact


Built with โค๏ธ using React, Node.js, and AI-powered technologies

This inventory management system provides a comprehensive solution for businesses of all sizes, from small retail stores to large enterprises, with advanced features like predictive analytics and AI-powered assistance.

master

Releases

No releases published

Packages

 
 
 

Contributors

Languages