A comprehensive warehouse management solution with real-time tracking, FEFO ordering, and demand forecasting
Features β’ Tech Stack β’ Installation β’ API Documentation β’ Contributors
- About
- Features
- Tech Stack
- System Architecture
- Installation
- Configuration
- Usage
- API Documentation
- Project Structure
- Screenshots
- Contributors
- License
SmartShelf is an intelligent warehouse inventory management system designed to optimize warehouse operations through automation, predictive analytics, and real-time monitoring. It addresses critical challenges in modern warehouse management including:
- β Inventory discrepancies and manual errors
- β Product expiry and waste management
- β Inefficient task allocation
- β Lack of predictive capabilities
- β Limited real-time visibility
- Secure JWT-based authentication
- Role-based access control (Admin, Manager, Worker)
- Password encryption using bcrypt
- Session management
- Real-time tracking of inventory items
- CRUD operations with full data validation
- Category-based filtering and search
- Multi-field search (product name, SKU, supplier)
- Inventory analytics with KPIs
- First Expired, First Out algorithm implementation
- Automatic prioritization based on expiry dates
- Urgency levels: Critical (β€3 days), High (β€7 days), Medium (β€14 days), Low (>14 days)
- Visual indicators for quick identification
- 7-day demand projections based on historical data
- Daily consumption rate calculations
- Trend indicators: Stable, Normal, Critical
- Product-wise forecast visualization
- Interactive forecast graphs
- Real-time notifications for critical events
- Live alert feed with human-readable messages
- Alert categories:
- π΄ Expired items
- π Expiring soon (within 7 days)
- π‘ Low stock (below threshold)
- β« Out of stock
- Task creation and assignment to workers
- Status tracking: Pending β In Progress β Completed
- Real-time task updates
- Task completion analytics
- Worker-specific task views
- Admin Dashboard: System-wide overview and user management
- Manager Dashboard: Live alerts, forecasting, FEFO ordering, top products
- Worker Dashboard: Assigned tasks with quick status updates
- Responsive design with dark mode support
- Modern, intuitive interface built with React + TypeScript
- Tailwind CSS for responsive design
- Dark mode support
- Mobile-friendly layouts
- Smooth animations and transitions
- React 18 - UI library with hooks
- TypeScript - Type safety
- Tailwind CSS - Utility-first styling
- Vite - Fast build tool
- React Context API - State management
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- bcrypt - Password hashing
- Git - Version control
- VS Code - Code editor
- Postman - API testing
- MongoDB Compass - Database management
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT TIER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β React + TypeScript Frontend (SPA) β β
β β β’ Component-based architecture β β
β β β’ React Context for state management β β
β β β’ Tailwind CSS for styling β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HTTP/HTTPS
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β APPLICATION TIER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Node.js + Express.js Backend (API) β β
β β β’ RESTful API endpoints β β
β β β’ JWT authentication middleware β β
β β β’ Role-based authorization β β
β β β’ Business logic & algorithms β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Mongoose ODM
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA TIER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β MongoDB Database (NoSQL) β β
β β β’ Collections: Users, Inventory, Tasks β β
β β β’ Indexes for query optimization β β
β β β’ Document-based storage β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Ensure you have the following installed:
- Node.js (v18 or higher) - Download
- MongoDB (v6 or higher) - Download
- Git - Download
- npm or yarn package manager
git clone https://github.com/namish18/SmartShelf.git
cd SmartShelf# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with your configuration
# Add MongoDB connection string and JWT secret
# Start development server
npm run dev# Navigate to frontend directory (from root)
cd ../frontend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with backend API URL
# Start development server
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend: http://localhost:5000
Create a .env file in the backend directory:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/smartshelf
# Or use MongoDB Atlas:
# MONGODB_URI=mongodb+srv://username:[email protected]/smartshelf
# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_here_minimum_32_characters
JWT_EXPIRE=24h
# CORS Configuration
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000Create a .env file in the frontend directory:
# API Configuration
VITE_API_URL=http://localhost:5000/api# Start MongoDB service
# Windows
net start MongoDB
# macOS/Linux
sudo systemctl start mongod- Create account at MongoDB Atlas
- Create a cluster
- Get connection string
- Update
MONGODB_URIin backend.env
| Feature | Admin | Manager | Worker |
|---|---|---|---|
| Dashboard Overview | β | β | β |
| View Inventory | β | β | β |
| Add/Edit Inventory | β | β | β |
| Delete Inventory | β | β | β |
| User Management | β | β | β |
| Create Tasks | β | β | β |
| View All Tasks | β | β | β |
| View My Tasks | - | - | β |
| Update Task Status | β | β | β |
| View Analytics | β | β | β |
| FEFO Ordering | β | β | β |
| Demand Forecast | β | β | β |
http://localhost:5000/api
All authenticated endpoints require a JWT token in the Authorization header:
Authorization: Bearer <your_jwt_token>
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /auth/register |
Register new user | β |
| POST | /auth/login |
Login user | β |
| GET | /auth/me |
Get current user | β |
| POST | /auth/logout |
Logout user | β |
| Method | Endpoint | Description | Auth | Role |
|---|---|---|---|---|
| GET | /users |
Get all users | β | Admin |
| POST | /users |
Create user | β | Admin |
| PUT | /users/:id |
Update user | β | Admin |
| DELETE | /users/:id |
Delete user | β | Admin |
| GET | /users/workers |
Get all workers | β | Manager/Admin |
| Method | Endpoint | Description | Auth | Role |
|---|---|---|---|---|
| GET | /inventory |
Get all items | β | All |
| GET | /inventory/:id |
Get item by ID | β | All |
| POST | /inventory |
Create item | β | Manager/Admin |
| PUT | /inventory/:id |
Update item | β | Manager/Admin |
| DELETE | /inventory/:id |
Delete item | β | Manager/Admin |
| GET | /inventory/analytics/summary |
Get inventory summary | β | All |
| GET | /inventory/analytics/by-category |
Get category analytics | β | All |
| Method | Endpoint | Description | Auth | Role |
|---|---|---|---|---|
| GET | /tasks |
Get all tasks | β | Manager/Admin |
| GET | /tasks/my-tasks |
Get my tasks | β | Worker |
| POST | /tasks |
Create task | β | Manager/Admin |
| PUT | /tasks/:id |
Update task | β | Manager/Admin |
| PATCH | /tasks/:id/status |
Update status | β | Worker/Manager/Admin |
| DELETE | /tasks/:id |
Delete task | β | Manager/Admin |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /alerts/low-stock |
Get low stock alerts | β |
| GET | /alerts/expiring-soon |
Get expiring soon alerts | β |
| GET | /alerts/critical |
Get critical alerts | β |
| GET | /alerts/summary |
Get alert summary | β |
| Method | Endpoint | Description | Auth | Role |
|---|---|---|---|---|
| GET | /analytics/demand-forecast |
Get demand forecast | β | Manager/Admin |
| GET | /analytics/fefo-ordering |
Get FEFO ordering | β | Manager/Admin |
| GET | /analytics/top-selling |
Get top selling products | β | Manager/Admin |
| GET | /analytics/notification-alerts |
Get notification alerts | β | Manager/Admin |
POST /api/auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "[email protected]",
"password": "password123",
"role": "Worker"
}POST /api/inventory
Authorization: Bearer <token>
Content-Type: application/json
{
"productName": "Fresh Milk",
"category": "Dairy",
"sku": "DA-001",
"quantity": 150,
"purchaseDate": "2025-11-01",
"expiryDate": "2025-11-15",
"supplier": "Local Dairy Farm"
}POST /api/tasks
Authorization: Bearer <token>
Content-Type: application/json
{
"description": "Inspect expired items in dairy section",
"assignedTo": "673ab12c5f8e9a001234abcd"
}For complete API documentation, refer to the API Documentation Chapter in the project report.
SmartShelf/
βββ backend/
β βββ src/
β β βββ controllers/ # Request handlers
β β β βββ authController.js
β β β βββ userController.js
β β β βββ inventoryController.js
β β β βββ taskController.js
β β β βββ alertController.js
β β β βββ forecastController.js
β β β βββ analyticsController.js
β β βββ models/ # Database models
β β β βββ User.js
β β β βββ Inventory.js
β β β βββ Task.js
β β βββ routes/ # API routes
β β β βββ authRoutes.js
β β β βββ userRoutes.js
β β β βββ inventoryRoutes.js
β β β βββ taskRoutes.js
β β β βββ alertRoutes.js
β β β βββ analyticsRoutes.js
β β βββ middlewares/ # Custom middleware
β β β βββ authMiddleware.js
β β β βββ roleMiddleware.js
β β β βββ errorHandler.js
β β βββ utils/ # Utility functions
β β β βββ responseHelper.js
β β β βββ validators.js
β β βββ config/ # Configuration
β β β βββ database.js
β β βββ app.js # Express app setup
β βββ .env # Environment variables
β βββ .env.example # Example env file
β βββ package.json
β βββ server.js # Entry point
β
βββ frontend/
β βββ components/ # Reusable components
β β βββ Modal.tsx
β βββ pages/ # Page components
β β βββ LoginPage.tsx
β β βββ RegistrationPage.tsx
β β βββ MainLayout.tsx
β β βββ AdminDashboard.tsx
β β βββ ManagerDashboard.tsx
β β βββ WorkerDashboard.tsx
β β βββ InventoryPage.tsx
β β βββ UserManagementPage.tsx
β β βββ TaskManagementPage.tsx
β βββ contexts/ # React contexts
β β βββ ThemeContext.tsx
β βββ services/ # API services
β β βββ apiClient.ts
β β βββ authService.ts
β β βββ inventoryService.ts
β β βββ taskService.ts
β β βββ userService.ts
β β βββ alertService.ts
β βββ config/ # Frontend config
β β βββ api.ts
β βββ types.ts # TypeScript types
β βββ constants.tsx # Constants & icons
β βββ App.tsx # Main app component
β βββ index.tsx # Entry point
β βββ index.css # Global styles
β βββ .env # Environment variables
β βββ .env.example # Example env file
β βββ package.json
β βββ tailwind.config.js
β βββ tsconfig.json
β βββ vite.config.ts
β
βββ docs/ # Documentation
β βββ API_DOCUMENTATION.md
β βββ PROJECT_REPORT.docx
β
βββ .gitignore
βββ LICENSE
βββ README.md
Namish Kumar Sahu Backend Development & API Design |
Turanya Mishra Frontend Development & UI/UX |
Shiba Prasad Gochhayat Database Design & Algorithms |
Biju Patnaik University of Technology (BPUT)
Department of Computer Science & Engineering
Center for Under Graduate & Post Graduate Studies
Rourkela, Odisha - 769015
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Namish Kumar Sahu, Turanya Mishra, Shiba Prasad Gochhayat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
For queries or feedback:
- GitHub: @namish18
- Project Repository: SmartShelf
- IoT sensor integration (RFID, weight sensors)
- Advanced ML models (LSTM, Prophet) for forecasting
- Barcode/QR code scanning
- Native mobile applications (iOS/Android)
- Multi-warehouse support
- Supplier API integration
- Email/SMS notifications
- Blockchain for supply chain traceability
- Voice command interface
- Advanced reporting and analytics