Running Gradle always requires a Java JDK version 8 or higher. For this project it is recommended to use version 11 of the Java JDK. First download the installer for the Java JDK.
Make sure you select the appropriate operating system, architecture and version 11 of the JDK. Download and run the .msi file. Make sure the "Configure JAVA_HOME variable" option is checked. This option is disabled by default in the installer.
After the installation has finished, open CMD and check with java -version
if the installation was successful.
Gradle is a build tool used to build the backend. Gradle version 7.1 is required for the backend. A list of the different versions can be found here. If you do not install Gradle via a package manager, there is a detailed description of how to install Gradle manually.
After the installation has finished, open CMD and check with gradle -v
if the installation was successful.
The database management system Mongodb is used for the persistence of the reports to be saved. Download the latest version of MongoDB and install it. It is recommended to install MongoDBCompass with MongoDB Shell as well.
The database management system PostgreSQL is used for the persistence of user account data. Download and install the latest version of PostgreSQL.
The PostgreSQL database must be created by yourself and is not automatically generated by the project. To do this, create a PostgreSQL user with a secure password and remember the user credentials. To create a database in PostgreSQL, the latest version of pgAdmin is recommended.
You can download the project as a ZIP file or clone it with:
git clone https://github.com/informatik-heilbronn/transparenz-cockpit
If you downloaded the zip file, extract the project to a path of your choosing.
Make sure you have met the prerequisites for the backend. Open CMD, navigate to the project folder and run the following command:
gradle backend:build
Before you can run the backend, you need to create and configure the databases. Unlike the PostgreSQL database, the MongoDB database is created automatically. Accordingly, you have to create the PostgreSQL database yourself.
In the backend folder is the transparentcockpit.config.sample file, which provides a template for specifying the configuration. Enter your database information in this file using an editor. Rename the file and remove the .sample so that the file is called transparentcockpit.config afterwards.
Note: If you have not created a user for the MongoDB database, you can create a new admin user with the following commands in Mongo shell:
use admin
db.createUser({ user: "<user>" , pwd: "<password>", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})
After you have done all the preparations, open CMD, navigate to the project folder and run the following command:
gradle backend:run