<<<<<<< HEAD
-
Clone the repository
git clone https://github.com/yourusername/inventory-management-system.git cd inventory-management-system
-
Install dependencies
npm install
-
Set up MongoDB
- Make sure MongoDB is installed and running on your machine.
-
Start the server
nodemon app.js
-
Access the application
- The server will be running on http://localhost:3000
POST /users/signup
- Sign up a new userPOST /users/login
- Log in a userPOST /users/verify-code
- Verify email with the code sent
POST /products/add
- Add a new productGET /products
- Get all products for the logged-in userPUT /products/:id
- Update a product by IDDELETE /products/:id
- Delete a product by ID
POST /locations/add
- Add a new locationGET /locations
- Get all locations for the logged-in userDELETE /locations/:id
- Delete a location by ID
-
Sign up
- Send a POST request to
/users/signup
withname
,email
,password
, andconfirmPassword
in the request body. - You will receive a verification code via email.
- Send a POST request to
-
Verify Email
- After signing up, you will be redirected to the email verification page.
- Enter the verification code sent to your email in the provided form.
- Send a POST request to
/users/verify-code
withemail
andverificationCode
in the request body to verify your email.
-
Log in
- Send a POST request to
/users/login
withname
andpassword
in the request body.
- Send a POST request to
-
Add Location
- Send a POST request to
/locations/add
withname
in the request body.
- Send a POST request to
-
Add Product
- Send a POST request to
/products/add
withname
,description
,location
,icon
, andquantity
in the request body.
- Send a POST request to
-
Get Locations
- Send a GET request to
/locations
.
- Send a GET request to
-
Get Products
- Send a GET request to
/products
.
- Send a GET request to
-
Update Product
- Send a PUT request to
/products/:id
with the updated fields in the request body.
- Send a PUT request to
-
Delete Product
- Send a DELETE request to
/products/:id
.
- Send a DELETE request to
-
Delete Location
- Send a DELETE request to
/locations/:id
.
- Send a DELETE request to
Feel free to submit pull requests and report issues. For major changes, please open an issue first to discuss what you would like to change.