nura-backend is a RESTful API for managing nura's data. It is written in Java and uses Spring Boot. Internally, is uses mongo-db to store and read data.
All the endpoints use a Authentication
header to authenticate each request and present user specific results. Depending on the request, the Authentication header varies:
Authentication: <base64(username:password)>
After sucessfully signing in, the response will contain a token. This is later used to authenticate all other requests.
Authentication: <base64(username:token)>
The REST endpoinst look as follows:
In case you want to host the database yourself, you can easily build it with docker:
Just run the following command:
$ git clone https://github.com/nura-vault/nura-backend.git .
$ docker-compose up
This will expose the container to port :8080
In case you don't want to use docker, things get a bit more complicated. And by a bit, I mean a lot more complicated. First of all you need to make sure you have a running mongo-db database. Next you have to clone the project:
$ git clone https://github.com/nura-vault/nura-backend.git .
Navigate to src/main/resources/application.properties
and edit the properties as follows:
...
spring.data.mongodb.host = localhost
spring.data.mongodb.port = 27017
spring.data.mongodb.database = nura
...
Make sure you have maven and Java-11 installed. Then run the following command at the root of the project:
$ mvn install -B -ntp -DskipTests=true -f pom.xml
Now you can start the application:
$ java -jar target/nura-1.0.jar
This will expose the application to port :8080