Skip to content

Latest commit

 

History

History
80 lines (55 loc) · 2.71 KB

readme.adoc

File metadata and controls

80 lines (55 loc) · 2.71 KB

Quarano Backend

The Quarano backend is a Spring Boot based application exposing a REST API to track cases of COVID-19 infections and allow affected patients to track a diary of symptoms during the time their health is monitored by the health authorities.

tl;dr — Quickstart

Run the backend application.

$ git clone https://github.com/quarano/quarano-application quarano (1)
$ cd quarano/backend (2)
$ mvn spring-boot:run -PlocalDev (3)
  1. Clone the repository.

  2. Switch to the backend folder.

  3. Run the application against an in-memory database.

Use the API (using HTTPie). First, login with a demo administrator account.

$ http POST :8080/login username="admin" password="admin"

HTTP/1.1 200
…
X-Auth-Token: …

Use the value returned in the X-Auth-Token for subsequent requests to authenticate.

$ http GET :8080/hd/cases "Authorization:Bearer $token"

HTTP/1.1 200
…

Documentation

Documentation is part of the actual application build and runtime. Once you’ve build the app, the root document can be found at target/generated-docs/index.html. It’s also available from the running application at …/api/docs/index.html.

Developing Quarano Backend

The Quarano backend is a standard Maven project and just be imported in any IDE (VSCode, IntelliJ IDEA, Eclipse, STS). Make sure you have the Lombok plugin installed so that your code can compile correctly. For convenience, make sure that you have the localDev Maven profile activated, so that running the application from your IDE doesn’t need to reach out to a database.

Tech stack

The application is based on the following open source projects:

  • Spring Boot 2.4

  • Spring MVC

  • Spring Data

  • Spring Security

  • Project Lombok — general low level code generation

  • Modelmapper — to map HTTP representations to domain objects

  • Moduliths — to verify architecture and generate documentation

  • jMolecules — to express DDD concepts in code

Available Spring / Maven profiles

The existing Spring profiles are documented under: https://quarano.de/internal-test/api/docs/index.html#_spring_profiles

For convenience we expose the following Maven profiles:

  • localDev — Includes H2 as database driver and activates the develop profile.

Demo deployments

There’s a demo deployment available at https://dev.quarano.xyz/api including some demo data. No guarantees about the availability and state of data.

If you prefer to use a UI (what? 😳🤔😭) you can use https://dev.quarano.xyz.