A Vendor Management System(VMS) apis for efficient vendor profile management, purchase order tracking, and vendor performance metrics calculation.
-
Vendor Profile Management:
- Create, retrieve, update, and delete vendor profiles.
- Track vendor information including name, contact details, address, and a unique vendor code.
-
Purchase Order Tracking:
- Create, retrieve, update, and delete purchase orders.
- Track purchase order details such as PO number, vendor reference, order date, items, quantity, and status.
-
Vendor Performance Evaluation:
- Calculate vendor performance metrics, including on-time delivery rate, quality rating average, average response time, and fulfillment rate.
- Retrieve performance metrics for a specific vendor.
To access the project plan, please visit the following URL: Vendor Hub API
-
Clone the repository:
git clone https://github.com/bhaveshdev09/vendor-hub-api.git backend cd backend
-
Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
-
Apply database migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Set the environment variables
Please refer .env.example for must have variables
-
Access the application at http://localhost:8000.
Below is a summary of the available API endpoints:
Vendor Profile Management
Endpoint | Method | Description |
---|---|---|
/api/vendors/ |
POST | Create a new vendor. |
/api/vendors/ |
GET | List all vendors. |
/api/vendors/{id}/ |
GET | Retrieve a specific vendor's details. |
/api/vendors/{id}/ |
PUT / PATCH | Update a vendor's details. |
/api/vendors/{id}/ |
DELETE | Delete a vendor. |
Purchase Order Tracking
Endpoint | Method | Description |
---|---|---|
/api/purchase_orders/ |
POST | Create a purchase order. |
/api/purchase_orders/ |
GET | List all purchase orders. |
/api/purchase_orders/{id}/ |
GET | Retrieve details of a specific purchase order. |
/api/purchase_orders/{id}/ |
PUT / PATCH | Update a purchase order. |
/api/purchase_orders/{id}/ |
DELETE | Delete a purchase order. |
/api/purchase_orders/{id}/acknowledge |
PUT / PATCH | Acknowledge a purchase order. |
Vendor Performance Evaluation
Endpoint | Method | Description |
---|---|---|
/api/vendors/{id}/performance |
GET | Retrieve a vendor's performance metrics. |
/api/vendors/{id}/performance/history |
GET | Retrieve a vendor's performance history. |
Additional Docs
Endpoint | Method | Description |
---|---|---|
/api/vendors/{id}/performance/schema/doc/ |
GET | List all the apis in Open API3 documentation format. |
/api/vendors/{id}/performance/schema/doc/ |
GET | List all the apis in Open API3 detailed documentation format. |
Run the tests using the following command:
python manage.py test
To check coverage report of the entire codebases try this command:
coverage run manage.py test
# to get the coverage report on command line
coverage report -m
# To get the html report of code coverage try this
coverage html
Inputs and contributions to this project are appreciated. To make them as transparent and easy as possible, please follow this steps:
-
- Fork the repository and create your branch from master with different name.
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request
- Don't include any license information when submitting your code as this repository is MIT licensed, and so your submissions are understood to be under the same MIT License as well.
-
- Open a new Issue.
- Write a bug report with details, background, and when possible sample code. That's it!
This project is licensed under the MIT License.