Skip to content
Snippets Groups Projects
Commit d650a49b authored by paul's avatar paul
Browse files

readme updated

parent 6d1aedea
No related branches found
No related tags found
No related merge requests found
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
# Start the original web controller
Clone Joe's original summer work (Ashley has the repo address)
The new web controller code contains a bug meaning the Endorser doesn't properly initialise. This will need fixing properly, but a temporary fix is to run the original web controller which performs setup correctly:
```
cd ../SSI-platform-development-main/webCemo/webcontroller
npm start
```
This needs to be run first because it will default to port 3000, which is what the original web controller expects,
should you wish to explore it.
# For a clean start, clear all docker instances and restart them
```
sudo docker ps -a # lists all docker instances
cd von-network
sudo ./manage stop # stop the von network
cd ../SSI-platform-development-main/webDemo/cloudAgents/
sudo ./manage all stop # stop the docker cloud agents
sudo docker container prune # prune all the agents
sudo docker ps -a # should show no docker instances
```
Run the von-network and ACA-Py cloud agent docker instances
```
cd von-network
sudo ./manage start # start the von network docker instance
cd ../SSI-platform-development-main/webDemo/cloudAgents
sudo ./manage all start # start the docker cloud agents
sudo docker ps -a # should show the running docker instances
```
Start the file server
```
cd ../SSI-platform-development-main/webDemo/file-server
npm start # you may want to clear the /uploads and /imageRegistry folders
```
# Start the new web controllers (Holder-App and all Agents)
```
cd Holder-App
npm start # start Ruths holder app
cd Portal-Apps/IV-Portal-Cavendish/
npm start # answer Y to run on a different port
cd Portal-Apps/IV-Portal-Thoday/
npm start # answer Y to run on a different port
cd Portal-Apps/IV-Portal-Franklin/
npm start # answer Y to run on a different port
```
Of the 4 windows that appear, I recommend splitting the them into two browsers, the left for the Holder-App and the right for the remaining three agents.
Every time you clear the docker instances, you must currently copy the newly generated certificates for Cavendish and Thoday over to the ssi-lib shared library you can find this JSON object outputted to the developer console for Cavendish and Thoday on first running those web apps. copy the objects into
```
/ssi-lib/src/Common.js
```
Here's an example from Cavendish; the schema_id, cred_def_id, issuer_id and schema_issuer_id change every time the von network is cleared and restarted.
```
{
"schema_name": "PhotographerCertification",
"schema_version": "1.0",
"schema_id": "PxNTs3yPSL3SD9e7DpAqF2:2:PhotographerCertification:1.0",
"cred_def_id": "PxNTs3yPSL3SD9e7DpAqF2:3:CL:170:default",
"issuer_did": "PxNTs3yPSL3SD9e7DpAqF2",
"schema_issuer_did": "PxNTs3yPSL3SD9e7DpAqF2"
}
```
# Caveats & Tips
1. If you npm install anything to the agents, you may have to npm link ssi-lib again, to relink the shared ssi-lib library again.
2. Not very common, but sometimes the docker instances can fail to initialise properly and it may look as if you code is buggy. in such cases, run `sudo docker logs INSTANCE_ID`. To see if anything is amiss, especially for the web-socket relay docker instances.
3. Don't forget to copy the cavendish and thoday certificates over to ssi-lib whenever you reset the von network dockers; resetting von-network can be handy after many hours of development due to many old credentials appearing in the wallet.
4. Check out package.json where you can find the script to run the Holder-App in an Electron container.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment