-
Notifications
You must be signed in to change notification settings - Fork 3
New Developer Guide
This page serves as a guide to setting up the development environment for new developers.
First, ensure Java is installed to at least version 11. To verify this, go into your terminal and run java -version
as well as javac -version
. They should both return versions of at least 11.
Next, ensure Postgresql is installed. Go into psql under the default user (the default username should be postgres
and run the command CREATE DATABASE synapsis;
(do not forget the semi-colon). Run \c synapsis
to ensure that the database was created.
Next, install IntelliJ Ultimate Edition. You cannot use the free community edition for this project. If you have not done so, apply for a student license to get the ultimate edition for free.
Then, clone this repository into any location on your machine. Open IntelliJ and use the "Open project" option to open the synapsis folder in your IDE. On the initial opening, there may be some slowdowns as IntelliJ indexes the project and downloads packages.
Once the project is open in IntelliJ, right-click the pom.xml file and go to Maven -> reload project to ensure that all Maven packages are successfully installed.
Then under src/main/java/resources, you should find a file named application.properties
that contains some configuration information. Within this folder, create a new file titled secrets.properties
and in the file write spring.datasource.password=mypassword
where "mypassword" is your password to Postgres for the default user.
All configuration should be done now. Ensure Postgres is running and then press the green play arrow at the top of the IntelliJ IDE to run the project. Navigate to localhost:8080
to see the homepage. To verify the database is connected, navigate to localhost:8080/login
and login with the information [email protected]
and password of 12345678
. To logout, navigate to localhost:8080/logout
and click the button.
To run tests, go into IntelliJ under src/test/java and right-click the com.soen.synapsis package in the file explorer, then choose "Run tests". All tests should successfully run.
To generate a code coverage report, enter a terminal such as Powershell and navigate to the root folder soen390
, then run mvn clean test
. A code coverage report should be generated.