Prometheus-X Components & Services

Prometheus-X Dataspace Connector

The Data Space Connector is an open source project aimed to facilitate the onboarding and participantion of organisations in the data space. It is built with simplicity in mind and offers the necessary functionalities for organisations to communicate with the core components of the data space such as Catalogue for resources, offerings and data space use cases management, Contract for negotiation and contract verification and Consent for the management of consent driven data exchanges.

Installation

Classic installation

  1. Clone the repository from GitHub:
git clone https://github.com/Prometheus-X-association/dataspace-connector.git
  1. Install packages using pnpm
npm i -g pnpm # If pnpm is not installed
pnpm i
  1. Copy the .env.sample into a .env of your choice (.env, .env.development...) and set your environment variables
cp .env.sample .env
cp .env.sample .env.development
#For production
cp .env.sample .env.production
  1. Copy the config.sample.json into a config.json and set your configuration variables
cp src/config.sample.json src/config.json
#For production
cp src/config.sample.json src/config.production.json

Docker

You can launch the data space connector with docker and docker compose, by using the following command at the root of the project.

You need first to add the needed variables in the config.json for the consumer and the provider inside

docker compose build && docker compose up -d

or

docker compose up -d

The docker compose file will launch the app and a mongodb container. Using your own mongodb database is possible by updating the following variable in your .env

MONGO_URI=mongodb://mongodb:27017/dataspace-connector

If you run into issues restarting docker-compose, try rebuilding and restarting the containers with sudo like so:

sudo docker-compose up --build

Local environment

Docker

You will find a directory named "sandbox" that contains a Docker Compose file for both the provider and the consumer.

/sandbox/consumer/config.json
/sandbox/provider/config.json

First, add the appropriate variables to each config.json file and then launch the container.

docker compose build && docker compose up -d

npm

You can use the following commands to launch the provider and consumer connectors via npm.

cp .env.provider .env 
cp src/config.sample.json src/config.provider.json
cp .env.consumer .env
cp src/config.sample.json src/config.consumer.json

Add the necessary variables to each file and run them in two separate terminals.

npm run provider
npm run consumer

Documentation

  1. Overview
  2. Getting started
  3. Data Exchange
  4. Resource representation
  5. Credentials
  6. User management
  7. Query parameters
  8. Swagger

Contributing

Contributions to the Prometheus-X Dataspace Connector are welcome! If you would like to contribute, please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bug fix.
  3. Make the necessary code changes, adhering to the project's coding style and guidelines.
  4. Write appropriate tests to ensure code integrity.
  5. Commit your changes and push the branch to your forked repository.
  6. Submit a pull request to the main repository, describing your changes in detail.

Please ensure that your contributions align with the project's coding standards, have proper test coverage, and include necessary documentation or updates to existing documentation.

License

The Prometheus-X Dataspace Connector is released under the MIT License. You are free to use, modify, and distribute the software as per the terms specified in the license.

Support

If you encounter any issues or have questions regarding the Prometheus-X Data Space Connector, feel free to open an issue on the GitHub repository. The project maintainers and community members will be happy to assist you.