Skip to content

Commit

Permalink
feat: added initial consumption guide + test dpp payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Brunkow Moser committed May 15, 2024
1 parent 3393f15 commit 612bc0e
Show file tree
Hide file tree
Showing 5 changed files with 375 additions and 0 deletions.
97 changes: 97 additions & 0 deletions dpp-tutorial/consumption.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<!--
Tractus-X - Digital Product Passport Application
Copyright (c) 2022, 2024 BMW AG, Henkel AG & Co. KGaA
Copyright (c) 2023, 2024 CGI Deutschland B.V. & Co. KG
Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation
See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
This program and the accompanying materials are made available under the
terms of the Apache License, Version 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the
License for the specific language govern in permissions and limitations
under the License.
SPDX-License-Identifier: Apache-2.0
-->

# DPP Consumption Guide

This guide provides the information needed to setup the Digital product Passport (DPP) application as a data consumer. It describes how to run a local setup to leverage the DPP frontend and backend components using a container platform.

DATA CONSUMER DPP APP ___________________
| ___________________ __________________ | | |
| | | | | | --> | |
| | DPP Frontend | <---> | DPP Backend | | | DATA PROVIDER |
| |___________________| |__________________| | <-- | |
| | |___________________|


## Prerequisites

You must have the following tools installed and configured:

- DPP Application with Backend and Frontend components deployed.
- Login credentials to the DPP Frontned component
- Web Browser

## Login in the Frontend Application

Introduce the DPP Application host url in the browser:

```bash

https://<dpp-hostname-url>

```

You will be redirected to:

```bash

https://<dpp-hostname-url>/passport

```

And a login page from Catena-X will pop up. For doing the login follow this steps:

### 1º Introduce Company Name

```
CX-Operator
```

![company selection](./resources/screenshots/company-selection.png)

### 2º Introduce Test Credentials

```
Username:
[email protected]
```
```
Pass:
tractusx-umbr3lla!
```

![test login](./resources/screenshots/test-login.png)


### 3º Search by ID or Scan an existing QR Code

Change the `<manufacturerPartId>` and `<partInstanceId>` to the actual values in the part specification.

```
CX:<manufacturerPartId>:<partInstanceId>
```

![Introduce Id](./resources/screenshots/id-search.png)

278 changes: 278 additions & 0 deletions dpp-tutorial/resources/payloads/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
{
"typology": {
"shortName": "8HP60",
"class": {
"definition": "Manual transmission (motor vehicle)",
"code": "44-09-02-02"
},
"longName": "Product Description long text"
},
"metadata": {
"predecessor": "null",
"issueDate": "2000-01-01",
"version": "1.0.0",
"economicOperator": {
"legitimization": "DE123456789",
"identification": "BPNL1234567890ZZ"
},
"status": "draft",
"expirationDate": "2000-01-01"
},
"characteristics": {
"physicalDimension": {
"grossWeight": {
"value": 20.5,
"unit": "unit:kilogram"
},
"weightOrVolume": {
"left": {
"value": 20.5,
"unit": "unit:cubicMetre"
}
},
"diameter": {
"value": 20.5,
"unit": "unit:millimetre"
},
"grossVolume": {
"value": 20.5,
"unit": "unit:cubicMetre"
},
"width": {
"value": 20.5,
"unit": "unit:millimetre"
},
"length": {
"value": 20.5,
"unit": "unit:millimetre"
},
"height": {
"value": 20.5,
"unit": "unit:millimetre"
}
},
"lifespan": [
{
"value": 36,
"unit": "unit:day",
"key": "guaranteed lifetime"
}
],
"physicalState": "solid"
},
"commercial": {
"placedOnMarket": "2000-01-01"
},
"identification": {
"localIdentifier": {
"value": "SN12345678",
"key": "PartInstanceId"
},
"additionalCode": [
{
"value": "8703 24 10 00",
"key": "TARIC"
}
],
"dataCarrier": {
"carrierType": "QR",
"carrierLayout": "upper-left side"
}
},
"sources": [
{
"header": "Sustainability Document Material XY",
"category": "Product Specifications",
"type": "URL",
"content": "www.alink.pdf"
}
],
"handling": {
"spareParts": {
"left": {
"producer": [
{
"id": "BPNL1234567890ZZ"
}
],
"part": [
{
"name": "Aluminum Housing",
"gtin": "12345678"
}
]
}
},
"substanceOfConcern": {
"left": [
{
"name": {
"name": "phenolphthalein",
"type": "IUPAC"
},
"location": "Housing",
"unit": "unit:partPerMillion",
"concentration": {
"left": [
{
"max": 2.6,
"min": 2.1
}
]
},
"exemption": "shall not apply to product x containing not more than 1,5 ml of liquid",
"id": [
{
"type": "CAS",
"id": "201-004-7"
}
]
}
]
}
},
"additionalData": [
{
"description": "This is the machine parameters that are produced when the machine is used",
"label": "Specific Manufacturer Machine Parameters",
"type": {
"typeUnit": null,
"dataType": "object"
},
"children": [
{
"description": "The usage of the eletricity in the machine",
"label": "Eletricity Usage",
"type": {
"typeUnit": "unit:volts",
"dataType": "integer"
},
"data": "25"
},
{
"description": "The name of the machine that produced the product",
"label": "Machine Name",
"type": {
"typeUnit": null,
"dataType": "string"
},
"data": "Laser Machine MX-421W"
},
{
"description": "The list of products the machine can produce",
"label": "Product Names",
"type": {
"typeUnit": null,
"dataType": "array"
},
"data": [
"Tranmissions",
"Batteries",
"Seats",
"Doors"
]
}
]
},
{
"description": "This are the properties of interest",
"label": "Properties of Interest",
"type": {
"typeUnit": null,
"dataType": "object"
},
"children": [
{
"description": "This are the main properties of interest",
"label": "Main Properties",
"type": {
"typeUnit": null,
"dataType": "object"
},
"children": [
{
"description": "This is the Normal temperature of production",
"label": "Normal Temperature",
"type": {
"typeUnit": "unit:celcius",
"dataType": "float"
},
"data": 62.7
},
{
"description": "This is the minimmum temperature of production",
"label": "Minimum Temperature",
"type": {
"typeUnit": "unit:celcius",
"dataType": "float"
},
"data": -80.68
},
{
"description": "This is the maximum temperature of production",
"label": "Maximum Temperature",
"type": {
"typeUnit": "unit:celcius",
"dataType": "float"
},
"data": 800.85
}
]
}
]
}
],
"sustainability": {
"PEF": {
"carbon": [
{
"lifecycle": "main product production",
"rulebook": "https://www.cx-pcf-rulebook.pdf/",
"unit": "kg CO2 eq",
"type": "Climate Change Total",
"value": 12.678
}
]
},
"state": "first life",
"material": {
"left": [
{
"name": {
"name": "phenolphthalein",
"type": "IUPAC"
},
"unit": "unit:partPerMillion",
"recycled": false,
"id": [
{
"type": "CAS",
"id": "201-004-7"
}
],
"value": 5,
"renewable": true
}
]
},
"critical": {
"left": [
"Lythium",
"Uranium"
]
}
},
"operation": {
"importer": {
"left": {
"eori": "GB123456789000",
"id": "BPNL1234567890ZZ"
}
},
"manufacturer": {
"facility": "BPNS1234567890ZZ",
"manufacturingDate": "2000-01-31",
"manufacturer": "BPNL1234567890ZZ"
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dpp-tutorial/resources/screenshots/id-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dpp-tutorial/resources/screenshots/test-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 612bc0e

Please sign in to comment.