Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielshow/inventory_system
https://github.com/danielshow/inventory_system
api javascript nodejs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/danielshow/inventory_system
- Owner: Danielshow
- Created: 2020-02-04T15:30:12.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2023-02-28T20:38:33.000Z (almost 2 years ago)
- Last Synced: 2023-03-02T09:15:59.447Z (almost 2 years ago)
- Topics: api, javascript, nodejs
- Language: JavaScript
- Size: 615 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Inventory System
Build a Simple Inventory Management System API# Requirement
Using the CRUD HTTP API over a local MongoDB instance as your database back-end, build a logging API for supermarket purchase receipts that has the following functionality:
## Prerequisites
1. [Node js](https://nodejs.org/en/)
2. [Postman](https://www.getpostman.com/) To test the endpoints
3. Any text Editor
4. [Git](https://git-scm.com/downloads)
4. Local MongoDB instance## Installing
Clone this project
```shell
npm install
npm start
```
make your environment variable `.env file`
Fill in this data for mongodb
```
server=
database=
```## Test
```shell
No test for now
```## Features
- Ability to log purchase receipts
- Ability to query DB for total sales in a given month
- Ability to query DB for complete product list
- Ability to add/modify/delete products
- Ability to query DB for monthly sales by product## API Routes
| HTTP verb | Routes | Description |
|-----------| ------------- | ------------- |
| GET | /api/v1/products | Get all products |
| POST | /api/v1/products/add | add a product - params [name, amount]|
| DELETE | /api/v1/products/:id | Delete a specific product by id |
| PUT | /api/v1/products/:id | Update a particular product [name, amount] |
| POST | /api/v1/purchase/:id | Purchase a product and get receipt [quantity] |
| GET | /api/v1/total | Get total sale in a month [takes a query params month] |
| GET | /api/v1/month | get monthly sale by product [takes a query param product]|