Generic templates for TradeTrust, where users can use any of these available templates to render their document.
Note: These are just some rendering templates that are made available for users to use, the configurations to use these templates are in the documentation of TradeTrust document creator.
Available Templates | type | name | Verifiable | Transferable | Support OA V3 | Privacy Filter |
---|---|---|---|---|---|---|
Bill of Lading | EMBEDDED_RENDERER | BILL_OF_LADING | ✗ | ✓ | ✓ | - |
Bill of Lading (Generic) | EMBEDDED_RENDERER | BILL_OF_LADING_GENERIC | ✗ | ✓ | - | - |
Bill of Lading (Carrier) | EMBEDDED_RENDERER | BILL_OF_LADING_CARRIER | ✗ | ✓ | - | - |
Bill of Lading BIMCO V1 | EMBEDDED_RENDERER | BILL_OF_LADING_V1_BIMCO_STANDARD | ✗ | ✓ | - | - |
Warehouse Receipt | EMBEDDED_RENDERER | WAREHOUSE_RECEIPT | ✗ | ✓ | - | - |
Chafta COO | EMBEDDED_RENDERER | CHAFTA_COO | ✓ | ✗ | - | - |
Covering Letter | EMBEDDED_RENDERER | COVERING_LETTER | ✓ | ✗ | ✓ | - |
Invoice | EMBEDDED_RENDERER | INVOICE | ✓ | ✗ | ✓ | ✓ |
Simple COO | EMBEDDED_RENDERER | SIMPLE_COO | ✓ | ✗ | - | - |
Certificate of Non Manipulation | EMBEDDED_RENDERER | CERTIFICATE_OF_NON_MANIPULATION | ✓ | ✗ | - | - |
In the forms[0].defaults.$template
field of the configuration file, refer to the above for the type
, name
, and url
values.
Note: To use these available templates, please ensure that you have the correct schema in the configuration file.
You can download or git clone
this repo
$ git clone https://github.com/TradeTrust/generic-templates.git
$ npm install
$ npm run storybook # open storybook and start editing your components
$ npm run storybook:build # generate docs
$ npm run test:watch # run tests with Jest
$ npm run test:coverage # run tests with coverage
$ npm run integration # run integration test with testcafe
$ npm run lint # lint code
$ npm run build # build component
$ npm run example:application # start embedded application
This template provides a simple application that is able to render documents built for the current renderer. To use it:
- Open
application/index.tsx
file and edit thedocuments
property of theApp
component to suit your needs (provide any document that is available locally, whether it's a javascript, JSON or typescript document). - Start your renderer:
npm run dev
- Start the local application:
npm run example:application
- Head to
http://localhost:3010/
, you should see the configured documents during step 1.
This repository has been configured to run end-to-end tests using Testcafe
.
- concurrently run
npm run dev
+npm run integration
- React - A JavaScript library for building user interfaces.
- Webpack - Component bundler.
- React testing library - Simple and complete testing utilities that encourage good testing practices.
- Emotion - Library designed for writing css styles with JavaScript.
- Babel - Write next generation JavaScript today.
- Jest - JavaScript testing framework used by Facebook.
- Testcafe - A node.js tool to automate end-to-end web testing.
- ESLint - Make sure you are writing a quality code.
- Prettier - Enforces a consistent style by parsing your code and re-printing it.
- Typescript - JavaScript superset, providing optional static typing
- Circle CI - Automate tests and linting for every push or pull request.
- Storybook - Tool for developing UI components in isolation with documentation.
- Debug - JS debugging utility that works both in node.js and browsers.
Pure ESM issues:
escape-goat
to 3.0.0
GPL-3.0