This folder contains the API part of the project. It is where the client makes request. The business logic resides here.
- Maven
- Java
- Springboot
Follow these steps to get a working version of our application
**Make sure you also have the prerequisites from the root folder **
- Maven
- Java 11
- Clone the repo
git clone https://github.com/DPigeon/Money-Tree.git-
Get the secrets from the slack #secret-sharing and store them in your environment
-
A. Run the Docker Container (from the backend folder of the project)
docker compose upOR
- B. Alternatively to 3A, you can run the springboot application on its own:
mvn clean verify spring-boot:run
Note that for 3B, an instance of the neo4j database needs to be running beforehand, either by downloading it on their website or using the docker image
- The backend is running on port 8080
- Neo4j Database is running on port 7687(bolt) and the browser 7474(http)
You can make api requests to http://localhost:8080/
You can access the DB GUI with the following link http://localhost:7474/
IMPORTANT NOTE: The first time the neo4j database runs, the user/pwd is neo4j and needs to be changed according to our the env variables
-
Unit test files follow this pattern
*Test.groovy -
Integration test file follow this pattern
*IT.groovy -
To run unit test:
mvn clean test -
To run integration test
mvn failsafe:integration-test
When executing mvn verify both unit and integration tests will be executed after the packaging phase of the jar
When executing mvn clean install both unit and integration tests will be executed after the packaging phase of the jar
The Swagger UI page is available at http://server:port/context-path/swagger-ui.html
The OpenAPI description is available at the following url for json format: http://server:port/context-path/v3/api-docs
More info here: https://springdoc.org/
The sonarscanner is ran in our workflows, but you might want to run it locally if you want to run it multiple times and verify stuff which will speed up the process.
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=$branch_name
IMPORTANT: You need to specify the branch when you're running the scan otherwise it will send the results to the default branch (dev)