QMS (Queue Management System) This project is aimed to optimize the current queue system being used in retail stores, fast food restaurants and other institutions where long queues are present. Instead of standing in long queues, the software attempts to provide a way by which the customer can book their place in the queue and can estimate the expected duration of his turn while being in a comfortable place. This project is built as a website. The user can use their mobile phone to scan a QR code and be redirected to a webpage which will be used to register the user into the queue and provide them with a token number. A confirmation of their registration will also be sent to their mobile number as SMS and their email address. Following registration, the user will be sent to a webpage where they can check their position and counter number using token number. The user will also be notified through SMS and email when its their turn.
Dynamic queue allocation This algorithm works whenever the 'next customer' button is clicked by any employee which rearranges the queue accordingly. It finds the largest and smallest queue and transfers some people from the largest to the smallest queue if the new position of the person would be better than before. For example, if smallest queue has 3 people in it, the algorithm will find the largest queue, say queue of length 7. The person at position (3 + 2) of largest queue will be transferred to last position (3 + 1) of smallest queue and so on. It will work till the condition is satisfied i.e. length of largest queue > length of smallest queue + 1.
Consider there are 2 counters, one counter attended people faster than the other. Now, 1st counter has 2 people and 2nd counter has 6 people in it. Hence, we can transfer 2 people from 2nd counter to 1st counter to balance it out. But the question is which 2 out of those 6 people. If we take the last 2, it would be easier to implement but unfair to the people who came before them.
So, the algorithm will work in the following way:
The 4th and 5th person of 2nd queue will be assigned 3rd and 4th position of 1st counter and the 6th person of counter 2 will naturally get the 4th position of counter 2.
Customer side The software is able to perform the following operations:
Register user: The software is able to register user by asking their name, phone number and email address. The user will receive an OTP on their phone via SMS and email. OTP can minimize the risk of fraudulent login attempts. Only one phone number can be registered at a time. This page can be accessed at http://127.0.0.1:8000/ if you localhost it. Twilio API is used to send SMS and smtplib module is used to send emails. I have left the variables for both as a blank string at top in views.py file. You need to fill those details if you want to use them. I have also commented the codes in the same file at lines 90-104, 142-156, 290-304. If you want to use the SMS or email privileges, you need to fill details at line 10-19 and uncomment those lines. You might also need to lower the security of your email account for it to work. Compiling twilio and smtplib codes in a seperate file is suggested before moving on to views.py file.
Provide token number: It provides the customer with a unique token number that distinguishes one record from all others. The token number starts with one and increments by one. It will start with one again if the system is restarted. Assign counter: It can assign user a counter with the smallest queue, given there are more than one counter present at the location. The assigned counter number might change later as the queue is dynamic. More explaination in the #employee side.
Check queue status: The software provides a way for user to check their assigned counter number and position in queue.
Notify turn: The software is able to notify the user when it’s their turn to reach the assigned counter through SMS and email. use html,css,javascript,bootstrap,jquery
I'll create a Queue Management System (QMS) web application with the features you described. Let's build this step by step.
Customer Registration
Queue Status Checking
Employee Dashboard
Dynamic Queue Allocation Algorithm
Notification System
The application simulates the backend functionality for demonstration purposes. In a production environment, you would connect these components to actual backend services for:
To test the application, you can use the employee login with username "admin" and password "admin" to access the dashboard and see the queue management system in action.
add qr code
I'll add QR code generation functionality to the Queue Management System. This will allow employees to generate and display QR codes that customers can scan to join the queue.
I've added comprehensive QR code functionality to the Queue Management System:
Implemented a QR code generator that allows employees to:
/qr
page that handles QR code scansFor Employees:
For Customers:
This implementation fulfills the requirement mentioned in your original specification about customers scanning QR codes to join the queue instead of standing in line.