Skip to main content

Getting started

  • Running JDK 21 with Spring Boot 3.2.8 (see pom.xml).
  • API documentation is generated with OpenAPI/Swagger
  • We use Maven

Prerequisites

Ensure you have the following available on your device:

  • git
  • Java 21 or higher
  • Download Maven and install. Follow the steps for windows and for mac if you have not done it before.
  • Postgres and install it.
  • Lombok and install it.

Setup

Clone this repo.

This repository is a monorepo containing both the backend and the legacy frontend. The new frontend (NEXTURN) lives in a separate repo.

Development

There are 3 different backend modules/ services used in UTURN. portal-api :- Module for handling all requests related to the web application. mobile-api :- Module for handling all requests related to the mobile app. authentication-api :- Module for handling all requests related to the authentication.

In addition there are couple of modules being used internally by above mentioned modules like test-utils , shared-components , mobile-web-shared.

This division in modules is a legacy mistake, favour mobile-web-shared where possible.

You can, for example, start the portal-api application by running the PortalApiApplication.java from your IDE. Or find the jar and start it.

In order to run the backend, you'll need to connect to (a) a Postgres server and (b) a Redis server. Edit the relevant application.yml with the connection options. We do not currently provide an easy way to run the backend locally.

Building

Build

To build the APIs please run the following Maven command, this command will also run the unit tests;

mvn clean package

Build

To build the APIs without running the unit tests please run the following mvn command

mvn clean package -DskipTests

Unit Tests

Run the following command to only execute the unit tests;

mvn test

If you want to run the module from CLI .. you can do so by first building the package via one of the above mentioned Build maven command.

Once the command is finished successfully then you need to navigate to backend\portal-api\target folder and run

java -jar portal-api-3.0.0-SNAPSHOT.jar

Once started successfully you portal api is available via http://localhost:8383/portal/ /portal being the context path for the application.