The core
app provides a custom-built query parameter token authentication system for secure user authentication and authorization. It leverages JSON Web Tokens (JWT) to ensure robust and scalable authentication mechanisms.
The users
app houses a custom-built User model, tailored to meet the specific requirements of the Vendor Management System. It also includes API endpoints for listing and retrieving user information, enabling efficient user management.
The vendors
app encompasses the Vendor model and associated API endpoints for CRUD (Create, Read, Update, Delete) functionality. It allows for seamless management of vendor information and records, including overall vendor performance tracking.
The purchase_order
app manages the Purchase Order model and provides API endpoints for CRUD operations on purchase orders. It also includes endpoints for effectively controlling the flow of purchase orders and accurately recording timestamps. Additionally, signals are implemented to control order dates and statuses automatically.
The historical_performance
app records and maintains historical performance data for vendors. It leverages Celery Beat, a periodic task scheduler, to record historical performance records every 6 hours, ensuring up-to-date and comprehensive vendor performance tracking.
To ensure proper configuration and deployment of the Vendor Management System, the following environment variables must be set up.
- Create a
.env
file at the location ofmanage.py
and populate it with the required values:
# Django settings module to be used by the application.
DJANGO_SETTINGS_MODULE=
# Flag to indicate if Django should read the .env file.
DJANGO_READ_DOT_ENV_FILE=
# Enables or disables Django's debug mode.
DJANGO_DEBUG=
# Secret key used by Django for cryptographic signing.
DJANGO_SECRET_KEY=
# URL for connecting to the Redis service, used for caching and Celery message broker.
REDIS_URL=
# URL for connecting to the PostgreSQL database.
DATABASE_URL=
# URL for the Celery message broker, using Redis.
CELERY_BROKER_URL=
# Celery flower user and password
CELERY_FLOWER_USER=
CELERY_FLOWER_PASSWORD=
# PostgreSQL database settings.
POSTGRES_HOST=
POSTGRES_PORT=
POSTGRES_DB=
POSTGRES_USER=
POSTGRES_PASSWORD=
- Create a
.envs
folder at the location ofmanage.py
and in it create.env.django
and populate it with the required values:
# Django settings module to be used by the application.
DJANGO_SETTINGS_MODULE=
# Flag to indicate if Django should read the .env file.
DJANGO_READ_DOT_ENV_FILE=
# Enables or disables Django's debug mode.
DJANGO_DEBUG=
# Secret key used by Django for cryptographic signing.
DJANGO_SECRET_KEY=
# URL for connecting to the Redis service, used for caching and Celery message broker.
REDIS_URL=
# URL for connecting to the PostgreSQL database.
DATABASE_URL=
# URL for the Celery message broker, using Redis.
CELERY_BROKER_URL=
# Celery flower user and password
CELERY_FLOWER_USER=
CELERY_FLOWER_PASSWORD=
- Create a
.envs
folder at the location ofmanage.py
and in it create.env.postgres
and populate it with the required values:
# PostgreSQL database settings.
POSTGRES_HOST=
POSTGRES_PORT=
POSTGRES_DB=
POSTGRES_USER=
POSTGRES_PASSWORD=
POST /obtain-auth-token/
- API Key Token for User Authentication
GET /users/
- List all usersGET /users/<email>/
- Retrieve a specific user
GET /vendors/
- List all vendorsPOST /vendors/
- Create a new vendorGET /vendors/{vendor_code}/
- Retrieve a specific vendorPUT /vendors/{vendor_code}/
- Update a vendorDELETE /vendors/{vendor_code}/
- Delete a vendor
GET /purchase-orders/
- List all purchase ordersPOST /purchase-orders/
- Create a new purchase orderGET /purchase-orders/<po_number>/
- Retrieve a specific purchase orderPUT /purchase-orders/<po_number>/
- Update a purchase orderDELETE /purchase-orders/<po_number>/
- Delete a purchase order
POST /purchase-orders/<po_number>/issue/
- Issue a purchase order to a vendorPOST /purchase-orders/<po_number>/acknowledge/
- Acknowledge a purchase orderPOST /purchase-orders/<po_number>/deliver/
- Deliver a purchase orderPOST /purchase-orders/<po_number>/cancel/
- Cancel a purchase orderPOST /purchase-orders/<po_number>/rate-quality/
- Assign a value for rate_quality of the purchase order