Welcome to the Advanced Inventory Management API!
This project is a RESTful API service that allows product inventory management with additional complexity in data retrieval.
The service handles CRUD operations across products, sales and suppliers and provides an endpoint for a complex report that aggregates data in a specific way, such as calculating replenishment needs based on historical sales data.
This application includes the following features:
- CRUD for products
- CRUD for suppliers
- CRUD for sales
- Complex report with calculation replenishment needs based on historical sales data
To get started with this project, follow these instructions:
- Clone the repository:
git clone https://github.com/msalvatti/aima.git
- Navigate to the project directory:
cd aima
- Install dependencies:
npm install
- Create the docker image for database - (Make sure you have the docker app installed and started)
npm run docker:create
- Start the docker image of database - (Make sure you have the docker app installed and started)
npm run docker:start
- Configure .env file:
Use the .env.example file to create .env file, fill the variables according the variables descriptions.
- Create the database
npm run createdb
- Create the migration
npm run migratedb
- Populate the database
npm run seeddb
- Build application:
npm run build
- Run tests:
npm test
- Run application:
npm run start
- Use the postman collection
In the postman folder, the collection and environment was made available to test all endpoints through postman, just import the collection file and import the environment file into your postman to use it.