Skip to content

FAIRDataTeam/FAIRDataPoint

develop
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

FAIR Data Point

GitHub release (latest SemVer) GitHub Workflow Status Documentation Status License Docker Pulls Codacy Badge Coverage Status Libraries.io dependency status for GitHub repo

FAIR Data Point (FDP) is a REST API for creating, storing, and serving FAIR metadata. This FDP implementation also presents a Web-based graphical user interface (GUI). The metadata contents are generated semi-automatically according to the FAIR Data Point software specification document.

Usage

More information about FDP, how to deploy it and use it can be found in the FDP Deployment and REST API usage Documentation.

Related GitHub Projects

API Documentation

FAIR Data Point API comes with an embedded OpenAPI documentation using Swagger. The details of API calls can be found there. It also allows trying out API calls directly. To access the FDP swagger document please visit the following url via web browser localhost:8080/swagger-ui.html (for local deployment) or https://your.domain.tld/swagger-ui.html for your deployment ( e.g. app.fairdatapoint.org/swagger-ui.html). More detailed descriptions and examples of these API calls is available in the Deployment and Usage instructions

Development

Technology Stack

  • Java (JDK 17)
  • MongoDB (4.2)
  • Maven (3.2.5 or higher)
  • Docker (19.03.0-ce or higher) - for building Docker image only

Build & Run

To run the application, a MongoDB instance is required to be running. To configure the MongoDB with standard connection (mongodb://localhost:27017/fdp), simply instruct Spring Boot to use the development profile. Then run:

$ mvn spring-boot:run -Dspring-boot.run.profiles=development

Alternatively, create an application.yml file in the project root and configure the mongodb address , and then run:

$ mvn spring-boot:run

Run tests

Run from the root of the project:

$ mvn test

Package the application

Run from the root of the project:

$ mvn package

Create a Docker image

Run from the root of the project (requires building jar file using mvn package as shown above):

$ docker build -t fairdatapoint:local .

Build using Docker

If you do not have Java and Maven locally, you can build the Docker image using Docker (instead of using locally built jar file):

$ docker build -f Dockerfile.build -t fairdatapoint:local .

Security

Most of the GET requests are publicly accessible. In contrast, POST, PUT, DELETE, and PATCH requests are mainly secured. We use JWT Tokens and Bearer Token Authentication. The token can be retrieved using /tokens endpoint where you send username and password. For details, visit the OpenAPI documentation.

Default users

  • ADMIN:
    • Username: albert.einstein@example.com
    • Password: password
  • USER:
    • Username: nikola.tesla@example.com
    • Password: password

Contributing

We maintain a CHANGELOG, you should also take a look at our Contributing guidelines and Code of Conduct.

License

This project is licensed under the MIT License - see the LICENSE file for more details.