Reducing carbon emissions can be a tedious and boring task, causing many to lose their motivation to make the right choices. Therefore we have made CO₂mpass - a CO₂-tracker created for the purpose of helping individuals make more environmentally friendly choices. Our software is not your average dull CO₂-tracker - instead, we have highly emphasized motivation when developing our product. By gamifying certain aspects of our software, we give the users a sense of progression, showing you what kind of difference YOU are making, all the while making it fun to do so.
This project consists of a backend and a frontend. Follow the instructions below to set up and run each component.
Before you begin, ensure you have the following installed on your machine:
- Java Development Kit (JDK) (version 11 or later)
- Gradle
- Node.js and npm (version 14 or later)
You also need a Google Maps API key set in an environment variable:
export GOOGLE_MAPS_API_KEY="<YOUR_API_KEY>"Tip: use direnv to set this variable for all shells inside this directory, by creating a file called
.envrcin the root of the repository with a plain list of variables, like the Google API key above. Installation instructions can be found here.
If you want to use a local PostgreSQL database, you can create a database called mydatabase, and a user account called username with password password with full access to it, and setting the following environment variable:
export SPRING_PROFILES_ACTIVE="postgres"-
Navigate to the
demodirectory:cd demo -
Clean and build the project:
./gradlew clean build
-
Run the backend:
./gradlew bootRun
-
Navigate to the
frontenddirectory:cd frontend -
Install the dependencies:
npm install
-
Run the frontend development server:
npm run dev