The database is excluded from this Git repository. To see the populated project, complete with test users, articles, and comments, please visit the deployment URL. If you want to build the project on your machine, you can follow the provided instructions under Local development
.
Student ID | Name | Assigned Task | Final Deliverable |
---|---|---|---|
210343496 | Tajul | Backend | Worked on APIs and deployment |
210292264 | Lukas | Frontend | Worked on frontend and connected to backend |
200495787 | Getuard | Frontend styling and testing | Designed website |
200433262 | Mohammed | Login and register page, modeling of data | Login and register page, modeling of data |
To run this project in your development machine, follow these steps:
-
Create and activate a conda environment
-
Fork this repo and clone your fork (or clone the forked repo of one of your team members), e.g.
$ git clone https://github.qmul.ac.uk/<username>/cwgroup
-
Install Python dependencies (main folder):
$ pip install -r requirements.txt
-
Collect static files
$ python manage.py collectstatic
-
Create a development database:
$ python manage.py migrate
-
Install JavaScript dependencies (from 'frontend' folder):
$ npm install
-
If everything is alright, you should be able to start the Django development server from the main folder:
$ python manage.py runserver
-
and the Vue server from the 'frontend' sub-folder:
$ npm run dev
-
Open your browser and go to http://localhost:5173, you will be greeted with a template page.
Once your project is ready to be deployed you will need to 'build' the Vue app and place it in Django's static folder.
-
The build command in package.json and the vite.config.ts files have already been modified so that when running 'npm run build' the generated JavaScript and CSS files will be placed in the mainapp static folder, and the index.html file will be placed in the templates folder:
$ npm run build
-
You should then follow the instruction on QM+ on how to deploy your app on EECS's OpenShift live server.
This code is dedicated to the public domain to the maximum extent permitted by applicable law, pursuant to CC0.