A digital passport for products
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
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.
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.
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.
- Clone the repo
git clone https://github.com/elliot-eriksson/Digital-Product-Passports-DPPs-federated-system.git
- Move into the api subfolder
cd .\API\
- Get requirements
go mod init API $ go: creating new go.mod: module API go mod tidy
- Make sure you are in the API subfolder, and check that the progarm can run.
go run .
For installing on AWS EC2 client follow AWS installation guide.
-
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
-
Update and install the webserver
yum update -y yum install -y httpd
-
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
-
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
-
Enter the API folder and initiate the ipfs daemon.
cd API ipfs init
-
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
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).
Distributed under the MIT License.
See LICENSE.txt
for more information.
Elliot Eriksson - elliot.eriksson@outlook.com
Project Link: https://github.com/elliot-eriksson/Digital-Product-Passports-DPPs-federated-system