This project is a backend system for managing inventory and sales for a small shop. It provides functionality to:
- Add items to the inventory
- Create and manage sales bills
- Update inventory automatically when a bill is created
- Retrieve inventory and bill details
Built with Node.js, Express, and MongoDB, this system ensures seamless integration between inventory management and sales tracking.
-
Inventory Management:
- Add new inventory items
- Retrieve all items
- Update item details
- Get details of specific inventory item
- Delete items
-
Sales Management:
- Create sales bills
- Retrieve all bills
- Get details of specific bills
-
Automatic Inventory Update:
- Automatically subtract sold items from inventory
-
Clone the repository:
git clone https://github.com/ishasinghh/Shop-Inventory-System.git
-
Navigate to the project directory:
cd shop-inventory-system
-
Install dependencied
npm install
-
Create a
.env
file:- Copy
.env.example
to.env
and update with your environment variables.
- Copy
-
Run the application:
npm start
-
Swagger documentation is available at http://localhost:3000/api-docs for a detailed overview of the API endpoints and their usage.
-
Once the application is running, you can access the API endpoints at http://localhost:3000.
POST /inventories
- Add a new itemGET /inventories
- Retrieve all itemsGET /inventories/:id
- Retrieve all itemsPUT /inventories/:id
- Update an itemDELETE /inventories/:id
- Delete an item
POST /bills
- Create a new billGET /bills
- Retrieve all billsGET /bills/:id
- Retrieve a specific bill