To successfully deploy the PEAX application backend, ensure you meet the following prerequisites:
- Git
- Python
Once you have these prerequisites in place, follow the instructions below for deployment.
git clone https://github.com/mpjunaid/Peax_backend.git
cd Peax_backendpython -m venv venv
source venv/bin/activate # Use 'venv\Scripts\activate' on Windowspip install -r requirements.txtpython manage.py migrateIn this github repository there is sqlite file which is already populated with some sample data and the migrate step can be skipped
python manage.py runserverThe hosted backend will be available at the following URL:
The backend primarily operates as an API, with detailed API documentation provided for testing in Postman. You can find the Postman collection file named "PEAX.postman_collection" in the project folder.
Authentication in the backend is implemented using JSON Web Tokens (JWT), where the username (i.e., email) and password are hashed and stored in the database. The authentication process utilizes server-side sessions, and a cookie is sent to the frontend browser.
Password and email validation is enforced; for example, passwords must include at least one lowercase letter, one uppercase letter, one digit, and one special character.
Additionally, the backend performs input validation for various data types, both on the backend and frontend sides.