A modern, feature-rich inventory management system built with the MERN stack (MongoDB, Express, React, Node.js) and Material-UI. Perfect for small to medium businesses to track inventory, manage sales, and monitor transactions in real-time.
-
Product Management
- Add, edit, and delete products with brand and name
- Track main stock and backup quantities
- Quick Look feature for instant inventory status
- Automatic stock validation and low stock alerts
-
Search and Filter
- Flexible search with partial matching across brand and product names
- Filter products by brand, stock status, and more
- Sort products by various attributes
-
Intuitive Sales Interface
- Easy product selection with smart search
- Quick sale processing with quantity validation
- Real-time stock updates
- Automatic backup stock utilization when main stock is depleted
-
Custom Sales Records
- Custom date/time selection for sales records
- Sale confirmation with detailed summaries
- Ability to record historical sales
-
Comprehensive Transaction Logging
- All inventory changes are tracked (SALE, NEW, ADD, EDIT, DELETE, TRANSFER)
- Detailed information for each transaction
-
Advanced Filtering
- Date and time range filters
- Transaction type filters
- Employee filters
- Brand and product filters
- Reporting Tools
- Daily sales reports with copy functionality
- Download reports as images for sharing
- Delete older transactions with password confirmation
-
Secure Login System
- JWT-based authentication
- Password encryption
- Session management
-
Role-Based Access Control
- Admin and regular user roles
- Feature access based on user role
- Protected routes
-
Material Design
- Clean, intuitive interface
- Responsive layout for all devices
- Consistent design language
-
User Experience Enhancements
- Toast notifications for actions
- Loading indicators
- Confirmation dialogs for critical operations
- Form validation
- Node.js (v14 or higher)
- npm or yarn
- MongoDB
- Git
- Clone the repository
git clone https://github.com/mccharliesins/inventory-management.git
cd inventory-management- Install dependencies
npm install
# or
yarn install- Set up environment variables
Create a .env file in the root directory with the following variables:
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
PORT=5000
NODE_ENV=development
- Start the development server
# Start backend server
npm run server
# Start frontend development server
npm run client
# Run both concurrently
npm run dev-
Frontend
- React.js
- Material-UI
- React Router
- Context API for state management
- Axios for API requests
- date-fns for date manipulation
- html2canvas for report image generation
-
Backend
- Node.js
- Express.js
- MongoDB with Mongoose
- JSON Web Tokens (JWT) for authentication
- bcrypt for password hashing
-
Development Tools
- Git for version control
- ESLint for code linting
- Prettier for code formatting
- Concurrently for running multiple scripts
The application is fully responsive and works seamlessly on:
- Desktop computers
- Tablets
- Mobile phones
POST /api/auth/login- User loginPOST /api/auth/logout- User logoutGET /api/auth/current-user- Get current userPOST /api/auth/verify-password- Verify user password for sensitive operations
GET /api/products- Get all productsPOST /api/products- Add new productPUT /api/products/:id- Update productDELETE /api/products/:id- Delete productPUT /api/products/:id/stock- Update product stockPOST /api/products/sale- Record a sale
GET /api/transactions- Get all transactions with filtersPOST /api/transactions- Create new transactionGET /api/transactions/:id- Get transaction by IDDELETE /api/transactions/older-than/:days- Delete transactions older than specified days
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by Smoky Seven













