This is the repository for our sustainability-based web application: CarbonCommuter!
You can visit the website here: https://www.carboncommuter.xyz/.
CarbonCommuter is a free-to-use website that tracks carbon savings from students or staff on their commutes to/from campus. Users are then rewarded by encouraging competition and growing their profile, which in turn drives a sustainable outlook on the everyday activity that is a journey to/from the University.
- Sam Townley - @SamLolo
- Eleanor Forrest - @emforrest
- Abi Hinton - @abih4
- Giulia Brown - @giuliabrown
- Jack Skinner - @Lonk2004
- Charles Symonds - @Charles-Symonds-10
- Technical Documents: https://github.com/emforrest/ECM2434_Group_Software_Engineering_Project
- Process Documents: https://trello.com/b/yyfAlINB/the-ceiling-fans
- Meeting Notes: docs/Meeting Notes.docx
- Kanban Snapshots: docs/kanban-snapshots
- Product Documents: docs/Pages.md
The aim of this project was to build a game focused around sustainability. Our idea was to create an application that encouraged university students to travel sustainably and consider the carbon impact of their journeys! With an estimated 37,000+ students and staff on campus (*), a small reduction in the number of journeys made by car to campus would lead to a significant reduction in the emissions of harmful CO2. To do this, we intended to positively reward users for each journey they make to/from campus that wasn't in a car (see gamification for more info). On top of this, we aimed to point out the facilities on campus that students can make use of, such as bike racks and bus stops, to achieve this goal.
(*) Taken from 2022/23 statistics - reference: https://www.exeter.ac.uk/about/facts/facts/
A big part of the project is focused around the principle of gamificiation. This involves encouraging users to keep re-engaging with the service through the use of "game-like" elements. Taking this onboard, we chose to promote competition amongst the users through the use of a leaderboard. By repeatedly uploading journeys, users could see their progress reflect real-time on the leaderboard, and compare their savings to that of their peers. Another similar element is groups. Groups can be created by anyone, allowing societies and departments to compete amongst the members within the group, through a separate group leaderboard, as well as competing with other groups through the global group leaderboard. This should promote collaboration, and keep users interested in the service by leveraging their commitment to their favourite society.
We also give users the chance to show off their achievements through the use of public profiles. Here, users can earn badges from achievements, such as milestones in their total carbon savings, or uploading journeys for multiple days in a row. These are desgined to promote routine engagement with the application, encouring repeated daily uploads through badges, and sparking competition between students as to who has the better overall profile.
- Designed for Python 3.11 with Django v5.0.2.
- Uses a MySQL database running v3.0.36, which can be installed here.
- Set up with a MySQL server running on an Oracle Cloud instance.
- Project planning and tracking done via a Kanban board hosted on Trello.
To setup a virtual enviroment, you will need to use the virtualenv package. First, make sure that it's installed:
pip install virtualenvOnce it's installed, navigate to the directory containing the source code, and create the virtual environment:
python -m venv envTo install the required packages for the files, activate the virtual environment and install from the provided requirements.txt file:
#For Windows (cmd.exe):
env\Scripts\activate.bat
#For Windows (powershell)
env\Scripts\Activate.ps1
#For MacOS/Linux:
source env/bin/activate
#Once activated, you should see (env) before the command prompt
pip install -r requirements.txtAs part of the project, we are using a MySQL database hosted on Oracle Cloud. This allows us to synchronise our project database across all 6 developers. The application already has the connection details embedded, however for reference, they are as follows:
Host: 129.153.205.30
Port: 3306
User: django
Pass: acf6Z4LeA85FF9gY!
If the application can't find a database connection, you can setup a local MySQL server by following the MySQL installation guide. Once running, create a schema using the following SQL command:
CREATE SCHEMA 'sustainabilitygame';You will also need to carry out a migration before you can start the webserver using the following commands:
python manage.py makemigrations
python manage.py migrateFirst, make sure you've first activated the virtual environment:
#For Windows (cmd.exe):
env\Scripts\activate.bat
#For Windows (powershell)
env\Scripts\Activate.ps1
#For MacOS/Linux:
source env/bin/activateThen, move inside the carbonCommuter directory if you're not already, and use the following command to start the webserver:
cd carbonCommuter
python manage.py runserverAlternatively, you can use the included scripts to easily start the webserver in one click:
- For windows: start_server.bat
- For MacOS/Linux: start_server.sh