The Inventory Management System is a full-stack application designed to streamline the management of warehouses, products, and inventory. The application supports multiple user roles: USER, ADMIN, and MANAGER, each with specific permissions and capabilities.
- Login/Signup for all roles (USER, ADMIN, MANAGER) using:
- Name
- Password
- Role
- Create and manage warehouses.
- Attributes:
name
,location
,managerID
- Attributes:
- Create and manage products.
- Attributes:
name
,price
- Attributes:
- Manage inventory using the stack schema.
- Attributes:
warehouseId
,productId
,quantity
,lowStackThreshold
- Attributes:
- Access and view relevant information as per assigned role permissions.
{
name: String,
email: String,
password: String,
role: String // Possible values: "USER", "ADMIN", "MANAGER"
}
{
name: String,
location: String,
managerID: String // ID of the assigned manager
}
{
name: String,
price: Number
}
{
warehouseId: String, // ID of the warehouse
productId: String, // ID of the product
quantity: Number, // Available quantity in stock
lowStackThreshold: Number // Threshold for low stock alerts
}
Ensure you have the following installed:
- Node.js
- MongoDB (or your preferred database)
-
Clone the repository:
git clone <repository-url>
-
Navigate to the project directory:
cd inventory-management-system
-
Install dependencies:
npm install
-
Set up environment variables in a
.env
file:PORT=5000 MONGO_URI=your_mongodb_connection_string MAIL_USER = "johndoe@example.com" MAIL_PASS = "password123" FE_BASE_URL = "http://localhost:3000" REFRESH_TOKEN = "refreshtoken"; ACCESS_TOKEN = "accesstoken"
-
Start the server:
npm run local npm run dev npm run prod
- POST
/users/
- Register a new user. - POST
/auth/login
- Login to the system. - POST
/auth/logout
- Logout from the system. - POST
/auth/forgot-password
- Email the User to reset password. - POST
/auth/reset-password
- Reset the Password. - POST
/auth/refresh-token
- regenerate access token
- POST
/warehouse
- Create a new warehouse. - GET
/warehouse
- List all warehouses. - GET
/warehouse/:id
- View a specific warehouse.
- POST
/inventory
- Create a new product. - GET
/inventory
- List all products.
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JSON Web Tokens (JWT), Nodemailer
This project is licensed under the MIT License.
Contributions are welcome! Feel free to fork the repository and submit a pull request.
For any queries or issues, please contact:
- Manav Jain
- Email: manavjain@example.com