Qwicker backend is a comprehensive RESTful API backend designed to support applications for fast item delivery services, similar to Lalamove. It offers a wide range of features including user management, job registration, auction systems, system administration, and detailed data analytics
For a comprehensive user interface to interact with the Qwicker backend, check out my React Native client application repository here.
For a comprehensive demo, you can watch the full video on YouTube by clicking on the link provided here.
- 🏛️Architecture diagram
- 🏛️Database schema diagram
- 🛠️Prerequisites
- 🚀Getting Started
- 📊Admin Interface
- 🔧Configure Environment Variables
- 🔗References
- 📧Contact
- User Management: Users can log in with roles such as admin, shipper, and regular user.
- User and Shipper Registration: Users and shippers can register accounts, with shippers required to provide an avatar and identification information. Shipper accounts need to be confirmed by the admin.
- Admin Management: Admins can add, delete, and update shipper information and promotional services. Admins can also view lists of pending shipping orders without assigned shippers.
- Shipper Information Viewing: Users can view shipper profiles and details, including community ratings.
- Item Posting: Users can post items they want to ship, and shippers can bid to secure the delivery rights.
- Auction and Shipper Selection: Users choose shippers through auctions, with only the owner of the post seeing the auction details. When a shipper is selected, the system automatically sends notification emails to the chosen shipper and rejection emails to other bidders.
- Rating and Commenting: Users can rate and comment on shippers within the system.
- Order Recording and Notification: Shippers can record completed shipping orders, triggering email notifications to customers.
- Online Payment with VNPay: Users can make online payments through VNPay, providing a convenient and secure payment method.
- System Administration: Admins can view order information and use various search methods by date, product, and generate charts for delivery frequency and revenue.
What you need to run the project:
- Docker - Install Docker to run the project locally without the need to install additional dependencies. Run without docker:
- Postman - Install Postman to interact with the API endpoints.
After installing Docker, run the following commands to start experiencing this project:
# download the project
git clone https://github.com/Theanhmgt/qwicker-django-backend.git
cd qwicker-django-backend
# build container
docker compose build
# run container
docker compose up
At this time, you have a RESTful API server running at http://127.0.0.1:8000 or accessing the Swagger UI for interactive API documentation by navigating to http://127.0.0.1:8000/swagger.
# authenticate the user via: POST /auth/token/
curl -X POST -H "Content-Type: application/json" -d '{"username": "theanh1", "password": "Theanh28", "grant_type": "password"}' http://localhost:8000/auth/token/
# should return a token like: { "access_token": "...access token here...","refresh_token": "...refresh token here..."}
# with the above token, access the album resources, such as: GET /jobs/
curl -X GET -H "Authorization: Bearer ...access token here..." http://localhost:8000/jobs/
# should return a list of posting job in the JSON format
Access the admin page by visit to http://127.0.0.1:8000/admin/ and logging in with the username admin
and password theanh28
to perform system management functions and data analysis
To utilize all features of the project, including sending emails and online payments, make sure to set up all necessary environment variables in the .env
file in the root directory of the project. Refer to the project documentation for guidance on setting up these variables.
📩 Gmail smtp config:
EMAIL_BACKEND
: 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
: Hostname for the SMTP server (e.g., 'smtp.gmail.com')..
EMAIL_PORT
: Port number of the SMTP server (e.g., 587 for TLS)..
EMAIL_HOST_USER
: Username for the SMTP server (e.g., [email protected])..
EMAIL_HOST_PASSWORD
: Password for the SMTP server.
DEFAULT_FROM_EMAIL
: Default sender email address for outgoing emails (e.g., 'THEANH MGT | TheCodeSpace [email protected]')..
To obtain EMAIL_HOST_PASSWORD
variable, following this post.
💳VNPay config:
VNPAY_TMN_CODE
= TMN code for the VNPay API
VNPAY_HASH_SECRET_KEY
= Secret key for hashing data when communicating with VNPAY
VNPAY_PAYMENT_URL
= 'https://sandbox.vnpayment.vn/paymentv2/vpcpay.html'
VNPAY_RETURN_URL
= 'http://127.0.0.1:8000/vnpay/payment_return/'
Register here to receive a detailed email, sandbox account, and essential keys.
Here are some helpful resources and references for further information:
Don't hesitate to contact me if you have any confusion or questions