Is a simple inventory management app to do the following:
- Add new items to the inventory.
- Update a specific item.
- Delete a specific item
- List all items
- Get a specific item
- Let Items go in: add item quantity of an existing item
- Let items come out: take items of the inventory
Technologies:
Nodejs, MongoDB, Angular, Mongoose, AWS ( Lambda - API Gateway), Serverless(serverless-stack.com)
To run this application, you have to create AWS account, and cache credentials as the following :
> serverless config credentials --provider aws --key KKKKK --secret XXXXX
> git clone https://github.com/elbassel/simple-inventory-app-serverless.git
> cd simple-inventory-app-serverless
>npm install
> serverless deploy
APIs:
- GET /items to get all items
- Get /items/:id to get items by ID
- PUT /items/:id to update an item
- Post /items to create an item
- Patch /items/:id/quantity?operation=goIn|comeOut
- to let items go in inventory or come out of inventory
Then you will notice the functions are deployed and their APIs are listed in the terminal.
You can find the front end part here:
https://github.com/elbassel/simple-inventory-app/tree/master/front-end
To be able to run the front end get the frontend folder:
> git clone https://github.com/elbassel/simple-inventory-app.git
> cd front-end
> npm install
Then get the API base from the terminal when you tried to run serverless backend functions.
Replace the host variable the API base route of the serverless backend app:
File: simple-inventory-app>front-end>src>app>item-service
Then run > ng serve