Skip to content

nura-vault/nura-backend

Repository files navigation

nura-backend

📚 Introduction

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.

☁ Magic

All the endpoints use a Authentication header to authenticate each request and present user specific results. Depending on the request, the Authentication header varies:

Signin

Authentication: <base64(username:password)>

After sucessfully signing in, the response will contain a token. This is later used to authenticate all other requests.

Vault / Archive

Authentication: <base64(username:token)>

The REST endpoinst look as follows:

🧱 Build it yourself

In case you want to host the database yourself, you can easily build it with docker:

🐳 Dockerized

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

📦 Standalone

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages