The QueueLess Backend handles queue management and real-time updates for the QueueLess platform. It provides APIs that allow the frontend to show current queue status, customer positions, and notifications.
QueueLess Backend is built to support smooth queue operations for businesses and customers. It keeps queue information accurate and up to date so users can monitor progress remotely.
- Manage queues in real time
- Track customer positions
- Send notifications when it is a customer's turn
- Provide APIs for frontend integration
Supports the frontend by keeping queue data accurate and updated, helping businesses manage queues efficiently and customers track their turn remotely.
- Django
- Django REST Framework
- django-cors-headers
- Channels
- Python 3.10+
- pip
- Clone the repository.
- Create and activate a virtual environment.
- Install dependencies.
- Create local environment variables.
- Run migrations.
- Start the development server.
python -m venv venvWindows PowerShell:
venv\Scripts\activateWindows Command Prompt:
venv\Scripts\activate.batmacOS/Linux:
source venv/bin/activatepip install -r requirements.txtCopy the example environment file and customize values as needed.
Windows PowerShell:
Copy-Item .env.example .envmacOS/Linux:
cp .env.example .envMinimum variables for local development are documented in .env.example.
Mock institution and queue simulation routes are controlled by ENABLE_MOCK_API.
ENABLE_MOCK_API=Trueenables/api/and/api/queue/mock routes.ENABLE_MOCK_API=Falsedisables these mock routes.
If not set, ENABLE_MOCK_API defaults to the value of DEBUG.
For deployed environments, set ENABLE_MOCK_API=False unless mock endpoints are
explicitly required.
The institution list used by these mock routes is simulated until a real institution API is integrated. For the full list of available endpoints and load-profile details, see API_ENDPOINTS.md.
See MOCK_QUEUE_OPERATIONS.md for how to seed, join, poll, and advance the mock queue.
cd queueless_backend
python manage.py makemigrations
python manage.py migrateNote: All remaining commands in this guide should be run from the queueless_backend directory.
python manage.py runserverThe API will be available at:
http://127.0.0.1:8000/
ci.ymlruns Django system checks and tests on pushes and pull requests.pre-commit.ymlruns formatting and lint checks on pull requests.
This project uses pre-commit as the Python-native alternative to Husky.
pip install pre-commit
pre-commit install
pre-commit run --all-filespytestruns the automated test suite.blackformats Python code.isortsorts imports.flake8checks for lint issues.
Run them locally with:
pytest
black .
isort .
flake8pytest works out of the box in this repository because
DJANGO_SETTINGS_MODULE is already configured in pyproject.toml.
If you run tests with a non-standard runner or custom shell setup, use this fallback:
Windows PowerShell:
$env:DJANGO_SETTINGS_MODULE = "queueless_backend.settings"
pytestWindows Command Prompt:
set DJANGO_SETTINGS_MODULE=queueless_backend.settings
pytestmacOS/Linux:
export DJANGO_SETTINGS_MODULE=queueless_backend.settings
pytestQueueLess-Backend/
queueless_backend/
manage.py
mock_api/
notifications/
queue_tracker/
queueless_backend/
- If you add new apps (like
queue_tracker), register them inINSTALLED_APPSinqueueless_backend/settings.py. - Configure
CORS_ALLOWED_ORIGINSwhen connecting a frontend. - Add Channels routing and ASGI configuration when you introduce WebSocket consumers.