DataRohit / Vendor-Management-System

A comprehensive Django and Django Rest Framework-based Vendor Management System, featuring secure user authentication, detailed vendor and purchase order management, and robust performance tracking with Celery Beat. Easily configurable via environment variables for streamlined deployment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ”‘ Vendor Management System

Django / Django Rest Framework Based Vendor Management System

Django Django REST Framework Django CORS Headers Django Extensions Django Jazzmin Dashboard PostgreSQL OpenAPI Swagger UI Argon2 Redis Celery Celery Beat Flower PyTest Werkzeug Docker


πŸ”“ Core

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.

πŸ‘€ Users

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.

🏒 Vendors

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.

πŸ“ Purchase Orders

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.

πŸ“ˆ Historical Performance

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.


Required Environment Variables

To ensure proper configuration and deployment of the Vendor Management System, the following environment variables must be set up.

  1. Create a .env file at the location of manage.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=
  1. Create a .envs folder at the location of manage.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=
  1. Create a .envs folder at the location of manage.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=

API Endpoints

Core App

  • POST /obtain-auth-token/ - API Key Token for User Authentication

Users

  • GET /users/ - List all users
  • GET /users/<email>/ - Retrieve a specific user

Vendors

  • GET /vendors/ - List all vendors
  • POST /vendors/ - Create a new vendor
  • GET /vendors/{vendor_code}/ - Retrieve a specific vendor
  • PUT /vendors/{vendor_code}/ - Update a vendor
  • DELETE /vendors/{vendor_code}/ - Delete a vendor

Purchase Orders

  • GET /purchase-orders/ - List all purchase orders
  • POST /purchase-orders/ - Create a new purchase order
  • GET /purchase-orders/<po_number>/ - Retrieve a specific purchase order
  • PUT /purchase-orders/<po_number>/ - Update a purchase order
  • DELETE /purchase-orders/<po_number>/ - Delete a purchase order

Purchase Order Status Operations

  • POST /purchase-orders/<po_number>/issue/ - Issue a purchase order to a vendor
  • POST /purchase-orders/<po_number>/acknowledge/ - Acknowledge a purchase order
  • POST /purchase-orders/<po_number>/deliver/ - Deliver a purchase order
  • POST /purchase-orders/<po_number>/cancel/ - Cancel a purchase order
  • POST /purchase-orders/<po_number>/rate-quality/ - Assign a value for rate_quality of the purchase order

About

A comprehensive Django and Django Rest Framework-based Vendor Management System, featuring secure user authentication, detailed vendor and purchase order management, and robust performance tracking with Celery Beat. Easily configurable via environment variables for streamlined deployment.

License:MIT License


Languages

Language:Python 85.3%Language:Shell 12.0%Language:Dockerfile 2.7%