Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.
/ loono-be Public archive

The Loono Backend provides server features for the Loono mobile application.

License

Notifications You must be signed in to change notification settings

cesko-digital/loono-be

Repository files navigation

Build


Repozitář se zdrojovým kódem byl přesunut na https://github.com/Loono-cz/loono-be


Logo Backend

The Loono backend covers all purposes for the Loono mobile application like user accounts, examinations or a doctor search. The application provides REST API and a Swagger / Open API documentation.

Local development setup

Requirements

  • System environment variables
  • PostgreSQL database (version 12.5 or later)
  • JDK 17
  • IDE with git and gradle (or installed separately)
  • Service account credentials to the Firebase
  • Docker & docker-compose

Firebase Admin SDK

We use Firebase fot the authentication. There is the Firebase Admin SDK on the server side. To initialize the client you need a system account for the mobile application. You have to download the service account credentials as a json file in the Admin console. More information HERE.

System environment variables

  • POSTGRE_URL: host:port/db (i.e. localhost:5432/loono)
  • POSTGRE_USER: database owner
  • POSTGRE_PWD: database password
  • GOOGLE_APPLICATION_CREDENTIALS: a content of the file with service account credentials to the Firebase

Gradle plugins and tasks

Building bootable Jar file

gradlew build 

You can execute gradle build task to build the project and create bootable Jar file located as build/dists/loono-be.jar.

Running the server

The server is running at 8080 port by default.
  • Running in the IDE
  • Execute the Application.kt as the main executable Class, debug supported.

  • Running the built Jar
  • The Jar file can be just executed.

Jacoco

gradlew jacocoTestReport 

To check code coverage we support jacoco plugin. The report is located on build/reports/jacoco/test.

Heath check

The server uses Spring Actuator for the Health Check. The Health Check is hidden by basic authentication.

Basic health check endpoints

Activated only default and database checks. We can enable more if needed.

  • Overall status: /actuator/health
  • Database status: /actuator/health/db

API documentation

  • OpenAPI documentation on /v3/api-docs

About

The Loono Backend provides server features for the Loono mobile application.

Resources

License

Stars

Watchers

Forks