The Wholesale Delivery Management App is designed to facilitate the efficient distribution of goods from wholesalers to retail vendors. It enables truck drivers to manage orders and track vendor-related information. The system is accessible by Admin and Truck Drivers (TD).
- Admin: Responsible for system management and configuration.
- Truck Drivers (TD): Responsible for order management and delivery.
- Login: Admin can log in using their mobile number and password.
- Vendor Management: Admin can create , read , update and delete Vendors.
- Category Management: Admin can create , read , update and delete product categories.
- Product Management: Admin can create , read , update and delete products.
- Driver Management: Admin can read , update and delete driver profile.
- Order Management: Admin can read , approve and cancel orders.
- Login: TDs can log in using their mobile number and password.
- Choose Vendor: TDs can select a vendor from a list.
- Choose Product: TDs can select a product from a list.
- Profile Management: TDs can view, update and delete profile.
- Cart Management: TDs can add products (for retail vendors) to a cart with quantities and finalize the order.
- Order Management: TDs can create or make, view, cancel orders.
- Admin Registration: Admin can register and access the system.
- Create, Read, Update, Delete (CRUD): Drivers can register and access the system. Driver and Admin can manage Truck Driver profiles, including name, mobile number, address, and driving license details.
- Create, Read, Update, Delete (CRUD): Admin can manage Vendor profiles, including name, location, contact information, email.
- Create, Read, Update, Delete (CRUD): Admin can manage the product inventory, including product name, price, category, and image.
- Create, Read: Admin and TDs can manage orders. Each order contains:
- Products: A list of products in the order.
- Truck Driver: Foreign key of truck driver.
- Vendor details: Foreign key of vendor.
- Total bill amount.
-
Input Validation: Implement robust input validation for all updates and create methods to prevent data errors and enhance security.
-
Password Encryption: Ensure that sensitive information, such as passwords, is securely stored by implementing strong encryption mechanisms.
-
Authentication and Authorization: Implement authentication and authorization mechanisms using JWT (JSON Web Tokens) to secure access to the application's endpoints and resources, ensuring that only authorized users can perform specific actions.
Follow the instructions below to get started with the Wholesale Delivery Management App.
-
Clone the repository:
git clone https://github.com/pv-kiran/deliverymanagement-api.git
-
Change into the project directory :
cd deliverymanagement-api
-
Install dependencies:
npm install
To run this project, you will need to set up the following environment variables in a .env
file located in the root directory of the project:
-
MONGO_URL: Replace with your MongoDB connection URL.
-
SECRET_KEY: Set a secret key for JWT token generation and validation.
-
CLOUDINARY_NAME: Your Cloudinary account's cloud name.
-
CLOUDINARY_API_KEY: Your Cloudinary account's API key.
-
CLOUDINARY_SECRET: Your Cloudinary account's API secret.
- Start the application:
npm start