Skip to content

andraspatka/JobPortalBE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JobPortalBE Build Status

Techstack:

  • BE: Java - Spring, Hibernate, maven, Postgresql
  • FE: Angular
  • Git: Github FE, Github BE
  • Ci/CD: TravisCi

Database

For instructions on quickly setting up a Postgres DB and PgAdmin in Docker, go to the "db" folder

Java

Java version required: 11

Zulu JDK is recommended, get it here.

Maven

Newer version of Maven have support for a Maven wrapper.

To build the project, all you need to do is:

./mvnw package

You might get an error: "ERROR: JAVA_HOME is not set" If you do, then set the JAVA_HOME environment variable to your JDK installation. For Zulu it's: "C:\Program Files\Zulu\zulu-11"

Lombok

In order to not get compilation errors in IntelliJ due to Lombok, it is recommended to install the Lombok plugin.

  • ctrl + alt + s
  • look for 'plugins'
  • search for 'lombok'
  • click on install

OpenAPI

With the help of the openapi generator plugin, code can be generated from simple OpenAPI Specs (written in either json or yaml). This makes development easier and faster, because the API specification is present in only one place, and code can be generated for both the FE and BE from this specification.

On the Server side the generated code includes the DTO (Data Transfer Objects) and the Server Stubs for the API.

On the Client side, the generated Code includes the DTOs and the calls to the server.

References:

In order to generate code from the OpenAPI specs, run the following command:

mvn clean generate-sources

The sources are generated under target/generated-sources/main/java/com/jobportal/openapi

The OpenAPI Specs are written in JSON and can be found under: src/main/resources/openapi

For an example, please look at:

  • src/main/resources/openapi/example.json
  • HelloController.java
  • WorldController.java

Branching concept

There are 3 types of branches:

  • feature branch: short lived, includes the implementation of a smaller feature, after the feature is complete, a PR is opened and it is eventually merged into main
  • main: main branch, all feature branches get merged into this branch
  • release: release branch, the CD build is started when there are changes on this branch.

Overview:

Branching

Ci/CD

Techstack:

  • Ci: Travis
  • Platform for deployments: Heroku

On each commit, the tests are ran.

On each commit of the release branch, the tests are ran, a docker image is created and pushed into the Heroku container registry, and the application is deployed to Heroku.

Overview:

Ci Concept

Creating a release version

The following steps need to be followed in order to create and deploy a new version: