Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement versioning for documentation #187

Merged
merged 5 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The UNTP Test Suite is a comprehensive set of tools designed to ensure conforman
3. Documentation Site: Providing detailed information on setup, configuration, and usage.

The Mock Apps are structured into three main packages:

- Components: Contains the UI components.
- Core: Handles rendering and interaction between components and services.
- Services: Contains the business logic.
Expand All @@ -24,11 +25,13 @@ These tools allow implementers to model value chains, test UNTP functionality in
To set up and run the mock app:

1. Install dependencies:

```bash
yarn install
```

2. Build the package:

```bash
yarn build
```
Expand Down Expand Up @@ -60,7 +63,7 @@ The `SEEDING` environment variable acts as a flag to seed the Identity Resolver

## Documentation

For detailed information about the configuration, services, and how to use the mock app, please refer to the documentation site.
For detailed information about the configuration, services, and how to use the mock app, please refer to the documentation site.

The documentation site is available at [`http://localhost:3002`](http://localhost:3002) after starting the services with Docker Compose.

Expand Down Expand Up @@ -92,4 +95,21 @@ export MOCK_GS1_SERVICE_API_KEY=test456 # Mock GS1 service API key
# Run seeding scripts
./seeding/idr-data.sh
./seeding/mock-gs1-data.sh
```
```

## Documentation Versioning

The project uses Docusaurus for documentation management. Documentation versions are managed through a release script and automated pipeline.

### Release Script

The `scripts/release-doc.js` script automates the process of creating new documentation versions:

- Reads the documentation version from `version.json`
- Creates Docusaurus version using `docVersion` value from `version.json` file
To manually create a new documentation version:

```bash
# Run the release script
yarn release:doc
```
1 change: 0 additions & 1 deletion documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ The following environment variables are set in the Dockerfile:
- `DOCS_BASE_URL`: / (The base URL for the documentation site)

You can override these variables when running the container if needed.

4 changes: 2 additions & 2 deletions documentation/docs/mock-apps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Disclaimer from '.././\_disclaimer.mdx';

The [United Nations Transparency Protocol (UNTP)](https://uncefact.github.io/spec-untp/) mock apps are designed to model value chain participation and facilitate the testing and demonstration of UNTP implementation within a value chain. These apps provide a flexible and configurable system that allows implementors to compose and customise workflows to suit their specific needs.

![alt text](../../static/img/mock-app-system-diagram.png "Title")
![alt text](/img/mock-app-system-diagram.png 'Title')

## Key Features and Benefits

Expand All @@ -25,4 +25,4 @@ The [United Nations Transparency Protocol (UNTP)](https://uncefact.github.io/spe

6. **Branding and Customisation**: Each mock app can be branded to distinguish between different actors within the value chain. This allows for a clear representation of the various participants and their roles in the UNTP ecosystem.

By leveraging the mock apps, implementors can gain valuable insights into how UNTP can be integrated into their value chain, test their implementations, and demonstrate the benefits of UNTP to stakeholders. The flexibility and configurability of the mock apps make them a powerful tool for driving the adoption and success of UNTP within various industries and use cases.
By leveraging the mock apps, implementors can gain valuable insights into how UNTP can be integrated into their value chain, test their implementations, and demonstrate the benefits of UNTP to stakeholders. The flexibility and configurability of the mock apps make them a powerful tool for driving the adoption and success of UNTP within various industries and use cases.
3 changes: 3 additions & 0 deletions documentation/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ const config: Config = {
className: 'navbar-github-link',
position: 'right',
},
{
type: 'docsVersionDropdown',
},
],
},
footer: {
Expand Down
3 changes: 3 additions & 0 deletions documentation/versioned_docs/version-1.0.0/_disclaimer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:::info
Please note that this content is under development and is not ready for implementation. This status message will be updated as content development progresses.
:::
44 changes: 44 additions & 0 deletions documentation/versioned_docs/version-1.0.0/introduction/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
sidebar_position: 1
title: Introduction
---

import Disclaimer from './../\_disclaimer.mdx';

<Disclaimer />

The UN Transparency Protocol (UNTP) Test Suite is a comprehensive set of tools designed to ensure conformance to the [UNTP Specification](https://uncefact.github.io/spec-untp/). This robust suite enables implementers to thoroughly evaluate their UNTP implementations across various aspects, from technical interoperability to semantic validation.

The Test Suite comprises four primary components:
- Mock Apps
- Technical Interoperability
- Semantic Interoperability
- Graph Validation

## Mock Apps
[Mock Apps](/docs/mock-apps/) allow implementers to model a value chain using UNTP and integrate their implementation at any point within it. These apps provide a flexible environment for testing and demonstrating UNTP functionality in real-world scenarios.

## Technical Interoperability
This component tests the technical interoperability of implementations based on the UNTP specification. It ensures that the technical aspects of the implementation align with the protocol's requirements.

## Semantic Interoperability
The [Semantic Interoperability test](/docs/test-suites/semantic-interoperability) focus on verifying that the credentials produced by an implementation are semantically consistent with the UNTP specification. This allows implementors to be conformant with the core specification while allowing for extensions.

## Graph Validation
This component tests the entire trust graph produced by an implementation against the UNTP specification, ensuring the integrity and validity of the trust relationships within the system.

## Extensibility
It's important to note that the Semantic Interoperability, Graph Validation, and Mock Apps components can be extended to meet the specific needs of industries or value chain actors while still conforming to the core UNTP specification. This flexibility allows for customisation without compromising the protocol's fundamental principles.

## Tiered Approach
The UNTP Test Suite follows a tiered approach, with each tier building upon the previous one:

**Tier 1**: Focuses on technical interoperability.

[**Tier 2**](/docs/test-suites/semantic-interoperability): Adds semantic interoperability testing.

**Tier 3**: Incorporates graph validation.

This tiered structure allows implementers to progressively validate their UNTP implementations, ensuring a thorough and systematic approach to conformance testing.

By utilising the UNTP Test Suite and the Mock Apps, implementers can confidently develop, test, and deploy UNTP-compliant systems, fostering greater transparency and trust across global value chains.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
sidebar_position: 28
title: Asset
---

import Disclaimer from '../.././\_disclaimer.mdx';

<Disclaimer />

## Description
The `Asset` object contains information about the brand's visual identity and verification credentials.

## Example

```json
{
"logo": "https://storage.googleapis.com/acrs-assets/logos/Top-Line-Steel-Logo.jpg",
"brandTitle": "Top Line Steel",
}
```

## Definitions
<!-- TODO: Find out if brandTitle, passportVC and transactionEventVC is actually being used in the system-->

| Property | Required | Description | Type |
|----------|:--------:|-------------|------|
| logo | Yes | The URL of the brand's logo image. (Displayed in the header and sidebar)| String |
| brandTitle | Yes | The title or name of the brand. | String |
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
sidebar_position: 35
title: Component Type
---

import Disclaimer from '../../_disclaimer.mdx';

<Disclaimer />

## Description

The `type` property in a component configuration specifies the role or purpose of the [component](/docs/mock-apps/configuration/component-config) within the feature. It determines how the component interacts with other parts of the system and what kind of data it handles.

## Usage

The `type` property is a required field in the [component](/docs/mock-apps/configuration/component-config) configuration. It is used in conjunction with the `name` property to define the behavior and rendering of the component.

## Types

### EntryData

Components with the `EntryData` type are responsible for capturing or providing input data. They are typically used for forms, data entry fields, or components that load data from a source.

### Submit

Components with the `Submit` type are used for triggering actions or submitting data. They are often used for buttons that initiate a process or send data to a [service](/docs/mock-apps/services/).

When a Submit type component is activated, it executes the first element in the [services](/docs/mock-apps/configuration/service-config) array. Components and services can be chained together, allowing each subsequent Submit event to correspond to executing the next element in the services array.

### Result

Components with the `Result` type are used to display or handle the output of a process. They are typically used for showing the results of an action or displaying processed data.

### Void

Components with the `Void` type are self-describing and do not perform any action. They can be used as placeholders or for components that don't need to interact with the system's data flow or service execution.

## Examples

```json
{
"name": "JsonForm",
"type": "EntryData",
"props": {
"schema": { /* ... */ },
"onChange": { /* ... */ }
}
}
```

In this example, the `JsonForm` component is of type `EntryData`, indicating that it's used for data input.

```json
{
"name": "CustomButton",
"type": "Submit",
"props": {
"label": "Submit",
"onClick": { /* ... */ }
}
}
```

Here, the `CustomButton` component is of type `Submit`, indicating that it's used to trigger an action or submit data. When clicked, it will execute the first service in the services array.

```json
{
"name": "Spacer",
"type": "Void",
"props": {
"height": "20px"
}
}
```

This example shows a `Void` type component that might be used to add spacing in the UI without interacting with the system's data or services.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_position: 57
title: Construct Application Identifier Data
---

import Disclaimer from '../.././\_disclaimer.mdx';

<Disclaimer />

## Description

The `constructAiData` object defines the schema for constructing event data for getting Application Identifier (AI) data. It will be used to fetch the AI data from the JSON form or the credential object which are not explicitly defined the data model.

### Example

```json
{
"primary": {
"ai": "01",
"path": "/registeredId"
},
"qualifiers": [
{
"ai": "21",
"path": "/serialNumber"
},
{
"ai": "10",
"path": "/batchNumber"
}
]
}
```

### Definitions

| Property | Required | Description | Type |
| ---------- | :------: | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| primary | Yes | The primary AI that defines the AI code and the path for primary AI value | [AI config](/docs/mock-apps/common/construct-ai-data#ai-config) |
| qualifiers | No | The list of qualifiers that define the AI code and the path for qualifier AI value | [AI config](/docs/mock-apps/common/construct-ai-data#ai-config)[] |

#### AI config

| Property | Required | Description | Type |
| -------- | :------: | ----------------------------------------------------------------------- | ------ |
| ai | Yes | The AI code that defines the AI data | String |
| path | Yes | The JSON pointer path to extract the AI data from the credential object | String |
Loading
Loading