Skip to content

Developing a project to address the impending challenges posed by new regulations, particularly in compliance with the European Soil Protection Regulation (ESPR)

License

Notifications You must be signed in to change notification settings

elliot-eriksson/Digital-Product-Passports-DPPs-federated-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Digital Product Passports DPPs federated system

A digital passport for products
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

This project has worked on implementing a proof of concept for a distributed federated system. It is designed to work for digital product passports DPPs
The distribution of data is done on the IPFS network using multiple API instances running on different machines communicating with each other.

This project had two separate developments. CreatePassport, a program that could illustrate how a large company can create DPPs for its products and components.

An API that companies without their own solution can use as well as end users. This API supports a wider set of functions such as creating and retrieving DPPs, a more in-depth description of the API Endpoints and its features can be found in the API documentation.

As of writing the API is in a working order however the program CreatePassport is not.

(back to top)

Built With

  • Go
  • IPFS
  • KUBO

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

To run the project a IPFS Kubo node need to be run on the same machine as the API.

Follow the instructions at IPFS kubo for windows/linux instructions for mac check below.

  • macOS

    brew install ipfs
  • Confirm your installation

    ipfs --version

Postman or another similar application can be used to connect to the API endpoints, installation for below.

postman

Installation

  1. Clone the repo
    git clone https://github.com/elliot-eriksson/Digital-Product-Passports-DPPs-federated-system.git
  2. Move into the api subfolder
     cd .\API\
  3. Get requirements
     go mod init API
     $ go: creating new go.mod: module API
     
     go mod tidy
    
  4. Make sure you are in the API subfolder, and check that the progarm can run.
     go run .

Installation API on AWS with EC2 service

For installing on AWS EC2 client follow AWS installation guide.

  1. The following security inbound in required for yo to be able to connect to the API.

    IPv4	HTTP	    TCP	80      0.0.0.0/0	
    IPv4	SSH	        TCP	22	    0.0.0.0/0	
    IPv4	Custom TCP	TCP	8081    0.0.0.0/0	
    IPv4	HTTPS	    TCP	443     0.0.0.0/0	

    After this is done you can start your instance.

    The following commands is needed to setup the server for the API on AWS EC2 instance. Enter super user

    sudo su -l 
  2. Update and install the webserver

    yum update -y  
    yum install -y httpd 
  3. For the latest installation of Kubo IPFS for linux follow the link below installation guide.

    Installation of golang, you will need to enter the bash file and add the export line somewhere in the document for the path to work after a restart of the server.

    yum install golang-go  
    vi ~/.bashrc 
    export PATH=$PATH:/usr/local/go/bin
    cd var/www/html 
    wget "current zip for the project" 
    unzip the project
    enter the folder
  4. When first entering the file ther will be some not up to date files remove them and fetch the new once

    rm go.mod 
    rm go.sum
    go mod init go.mod
    go mod tidy 
  5. Enter the API folder and initiate the ipfs daemon.

    cd API
    ipfs init 
  6. To start the IPFS daemon and the API

    ipfs daemon &
    go run .

Important note! when restarting or shutting the tab for the webserver you will need to enter super user and manouver to /var/www/html before you can rerun the startup commands. If the dameon or the server is complaining about the locks you can enter ps -A and kill pid the jobs for ipfs and API

(back to top)

Usage

For usage of the API check out documentation

For the CreatePassport program since its current iteration is not compatible with the new structure created during the development of the API.

Changes need to be done to the program speicficaly to dynamicPassportData, LinkMadeFrom and how it handles sensitivedata before it can be used.

See the open issues for a full list of proposed features (and known issues).

(back to top)

License

Distributed under the MIT License.
See LICENSE.txt for more information.

(back to top)

Contact

Elliot Eriksson - elliot.eriksson@outlook.com

Project Link: https://github.com/elliot-eriksson/Digital-Product-Passports-DPPs-federated-system

(back to top)

About

Developing a project to address the impending challenges posed by new regulations, particularly in compliance with the European Soil Protection Regulation (ESPR)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages