In order to install the release commit:
- git clone https://github.com/PharmaLedger-IMI/csc-workspace-main.git
- cd csc-workspace-main
- git checkout 65aea12b57ce8bebc6468b0e3367ccbca838af56
- npm install
- npm run server
- In new terminal: npm run build-all
csc-workspace-main bundles all the necessary dependencies for building and running Clinical Supply Chain SSApps in a single package.
( This workspace was originally forked from the https://github.com/PharmaLedger-IMI/epi-workspace )
MIT License
Copyright (c) 2021 PharmaLedger Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
To run the application launch your browser (preferably Chrome) in Incognito mode and access the http://localhost:8080 link.
You will be present with a menu from where you can choose the SSApp you with to launch
In order to use the workspace, we need to follow a list of steps presented below.
- Node v12.
$ git clone https://github.com/PharmaLedger-IMI/csc-workspace-main.git
After the repository was cloned, you must install all the dependencies.
For the latest versions do:
$ cd csc-workspace-main
#Important: If you plan to contribute to the project and/or dependecies please set DEV:true
#in the file env.json before you run the installation!
$ npm run dev-install
For latest 'stable' version do:
$ npm run install
instead.
Note: this command might take quite some time depending on your internet connection and you machine processing power.
While in the csc-workspace-main folder run:
$ npm run server
Open a new console inside csc-workspace-main folder and run:
# Note: Run this in a new console inside "csc-workspace-main" folder
$ npm run build-all
To be able to generate the documentation for this project via
$ npm run docs
draw.io must be installed. Can be also obtained via
$ snap install drawio
in linux
after instalation if not present, add drawio to path
$ which drawio
add a file under docs/bin
called drawio_exec_command.os
containing the command/path to execute drawio
- Linux:
echo "drawio"
- Windows:
echo "${PATH_TO_DRAW_IO}\drawio.exe"
Currently Not Supported
TODO
Currently Not Supported
Steps
- Install all dependencies (as develoment) for this workspace
npm run dev-install
- Bind Android repository into workspace
npm run install-mobile
- Launch API HUB
npm run server
- Prepare the Node files that will be packed into the Android app
#In another tab / console
npm build-mobile
- Have /mobile/scan-app/android/local.properties file with the following content
# Change the value to your SDK path
sdk.dir=/home/alex/Android/Sdk
- Build the APK
npm build-android-apk
This concludes the steps to build the APK file.
Note: The .apk file should be in folder
mobile/scan-app/android/app/build/outputs/apk/release
Currently not supported
- apihub-root: Folder containing the root of what is served by the server
- external-volume: configs directory;
- internal-volume: volume folder (brick storage). contains the several configured domains
- wallet patch folders: the folders contain, in the wallet-patch folder and for each case, the custom 'behaviour' that is added to the template folder:
- csc-sponsor-wallet/wallet-patch;
- csc-cmo-wallet/wallet-patch;
- csc-courier-wallet/wallet-patch;
- csc-site-wallet/wallet-patch;
- csc-dsu-wizard: based on gtin-dsu-wizard
- csc-sponsor-wallet
- csc-cmo-wallet
- csc-courier-wallet
- csc-site-wallet
- Wallets for each one of the actors
- trust-loader-config: custom config to override the wallet loader default ones for each case:
- csc-sponsor-fabric-wallet/loader;
- csc-cmo-fabric-wallet/loader;
- csc-courier-fabric-wallet/loader;
- csc-site-wallet/loader;
- General use:
- cardinal: the web framework used for frontend;
- pharmaledger-wallet: the default wallet implementation to be used by all ssapps - comes from http://github.com/privatesky/menu-wallet-prototype.git
- node_modules: node modules folder (includes the octopus custom builder)
- privatesky: the openDSU code. notable folders are:
- privatesky/modules: all the code for the several modules (openDSU is one of them);
- privatesky/psknode/bundles: all the code from the previous path, with each module bundled into a single file;
- themes: the folder with all the installed themes:
- pharmaledger-theme: custom theme for the pharmaledger implementation comes from https://github.com/PrivateSky/blue-fluorite-theme;
- Use case related:
-
Apihub-root: Folder changes:
- wallet loaders: clones the loader into each of the wallets:
- csc-sponsor-fabric-wallet/loader;
- csc-cmo-fabric-wallet/loader;
- csc-courier-fabric-wallet/loader;
- csc-site-wallet/loader;
- wallet loaders: clones the loader into each of the wallets:
-
csc-sponsor-ssapp: The application for the sponsor;
-
csc-cmo-ssapp: The application for the contract manufacturing organization;
-
csc-courier-ssapp: The application for the courier;
-
csc-site-ssapp: The application for the clinical site;
-
gtin-dsu-wizard: the ssapp the creates GTIN based DSUs. Cloned from epi;
-
gtin-resolver: the 'library' to resolve gtin+batchs to dsus. Cloned from epi;
-