This guide provides step-by-step instructions for teachers on how to set up and run the source code of the project. Please follow these instructions carefully to ensure a smooth setup process.
Before you begin, make sure you have the following packages installed on your system:
- django
- django-cors-headers
- psycopg2
- djangorestframework
- Pillow
- django-rest-knox
If you haven't already installed these packages, you can use pip to install them:
pip install django django-cors-headers psycopg2 django-rest-knox djangorestframework Pillow knox
- Navigate to the project directory:
cd ./src/SpUStify/
- Activate the virtual environment (if available):
To set up the back-end of the project, you will need to have PostgreSQL installed and running on your system. If you don't have PostgreSQL installed, you can download and install it from PostgreSQL Official Website.
- Create a database named "SPUSTIFY" in PostgreSQL (pgAdmin4 application).
Open the ./src/SpUStify/SpUStify/settings.py file in the SpUStify directory and change the password in line 112 to match your PostgreSQL (pgAdmin4) password.
- Navigate to the backend directory:
cd ./src/SpUStify/
- Run the following command to create the database migrations:
python manage.py makemigrations
- Run the following command to create the database tables:
python manage.py migrate
- Run the following command to create a superuser:
python manage.py createsuperuser
- Run the following command to start the back-end server:
python manage.py runserver
This command will launch the back-end server and make your project accessible through a web browser.
To set up the front-end of the project, you will need Node.js installed:
- Install Node.js: If you don't have Node.js installed, you can download and install it from Node.js Official Website.
- Navigate to the frontend directory:
cd ./src/FE/FEspUStify/
- Install the required dependencies
npm install
- Run the front-end server
npm run dev
This command will launch the front-end server and make your project accessible through a web browser.